mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-09-07 00:17:24 +08:00
chore: 修改图标 import 写法以减少编译器分析
This commit is contained in:
@@ -1,16 +1,14 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import BotIcon from '@lucide/svelte/icons/bot';
|
||||||
DatabaseIcon,
|
import ChartPieIcon from '@lucide/svelte/icons/chart-pie';
|
||||||
FilePlayIcon,
|
import DatabaseIcon from '@lucide/svelte/icons/database';
|
||||||
BotIcon,
|
import FilePlayIcon from '@lucide/svelte/icons/file-play';
|
||||||
ChartPieIcon,
|
import FoldersIcon from '@lucide/svelte/icons/folders';
|
||||||
HeartIcon,
|
import HeartIcon from '@lucide/svelte/icons/heart';
|
||||||
FoldersIcon,
|
import PaletteIcon from '@lucide/svelte/icons/palette';
|
||||||
UserIcon,
|
import Settings2Icon from '@lucide/svelte/icons/settings-2';
|
||||||
Settings2Icon,
|
import SquareTerminalIcon from '@lucide/svelte/icons/square-terminal';
|
||||||
SquareTerminalIcon,
|
import UserIcon from '@lucide/svelte/icons/user';
|
||||||
PaletteIcon
|
|
||||||
} from '@lucide/svelte/icons';
|
|
||||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||||
import { mode, toggleMode } from 'mode-watcher';
|
import { mode, toggleMode } from 'mode-watcher';
|
||||||
import type { ComponentProps } from 'svelte';
|
import type { ComponentProps } from 'svelte';
|
||||||
|
|||||||
@@ -42,7 +42,8 @@
|
|||||||
labelKey?: string;
|
labelKey?: string;
|
||||||
hideIndicator?: boolean;
|
hideIndicator?: boolean;
|
||||||
labelClassName?: string;
|
labelClassName?: string;
|
||||||
labelFormatter?: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
labelFormatter?:
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
((value: any, payload: TooltipPayload[]) => string | number | Snippet) | null;
|
((value: any, payload: TooltipPayload[]) => string | number | Snippet) | null;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
valueFormatter?: ((value: any) => string | number | Snippet) | null;
|
valueFormatter?: ((value: any) => string | number | Snippet) | null;
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
import { toast } from 'svelte-sonner';
|
import { toast } from 'svelte-sonner';
|
||||||
import api from '$lib/api';
|
import api from '$lib/api';
|
||||||
import type { Credential, ApiError } from '$lib/types';
|
import type { Credential, ApiError } from '$lib/types';
|
||||||
import { RefreshCw, LoaderCircle } from '@lucide/svelte/icons';
|
import LoaderCircle from '@lucide/svelte/icons/loader-circle';
|
||||||
|
import RefreshCw from '@lucide/svelte/icons/refresh-cw';
|
||||||
import QRCode from 'qrcode';
|
import QRCode from 'qrcode';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { EllipsisIcon, TrashIcon } from '@lucide/svelte/icons';
|
import EllipsisIcon from '@lucide/svelte/icons/ellipsis';
|
||||||
|
import TrashIcon from '@lucide/svelte/icons/trash';
|
||||||
import { tick } from 'svelte';
|
import { tick } from 'svelte';
|
||||||
import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';
|
import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';
|
||||||
import * as Command from '$lib/components/ui/command/index.js';
|
import * as Command from '$lib/components/ui/command/index.js';
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Button } from '$lib/components/ui/button/index.js';
|
import { Button } from '$lib/components/ui/button/index.js';
|
||||||
import {
|
import ChevronLeftIcon from '@lucide/svelte/icons/chevron-left';
|
||||||
ChevronLeftIcon,
|
import ChevronRightIcon from '@lucide/svelte/icons/chevron-right';
|
||||||
ChevronRightIcon,
|
import ChevronsLeftIcon from '@lucide/svelte/icons/chevrons-left';
|
||||||
ChevronsLeftIcon,
|
import ChevronsRightIcon from '@lucide/svelte/icons/chevrons-right';
|
||||||
ChevronsRightIcon
|
|
||||||
} from '@lucide/svelte/icons';
|
|
||||||
|
|
||||||
export let currentPage: number = 0;
|
export let currentPage: number = 0;
|
||||||
export let totalPages: number = 0;
|
export let totalPages: number = 0;
|
||||||
|
|||||||
@@ -6,7 +6,9 @@
|
|||||||
import * as Card from '$lib/components/ui/card/index.js';
|
import * as Card from '$lib/components/ui/card/index.js';
|
||||||
import { Badge } from '$lib/components/ui/badge/index.js';
|
import { Badge } from '$lib/components/ui/badge/index.js';
|
||||||
import * as Select from '$lib/components/ui/select/index.js';
|
import * as Select from '$lib/components/ui/select/index.js';
|
||||||
import { PlusIcon, MinusIcon, XIcon } from '@lucide/svelte/icons';
|
import MinusIcon from '@lucide/svelte/icons/minus';
|
||||||
|
import PlusIcon from '@lucide/svelte/icons/plus';
|
||||||
|
import XIcon from '@lucide/svelte/icons/x';
|
||||||
import type { Rule, RuleTarget, Condition } from '$lib/types';
|
import type { Rule, RuleTarget, Condition } from '$lib/types';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { SearchIcon } from '@lucide/svelte/icons';
|
import SearchIcon from '@lucide/svelte/icons/search';
|
||||||
import * as Input from '$lib/components/ui/input/index.js';
|
import * as Input from '$lib/components/ui/input/index.js';
|
||||||
|
|
||||||
export let placeholder: string = '搜索视频..';
|
export let placeholder: string = '搜索视频..';
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import ChevronDownIcon from '@lucide/svelte/icons/chevron-down';
|
||||||
CircleCheckBigIcon,
|
import CircleCheckBigIcon from '@lucide/svelte/icons/circle-check-big';
|
||||||
CircleXIcon,
|
import CircleXIcon from '@lucide/svelte/icons/circle-x';
|
||||||
ClockIcon,
|
import ClockIcon from '@lucide/svelte/icons/clock';
|
||||||
ChevronDownIcon,
|
import TrashIcon from '@lucide/svelte/icons/trash';
|
||||||
TrashIcon
|
|
||||||
} from '@lucide/svelte/icons';
|
|
||||||
import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';
|
import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';
|
||||||
import { Button } from '$lib/components/ui/button/index.js';
|
import { Button } from '$lib/components/ui/button/index.js';
|
||||||
import { type StatusFilterValue } from '$lib/stores/filter';
|
import { type StatusFilterValue } from '$lib/stores/filter';
|
||||||
|
|||||||
@@ -3,15 +3,13 @@
|
|||||||
import { Card, CardContent, CardHeader, CardTitle } from '$lib/components/ui/card/index.js';
|
import { Card, CardContent, CardHeader, CardTitle } from '$lib/components/ui/card/index.js';
|
||||||
import { Badge } from '$lib/components/ui/badge/index.js';
|
import { Badge } from '$lib/components/ui/badge/index.js';
|
||||||
import SubscriptionDialog from './subscription-dialog.svelte';
|
import SubscriptionDialog from './subscription-dialog.svelte';
|
||||||
import {
|
import CheckIcon from '@lucide/svelte/icons/check';
|
||||||
UserIcon,
|
import FolderIcon from '@lucide/svelte/icons/folder';
|
||||||
VideoIcon,
|
import HeartIcon from '@lucide/svelte/icons/heart';
|
||||||
FolderIcon,
|
import PlusIcon from '@lucide/svelte/icons/plus';
|
||||||
HeartIcon,
|
import UserIcon from '@lucide/svelte/icons/user';
|
||||||
CheckIcon,
|
import VideoIcon from '@lucide/svelte/icons/video';
|
||||||
PlusIcon,
|
import XIcon from '@lucide/svelte/icons/x';
|
||||||
XIcon
|
|
||||||
} from '@lucide/svelte/icons';
|
|
||||||
import type { Followed } from '$lib/types';
|
import type { Followed } from '$lib/types';
|
||||||
|
|
||||||
export let item: Followed;
|
export let item: Followed;
|
||||||
|
|||||||
@@ -32,7 +32,8 @@
|
|||||||
labelKey?: string;
|
labelKey?: string;
|
||||||
hideIndicator?: boolean;
|
hideIndicator?: boolean;
|
||||||
labelClassName?: string;
|
labelClassName?: string;
|
||||||
labelFormatter?: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
labelFormatter?:
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
((value: any, payload: TooltipPayload[]) => string | number | Snippet) | null;
|
((value: any, payload: TooltipPayload[]) => string | number | Snippet) | null;
|
||||||
formatter?: Snippet<
|
formatter?: Snippet<
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import ChevronDownIcon from '@lucide/svelte/icons/chevron-down';
|
||||||
CircleCheckBigIcon,
|
import CircleCheckBigIcon from '@lucide/svelte/icons/circle-check-big';
|
||||||
TriangleAlertIcon,
|
import SkipForwardIcon from '@lucide/svelte/icons/skip-forward';
|
||||||
SkipForwardIcon,
|
import TrashIcon from '@lucide/svelte/icons/trash';
|
||||||
ChevronDownIcon,
|
import TriangleAlertIcon from '@lucide/svelte/icons/triangle-alert';
|
||||||
TrashIcon
|
|
||||||
} from '@lucide/svelte/icons';
|
|
||||||
import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';
|
import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';
|
||||||
import { Button } from '$lib/components/ui/button/index.js';
|
import { Button } from '$lib/components/ui/button/index.js';
|
||||||
import { type ValidationFilterValue } from '$lib/stores/filter';
|
import { type ValidationFilterValue } from '$lib/stores/filter';
|
||||||
|
|||||||
@@ -7,17 +7,15 @@
|
|||||||
import { Checkbox } from '$lib/components/ui/checkbox/index.js';
|
import { Checkbox } from '$lib/components/ui/checkbox/index.js';
|
||||||
import { Label } from '$lib/components/ui/label/index.js';
|
import { Label } from '$lib/components/ui/label/index.js';
|
||||||
import type { VideoInfo } from '$lib/types';
|
import type { VideoInfo } from '$lib/types';
|
||||||
import {
|
import BrushCleaningIcon from '@lucide/svelte/icons/brush-cleaning';
|
||||||
RotateCcwIcon,
|
import ClockIcon from '@lucide/svelte/icons/clock';
|
||||||
InfoIcon,
|
import EllipsisIcon from '@lucide/svelte/icons/ellipsis';
|
||||||
BrushCleaningIcon,
|
import FolderIcon from '@lucide/svelte/icons/folder';
|
||||||
UserIcon,
|
import HeartIcon from '@lucide/svelte/icons/heart';
|
||||||
SquareArrowOutUpRightIcon,
|
import InfoIcon from '@lucide/svelte/icons/info';
|
||||||
EllipsisIcon,
|
import RotateCcwIcon from '@lucide/svelte/icons/rotate-ccw';
|
||||||
HeartIcon,
|
import SquareArrowOutUpRightIcon from '@lucide/svelte/icons/square-arrow-out-up-right';
|
||||||
FolderIcon,
|
import UserIcon from '@lucide/svelte/icons/user';
|
||||||
ClockIcon
|
|
||||||
} from '@lucide/svelte/icons';
|
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
import * as Tooltip from '$lib/components/ui/tooltip/index.js';
|
import * as Tooltip from '$lib/components/ui/tooltip/index.js';
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
import { ClockIcon, FolderIcon, HeartIcon, UserIcon } from '@lucide/svelte/icons';
|
import ClockIcon from '@lucide/svelte/icons/clock';
|
||||||
|
import FolderIcon from '@lucide/svelte/icons/folder';
|
||||||
|
import HeartIcon from '@lucide/svelte/icons/heart';
|
||||||
|
import UserIcon from '@lucide/svelte/icons/user';
|
||||||
|
|
||||||
export const VIDEO_SOURCES = {
|
export const VIDEO_SOURCES = {
|
||||||
FAVORITE: { type: 'favorite', title: '收藏夹', icon: HeartIcon },
|
FAVORITE: { type: 'favorite', title: '收藏夹', icon: HeartIcon },
|
||||||
|
|||||||
+13
-15
@@ -13,21 +13,19 @@
|
|||||||
import CloudDownloadIcon from '@lucide/svelte/icons/cloud-download';
|
import CloudDownloadIcon from '@lucide/svelte/icons/cloud-download';
|
||||||
import api from '$lib/api';
|
import api from '$lib/api';
|
||||||
import type { DashBoardResponse, SysInfo, ApiError, TaskStatus } from '$lib/types';
|
import type { DashBoardResponse, SysInfo, ApiError, TaskStatus } from '$lib/types';
|
||||||
import {
|
import CalendarIcon from '@lucide/svelte/icons/calendar';
|
||||||
DatabaseIcon,
|
import CircleCheckBigIcon from '@lucide/svelte/icons/circle-check-big';
|
||||||
HeartIcon,
|
import ClockIcon from '@lucide/svelte/icons/clock';
|
||||||
FolderIcon,
|
import CpuIcon from '@lucide/svelte/icons/cpu';
|
||||||
UserIcon,
|
import DatabaseIcon from '@lucide/svelte/icons/database';
|
||||||
ClockIcon,
|
import DownloadIcon from '@lucide/svelte/icons/download';
|
||||||
VideoIcon,
|
import FolderIcon from '@lucide/svelte/icons/folder';
|
||||||
HardDriveIcon,
|
import HardDriveIcon from '@lucide/svelte/icons/hard-drive';
|
||||||
CpuIcon,
|
import HeartIcon from '@lucide/svelte/icons/heart';
|
||||||
MemoryStickIcon,
|
import MemoryStickIcon from '@lucide/svelte/icons/memory-stick';
|
||||||
PlayIcon,
|
import PlayIcon from '@lucide/svelte/icons/play';
|
||||||
CircleCheckBigIcon,
|
import UserIcon from '@lucide/svelte/icons/user';
|
||||||
CalendarIcon,
|
import VideoIcon from '@lucide/svelte/icons/video';
|
||||||
DownloadIcon
|
|
||||||
} from '@lucide/svelte/icons';
|
|
||||||
|
|
||||||
let dashboardData = $state<DashBoardResponse | null>(null);
|
let dashboardData = $state<DashBoardResponse | null>(null);
|
||||||
let sysInfo = $state<SysInfo | null>(null);
|
let sysInfo = $state<SysInfo | null>(null);
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
import QrLogin from '$lib/components/custom/qr-login.svelte';
|
import QrLogin from '$lib/components/custom/qr-login.svelte';
|
||||||
import FilterOptionEditor from '$lib/components/filter-option-editor.svelte';
|
import FilterOptionEditor from '$lib/components/filter-option-editor.svelte';
|
||||||
import NotifierDialog from './NotifierDialog.svelte';
|
import NotifierDialog from './NotifierDialog.svelte';
|
||||||
import { InfoIcon, QrCodeIcon } from '@lucide/svelte/icons';
|
import InfoIcon from '@lucide/svelte/icons/info';
|
||||||
|
import QrCodeIcon from '@lucide/svelte/icons/qr-code';
|
||||||
import api from '$lib/api';
|
import api from '$lib/api';
|
||||||
import { toast } from 'svelte-sonner';
|
import { toast } from 'svelte-sonner';
|
||||||
import { setBreadcrumb } from '$lib/stores/breadcrumb';
|
import { setBreadcrumb } from '$lib/stores/breadcrumb';
|
||||||
|
|||||||
@@ -141,8 +141,7 @@
|
|||||||
id="webhook-template"
|
id="webhook-template"
|
||||||
class="border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[120px] w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
class="border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[120px] w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
||||||
placeholder={'{"text": "{{{message}}}"}'}
|
placeholder={'{"text": "{{{message}}}"}'}
|
||||||
bind:value={webhookTemplate}
|
bind:value={webhookTemplate}></textarea>
|
||||||
></textarea>
|
|
||||||
<p class="text-muted-foreground text-xs">
|
<p class="text-muted-foreground text-xs">
|
||||||
用于渲染 Webhook 的 Handlebars 模板。如果不填写,将使用默认模板。<br />
|
用于渲染 Webhook 的 Handlebars 模板。如果不填写,将使用默认模板。<br />
|
||||||
可用变量:<code class="text-xs">message</code>(通知内容)、<code class="text-xs"
|
可用变量:<code class="text-xs">message</code>(通知内容)、<code class="text-xs"
|
||||||
|
|||||||
@@ -9,19 +9,17 @@
|
|||||||
import * as Table from '$lib/components/ui/table/index.js';
|
import * as Table from '$lib/components/ui/table/index.js';
|
||||||
import * as Tabs from '$lib/components/ui/tabs/index.js';
|
import * as Tabs from '$lib/components/ui/tabs/index.js';
|
||||||
import * as Dialog from '$lib/components/ui/dialog/index.js';
|
import * as Dialog from '$lib/components/ui/dialog/index.js';
|
||||||
import {
|
import CircleCheckBigIcon from '@lucide/svelte/icons/circle-check-big';
|
||||||
SquarePenIcon,
|
import CircleXIcon from '@lucide/svelte/icons/circle-x';
|
||||||
FolderIcon,
|
import ClockIcon from '@lucide/svelte/icons/clock';
|
||||||
HeartIcon,
|
import FolderIcon from '@lucide/svelte/icons/folder';
|
||||||
UserIcon,
|
import HeartIcon from '@lucide/svelte/icons/heart';
|
||||||
ClockIcon,
|
import InfoIcon from '@lucide/svelte/icons/info';
|
||||||
PlusIcon,
|
import PlusIcon from '@lucide/svelte/icons/plus';
|
||||||
InfoIcon,
|
import RefreshCwIcon from '@lucide/svelte/icons/refresh-cw';
|
||||||
Trash2Icon,
|
import SquarePenIcon from '@lucide/svelte/icons/square-pen';
|
||||||
CircleCheckBigIcon,
|
import Trash2Icon from '@lucide/svelte/icons/trash-2';
|
||||||
CircleXIcon,
|
import UserIcon from '@lucide/svelte/icons/user';
|
||||||
RefreshCwIcon
|
|
||||||
} from '@lucide/svelte/icons';
|
|
||||||
import * as Tooltip from '$lib/components/ui/tooltip/index.js';
|
import * as Tooltip from '$lib/components/ui/tooltip/index.js';
|
||||||
import { toast } from 'svelte-sonner';
|
import { toast } from 'svelte-sonner';
|
||||||
import { setBreadcrumb } from '$lib/stores/breadcrumb';
|
import { setBreadcrumb } from '$lib/stores/breadcrumb';
|
||||||
|
|||||||
@@ -6,7 +6,9 @@
|
|||||||
import api from '$lib/api';
|
import api from '$lib/api';
|
||||||
import SquareArrowOutUpRightIcon from '@lucide/svelte/icons/square-arrow-out-up-right';
|
import SquareArrowOutUpRightIcon from '@lucide/svelte/icons/square-arrow-out-up-right';
|
||||||
import type { ApiError, VideoResponse, UpdateVideoStatusRequest } from '$lib/types';
|
import type { ApiError, VideoResponse, UpdateVideoStatusRequest } from '$lib/types';
|
||||||
import { RotateCcwIcon, SquarePenIcon, BrushCleaningIcon } from '@lucide/svelte/icons';
|
import BrushCleaningIcon from '@lucide/svelte/icons/brush-cleaning';
|
||||||
|
import RotateCcwIcon from '@lucide/svelte/icons/rotate-ccw';
|
||||||
|
import SquarePenIcon from '@lucide/svelte/icons/square-pen';
|
||||||
import { setBreadcrumb } from '$lib/stores/breadcrumb';
|
import { setBreadcrumb } from '$lib/stores/breadcrumb';
|
||||||
import { appStateStore, ToQuery } from '$lib/stores/filter';
|
import { appStateStore, ToQuery } from '$lib/stores/filter';
|
||||||
import VideoCard from '$lib/components/video-card.svelte';
|
import VideoCard from '$lib/components/video-card.svelte';
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
import Pagination from '$lib/components/pagination.svelte';
|
import Pagination from '$lib/components/pagination.svelte';
|
||||||
import { Button } from '$lib/components/ui/button/index.js';
|
import { Button } from '$lib/components/ui/button/index.js';
|
||||||
import * as AlertDialog from '$lib/components/ui/alert-dialog/index.js';
|
import * as AlertDialog from '$lib/components/ui/alert-dialog/index.js';
|
||||||
import { SquarePenIcon, RotateCcwIcon } from '@lucide/svelte/icons';
|
import RotateCcwIcon from '@lucide/svelte/icons/rotate-ccw';
|
||||||
|
import SquarePenIcon from '@lucide/svelte/icons/square-pen';
|
||||||
import api from '$lib/api';
|
import api from '$lib/api';
|
||||||
import { Checkbox } from '$lib/components/ui/checkbox/index.js';
|
import { Checkbox } from '$lib/components/ui/checkbox/index.js';
|
||||||
import { Label } from '$lib/components/ui/label/index.js';
|
import { Label } from '$lib/components/ui/label/index.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user