feat: add settings page and theme toggle component

- Implemented a new SettingsPage component for user preferences including appearance, behavior, and account security settings.
- Added a ThemeToggle component to switch between light, dark, and system modes.
- Created reusable UI components: AlertDialog, Avatar, Badge, Button, Card, Dialog, Input, Label, Progress, ScrollArea, Separator, Sheet, Skeleton, Tooltip.
- Introduced utility functions for class name merging and formatting bytes/uptime.
- Added a custom hook for media query handling
This commit is contained in:
DrSmoothl committed 2026-05-05 00:39:52 +08:00
1 parent f52a84d53f
commit 1426d7adb2
65 files changed
+4687 -4530

No files matched your search

+3 -3
View File
@@ -9,7 +9,7 @@ const CONFIG_DIR = 'config';
const RUNTIME_CONFIG_PATH = path.join(CONFIG_DIR, 'runtime.json');
const DEFAULT_RUNTIME_CONFIG: RuntimeConfig = {
webuiPort: 8080,
webuiPort: 5099,
};
export function loadRuntimeConfig(): RuntimeConfig {
@@ -22,7 +22,7 @@ export function loadRuntimeConfig(): RuntimeConfig {
}
const normalized: RuntimeConfig = {
webuiPort: normalizePort(loaded.webuiPort ?? 8080, 8080),
webuiPort: normalizePort(loaded.webuiPort ?? 5099, 5099),
};
if (
@@ -43,7 +43,7 @@ function tryLoadRuntimeConfig(): RuntimeConfig | null {
if (!isObject(parsed)) return null;
return {
webuiPort: normalizePort(parsed.webuiPort ?? 8080, 8080),
webuiPort: normalizePort(parsed.webuiPort ?? 5099, 5099),
};
} catch {
return null;