From 1052c04d33034b229615a257436d4dc242cf72b2 Mon Sep 17 00:00:00 2001 From: boojack Date: Tue, 9 Jun 2026 21:04:47 +0800 Subject: [PATCH] fix(web): improve mobile control spacing --- web/src/components/AuthFooter.tsx | 6 +++--- web/src/components/LocalePicker.tsx | 25 ++++++++++++++++--------- web/src/components/LocaleSelect.tsx | 5 +++-- web/src/components/ThemeSelect.tsx | 9 ++++++--- web/src/components/UserMenu.tsx | 4 ++-- web/src/pages/About.tsx | 2 +- web/tests/about-page.test.tsx | 9 +++++++++ 7 files changed, 40 insertions(+), 20 deletions(-) diff --git a/web/src/components/AuthFooter.tsx b/web/src/components/AuthFooter.tsx index 8d02cdc13..061178c75 100644 --- a/web/src/components/AuthFooter.tsx +++ b/web/src/components/AuthFooter.tsx @@ -25,9 +25,9 @@ const AuthFooter = ({ className }: Props) => { }; return ( -
- - +
+ +
); }; diff --git a/web/src/components/LocalePicker.tsx b/web/src/components/LocalePicker.tsx index 23ef1e325..cdadfb100 100644 --- a/web/src/components/LocalePicker.tsx +++ b/web/src/components/LocalePicker.tsx @@ -28,8 +28,13 @@ export const LocaleSearchList = (props: LocaleSearchListProps) => { ); return ( -
-
+
+
{ aria-label={t("common.language")} />
-
+
{filteredLocales.map((locale) => ( ))} {filteredLocales.length === 0 && ( @@ -94,11 +101,11 @@ const LocalePicker = (props: LocalePickerProps) => { diff --git a/web/src/components/LocaleSelect.tsx b/web/src/components/LocaleSelect.tsx index 8c63bf10f..668dcc1a8 100644 --- a/web/src/components/LocaleSelect.tsx +++ b/web/src/components/LocaleSelect.tsx @@ -5,10 +5,11 @@ import { loadLocale } from "@/utils/i18n"; interface Props { value: Locale; onChange: (locale: Locale) => void; + className?: string; } const LocaleSelect: FC = (props: Props) => { - const { onChange, value } = props; + const { className, onChange, value } = props; const handleSelectChange = async (locale: Locale) => { // Apply locale globally immediately @@ -17,7 +18,7 @@ const LocaleSelect: FC = (props: Props) => { onChange(locale); }; - return ; + return ; }; export default LocaleSelect; diff --git a/web/src/components/ThemeSelect.tsx b/web/src/components/ThemeSelect.tsx index c1bc253a5..eb562e73b 100644 --- a/web/src/components/ThemeSelect.tsx +++ b/web/src/components/ThemeSelect.tsx @@ -7,6 +7,7 @@ interface ThemeSelectProps { value?: string; onValueChange?: (theme: string) => void; className?: string; + compact?: boolean; } const THEME_ICONS: Record = { @@ -16,8 +17,9 @@ const THEME_ICONS: Record = { paper: , }; -const ThemeSelect = ({ value, onValueChange, className }: ThemeSelectProps = {}) => { +const ThemeSelect = ({ value, onValueChange, className, compact = false }: ThemeSelectProps = {}) => { const currentTheme = value || "system"; + const triggerLabel = currentTheme === "system" ? "System" : THEME_OPTIONS.find((option) => option.value === currentTheme)?.label; const handleThemeChange = (newTheme: string) => { // Apply theme globally immediately @@ -31,8 +33,9 @@ const ThemeSelect = ({ value, onValueChange, className }: ThemeSelectProps = {}) return (