From e07e9f2e9f07270bb2c27aeddd7a6cac2c21427a Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 18 Aug 2025 20:08:53 +0800 Subject: [PATCH] fix: theme selector --- web/src/components/AuthFooter.tsx | 8 ++----- web/src/components/ThemeSelect.tsx | 34 ++++++++++++++---------------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/web/src/components/AuthFooter.tsx b/web/src/components/AuthFooter.tsx index b689490be..6553af5bc 100644 --- a/web/src/components/AuthFooter.tsx +++ b/web/src/components/AuthFooter.tsx @@ -9,14 +9,10 @@ interface Props { } const AuthFooter = observer(({ className }: Props) => { - const handleLocaleSelectChange = (locale: Locale) => { - workspaceStore.state.setPartial({ locale }); - }; - return (
- - + workspaceStore.state.setPartial({ locale })} /> + workspaceStore.state.setPartial({ theme })} />
); }); diff --git a/web/src/components/ThemeSelect.tsx b/web/src/components/ThemeSelect.tsx index 4ff918f31..ce4857765 100644 --- a/web/src/components/ThemeSelect.tsx +++ b/web/src/components/ThemeSelect.tsx @@ -1,6 +1,5 @@ import { Moon, Palette, Sun, Wallpaper } from "lucide-react"; -import { Button } from "@/components/ui/button"; -import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { workspaceStore } from "@/store"; interface ThemeSelectProps { @@ -27,25 +26,24 @@ const ThemeSelect = ({ value, onValueChange, className }: ThemeSelectProps = {}) } }; - const currentThemeOption = themeOptions.find((option) => option.value === currentTheme); - return ( - - - - - + ); };