mirror of
https://github.com/usememos/memos.git
synced 2024-12-19 17:12:02 +03:00
fix: user default 'Basic Setting' should follow server's setting (#1795)
fix: user default 'Basic Setting' should follow system setting
This commit is contained in:
parent
c27c6cea13
commit
c14c6b3786
@ -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 = {
|
||||
|
4
web/src/types/modules/setting.d.ts
vendored
4
web/src/types/modules/setting.d.ts
vendored
@ -1,5 +1,9 @@
|
||||
type Appearance = "system" | "light" | "dark";
|
||||
|
||||
interface BasicSetting {
|
||||
locale: Locale;
|
||||
appearance: Appearance;
|
||||
}
|
||||
interface Setting {
|
||||
locale: Locale;
|
||||
appearance: Appearance;
|
||||
|
Loading…
Reference in New Issue
Block a user