Unverified Commit c14c6b37 authored by 冇's avatar Committed by GitHub

fix: user default 'Basic Setting' should follow server's setting (#1795)

fix: user default 'Basic Setting' should follow system setting
parent c27c6cea
......@@ -21,8 +21,15 @@ const defaultLocalSetting: LocalSetting = {
};
export const convertResponseModelUser = (user: User): User => {
// user default 'Basic Setting' should follow server's setting
// 'Basic Setting' fields: locale, appearance
const { systemStatus } = store.getState().global;
const { locale, appearance } = systemStatus.customizedProfile;
const systemSetting = { locale, appearance };
const setting: Setting = {
...defaultSetting,
...systemSetting,
};
const { localSetting: storageLocalSetting } = storage.get(["localSetting"]);
const localSetting: LocalSetting = {
......
type Appearance = "system" | "light" | "dark";
interface BasicSetting {
locale: Locale;
appearance: Appearance;
}
interface Setting {
locale: Locale;
appearance: Appearance;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment