feat: 支持 "在 b 站打开" 的快捷操作,一些细节优化 (#384)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2025-07-10 01:46:34 +08:00
committed by GitHub
parent 486dab5355
commit 655b4389b7
9 changed files with 66 additions and 22 deletions

View File

@@ -58,7 +58,7 @@
<div>
<div class="mb-6 flex items-center justify-between">
<div class=" text-sm">
<div class="text-sm font-medium">
{#if !loading}
{totalCount} 个合集
{/if}

View File

@@ -44,7 +44,7 @@
<div>
<div class="mb-6 flex items-center justify-between">
<div class="text-sm">
<div class="text-sm font-medium">
{#if !loading}
{favorites.length} 个收藏夹
{/if}

View File

@@ -54,9 +54,14 @@
<div>
<div class="mb-6 flex items-center justify-between">
<div class=" text-sm">
<div class="flex items-center gap-6">
{#if !loading}
{totalCount} 个 UP 主
<div class=" text-sm font-medium">
{totalCount} 个 UP 主
</div>
<div class=" text-sm font-medium">
当前第 {currentPage + 1} / {totalPages}
</div>
{/if}
</div>
</div>

View File

@@ -4,6 +4,7 @@
import { onMount } from 'svelte';
import { Button } from '$lib/components/ui/button/index.js';
import api from '$lib/api';
import SquareArrowOutUpRightIcon from '@lucide/svelte/icons/square-arrow-out-up-right';
import type { ApiError, VideoResponse, UpdateVideoStatusRequest } from '$lib/types';
import RotateCcwIcon from '@lucide/svelte/icons/rotate-ccw';
import EditIcon from '@lucide/svelte/icons/edit';
@@ -134,6 +135,17 @@
<RotateCcwIcon class="mr-2 h-4 w-4 {resetting ? 'animate-spin' : ''}" />
重置
</Button>
<Button
size="sm"
variant="outline"
class="shrink-0 cursor-pointer "
onclick={() =>
window.open(`https://www.bilibili.com/video/${videoData?.video.bvid}/`, '_blank')}
disabled={statusEditorLoading}
>
<SquareArrowOutUpRightIcon class="mr-2 h-4 w-4" />
在 B 站打开
</Button>
</div>
</div>
@@ -141,6 +153,7 @@
<VideoCard
video={{
id: videoData.video.id,
bvid: videoData.video.bvid,
name: videoData.video.name,
upper_name: videoData.video.upper_name,
download_status: videoData.video.download_status

View File

@@ -190,7 +190,7 @@
}}
></SearchBar>
<div class="flex items-center gap-2">
<span class="text-muted-foreground text-sm">筛选视频源</span>
<span class="text-muted-foreground text-sm">筛选:</span>
<DropdownFilter
{filters}
selectedLabel={$appStateStore.videoSource}
@@ -213,7 +213,7 @@
{videosData.total_count} 个视频
</div>
<div class=" text-sm font-medium">
{totalPages}
当前第 {$appStateStore.currentPage + 1} / {totalPages}
</div>
</div>
<div class="flex items-center gap-2">