diff --git a/api/v2/user_setting_service.go b/api/v2/user_setting_service.go index 185c1c5..3d5bb4b 100644 --- a/api/v2/user_setting_service.go +++ b/api/v2/user_setting_service.go @@ -84,8 +84,9 @@ func getUserSetting(ctx context.Context, s *store.Store, userID int32) (*apiv2pb } userSetting := &apiv2pb.UserSetting{ - Id: userID, - Locale: apiv2pb.UserSetting_LOCALE_EN, + Id: userID, + Locale: apiv2pb.UserSetting_LOCALE_EN, + ColorTheme: apiv2pb.UserSetting_COLOR_THEME_LIGHT, } for _, setting := range userSettings { if setting.Key == storepb.UserSettingKey_USER_SETTING_LOCALE { diff --git a/frontend/web/src/components/setting/PreferenceSection.tsx b/frontend/web/src/components/setting/PreferenceSection.tsx index 077d990..7deb585 100644 --- a/frontend/web/src/components/setting/PreferenceSection.tsx +++ b/frontend/web/src/components/setting/PreferenceSection.tsx @@ -8,7 +8,7 @@ const PreferenceSection: React.FC = () => { const { t } = useTranslation(); const userStore = useUserStore(); const userSetting = userStore.getCurrentUserSetting(); - const language = userSetting.locale || UserSetting_Locale.EN; + const language = userSetting.locale; const colorTheme = userSetting.colorTheme; const languageOptions = [ @@ -23,10 +23,6 @@ const PreferenceSection: React.FC = () => { ]; const colorThemeOptions = [ - { - value: "COLOR_THEME_UNSPECIFIED", - label: "Auto", - }, { value: "COLOR_THEME_LIGHT", label: "Light", @@ -52,6 +48,10 @@ const PreferenceSection: React.FC = () => { }; const handleSelectColorTheme = async (colorTheme: UserSetting_ColorTheme) => { + if (!colorTheme) { + return; + } + await userStore.updateUserSetting( { ...userSetting, diff --git a/frontend/web/src/pages/Home.tsx b/frontend/web/src/pages/Home.tsx index 9fdfe1a..97b3801 100644 --- a/frontend/web/src/pages/Home.tsx +++ b/frontend/web/src/pages/Home.tsx @@ -74,8 +74,8 @@ const Home: React.FC = () => { loading ) : orderedShortcutList.length === 0 ? ( -
No shortcuts found.
Manage your workspace.
-