From d7b131d7959af82f0d6d891662667e8910f07aec Mon Sep 17 00:00:00 2001
From: Nexmoe <16796652+nexmoe@users.noreply.github.com>
Date: Sat, 20 Dec 2025 19:25:45 +0800
Subject: [PATCH] feat: update configuration and improve download components
* Modify biome.json to exclude specific directories from scanning and add experimental scanner ignores.
* Refine .vscode/settings.json for better Tailwind CSS integration and maintain locales paths.
* Simplify DownloadDialog component by removing unused imports and optimizing button rendering.
* Enhance DownloadItem component's accessibility and interaction handling.
* Introduce Input component in AdvancedOptions for improved user input handling.
---
.vscode/settings.json | 16 ++++----------
biome.json | 13 +++++++++++-
.../components/download/DownloadDialog.tsx | 14 +++++--------
.../src/components/download/DownloadItem.tsx | 21 +++++++++----------
.../src/components/video/AdvancedOptions.tsx | 1 +
5 files changed, 32 insertions(+), 33 deletions(-)
diff --git a/.vscode/settings.json b/.vscode/settings.json
index d2b121e..df3745a 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -21,20 +21,12 @@
},
"typescript.tsdk": "node_modules/typescript/lib",
"tailwindCSS.experimental.classRegex": [
- [
- "cva\\(([^)]*)\\)",
- "[\"'`]([^\"'`]*).*?[\"'`]"
- ],
- [
- "cn\\(([^)]*)\\)",
- "(?:'|\"|`)([^']*)(?:'|\"|`)"
- ]
- ],
- "i18n-ally.localesPaths": [
- "src/renderer/src/locales"
+ ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
+ ["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
],
+ "i18n-ally.localesPaths": ["src/renderer/src/locales"],
"i18n-ally.keystyle": "nested",
"[css]": {
"editor.defaultFormatter": "biomejs.biome"
}
-}
\ No newline at end of file
+}
diff --git a/biome.json b/biome.json
index bc68ee5..f6efc41 100644
--- a/biome.json
+++ b/biome.json
@@ -39,7 +39,18 @@
},
"files": {
"ignoreUnknown": false,
- "includes": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.json"]
+ "includes": [
+ "**/*.ts",
+ "**/*.tsx",
+ "**/*.js",
+ "**/*.jsx",
+ "**/*.json",
+ "!monkey/dist",
+ "!dist",
+ "!out",
+ "!build"
+ ],
+ "experimentalScannerIgnores": ["monkey/dist/**", "dist/**", "out/**", "build/**"]
},
"vcs": {
"enabled": true,
diff --git a/src/renderer/src/components/download/DownloadDialog.tsx b/src/renderer/src/components/download/DownloadDialog.tsx
index 271440c..ebe7893 100644
--- a/src/renderer/src/components/download/DownloadDialog.tsx
+++ b/src/renderer/src/components/download/DownloadDialog.tsx
@@ -23,7 +23,7 @@ import { popularSites } from '@renderer/data/popularSites'
import type { AppSettings, OneClickQualityPreset, PlaylistInfo } from '@shared/types'
import { useAtom, useSetAtom } from 'jotai'
-import { AlertCircle, Download, FolderOpen, List, Loader2, Plus, Search, Video } from 'lucide-react'
+import { AlertCircle, FolderOpen, List, Loader2, Plus, Video } from 'lucide-react'
import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { toast } from 'sonner'
@@ -1275,16 +1275,12 @@ export function DownloadDialog({ onOpenSupportedSites, onOpenSettings }: Downloa
{loading ? (