diff --git a/components/PageSkeleton.tsx b/components/PageSkeleton.tsx index 55565e4..2814850 100644 --- a/components/PageSkeleton.tsx +++ b/components/PageSkeleton.tsx @@ -17,13 +17,13 @@ function DashboardCardSkeleton() {
-
+
-
-
+
+
-
+
); @@ -36,21 +36,21 @@ function ToolPageSkeleton() { return (
{/* 标题区域 */} -
+
{/* 输入区域 */} -
+
{/* 控制栏 */}
-
-
+
+
-
+
{/* 结果区域 */} -
+
); } diff --git a/components/TextInputArea.tsx b/components/TextInputArea.tsx index a7d78c7..8200026 100644 --- a/components/TextInputArea.tsx +++ b/components/TextInputArea.tsx @@ -152,7 +152,7 @@ function ActionButton({ typeof action.disabled === 'function' ? action.disabled(value) : action.disabled || !value; const typeClasses: Record = { - primary: 'bg-primary text-white hover:bg-primary/90', + primary: 'bg-primary text-primary-foreground hover:bg-primary/90', danger: 'text-red-600 hover:bg-red-500/10', default: 'text-muted-foreground hover:bg-muted', }; diff --git a/components/__tests__/TextInputArea.test.tsx b/components/__tests__/TextInputArea.test.tsx index 10388a2..9941e42 100644 --- a/components/__tests__/TextInputArea.test.tsx +++ b/components/__tests__/TextInputArea.test.tsx @@ -334,7 +334,7 @@ describe('TextInputArea 组件', () => { ); const btn = screen.getByText('主要'); - expect(btn).toHaveClass('bg-primary', 'text-white'); + expect(btn).toHaveClass('bg-primary', 'text-primary-foreground'); }); }); diff --git a/pages/Base64Converter/FileMode.tsx b/pages/Base64Converter/FileMode.tsx index c0da7cc..685bdda 100644 --- a/pages/Base64Converter/FileMode.tsx +++ b/pages/Base64Converter/FileMode.tsx @@ -195,7 +195,7 @@ export default function FileMode() { }} /> {isLoading ? ( -
+
) : info ? (
diff --git a/pages/Base64Converter/ImageMode.tsx b/pages/Base64Converter/ImageMode.tsx index 87a3d05..1f68cef 100644 --- a/pages/Base64Converter/ImageMode.tsx +++ b/pages/Base64Converter/ImageMode.tsx @@ -202,7 +202,7 @@ export default function ImageMode() { }} /> {isLoading ? ( -
+
) : info ? (
{result && ( diff --git a/pages/JsonTools/JsonFormatSection.tsx b/pages/JsonTools/JsonFormatSection.tsx index aa036bd..437b199 100644 --- a/pages/JsonTools/JsonFormatSection.tsx +++ b/pages/JsonTools/JsonFormatSection.tsx @@ -90,7 +90,7 @@ export default function JsonFormatSection() { type="checkbox" checked={sortKeys} onChange={(e) => setSortKeys(e.target.checked)} - className="h-4 w-4 rounded border-input text-blue-500 focus:ring-primary" + className="h-4 w-4 rounded border-input text-primary focus:ring-primary" /> {t('jsonFormat:sortKeys')} diff --git a/pages/StorageCleaner/AutoRefreshToggle.tsx b/pages/StorageCleaner/AutoRefreshToggle.tsx index c8c9d40..3b49c8a 100644 --- a/pages/StorageCleaner/AutoRefreshToggle.tsx +++ b/pages/StorageCleaner/AutoRefreshToggle.tsx @@ -19,7 +19,7 @@ export default function AutoRefreshToggle({ autoRefresh, onChange }: AutoRefresh onChange={(e) => onChange(e.target.checked)} className="sr-only peer" /> -
+
); diff --git a/pages/Timestamp/LiveClock.tsx b/pages/Timestamp/LiveClock.tsx index d74e134..fc9b43b 100644 --- a/pages/Timestamp/LiveClock.tsx +++ b/pages/Timestamp/LiveClock.tsx @@ -47,7 +47,7 @@ const LiveClock = React.memo(({ unit, onUseNow }: LiveClockProps) => { diff --git a/pages/Timestamp/index.tsx b/pages/Timestamp/index.tsx index 714167b..469002b 100644 --- a/pages/Timestamp/index.tsx +++ b/pages/Timestamp/index.tsx @@ -98,7 +98,7 @@ export default function Index() { {/* 立即转换 */} diff --git a/src/index.css b/src/index.css index 110f4d6..e7e4950 100644 --- a/src/index.css +++ b/src/index.css @@ -4,6 +4,7 @@ @layer base { :root { + color-scheme: light; --background: 0 0% 100%; --foreground: 222.2 84% 4.9%; @@ -36,6 +37,7 @@ } .dark { + color-scheme: dark; --background: 222.2 84% 4.9%; --foreground: 210 40% 98%; @@ -74,4 +76,9 @@ background-color: hsl(var(--background)); color: hsl(var(--foreground)); } + input, + textarea, + select { + color: hsl(var(--foreground)); + } }