fix(user): lint
This commit is contained in:
parent
aab2020e68
commit
cd8e497b24
@ -3,8 +3,6 @@ import {createSharedComposable, usePreferredColorScheme, tryOnMounted} from '@vu
|
|||||||
import type {BasicColorSchema} from '@vueuse/core'
|
import type {BasicColorSchema} from '@vueuse/core'
|
||||||
import {useAuthStore} from '@/stores/auth'
|
import {useAuthStore} from '@/stores/auth'
|
||||||
|
|
||||||
const STORAGE_KEY = 'color-scheme'
|
|
||||||
|
|
||||||
const DEFAULT_COLOR_SCHEME_SETTING: BasicColorSchema = 'light'
|
const DEFAULT_COLOR_SCHEME_SETTING: BasicColorSchema = 'light'
|
||||||
|
|
||||||
const CLASS_DARK = 'dark'
|
const CLASS_DARK = 'dark'
|
||||||
|
@ -18,7 +18,7 @@ export default class UserSettingsModel extends AbstractModel<IUserSettings> impl
|
|||||||
frontendSettings: IFrontendSettings = {
|
frontendSettings: IFrontendSettings = {
|
||||||
playSoundWhenDone: true,
|
playSoundWhenDone: true,
|
||||||
quickAddMagicMode: PrefixMode.Default,
|
quickAddMagicMode: PrefixMode.Default,
|
||||||
colorSchema: 'auto'
|
colorSchema: 'auto',
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(data: Partial<IUserSettings> = {}) {
|
constructor(data: Partial<IUserSettings> = {}) {
|
||||||
|
@ -69,7 +69,7 @@ export const useAuthStore = defineStore('auth', () => {
|
|||||||
isLoadingGeneralSettings.value = isLoading
|
isLoadingGeneralSettings.value = isLoading
|
||||||
}
|
}
|
||||||
|
|
||||||
function setUser(newUser: IUser | null, saveSettings: boolean = true) {
|
function setUser(newUser: IUser | null, saveSettings = true) {
|
||||||
info.value = newUser
|
info.value = newUser
|
||||||
if (newUser !== null) {
|
if (newUser !== null) {
|
||||||
reloadAvatar()
|
reloadAvatar()
|
||||||
@ -99,7 +99,7 @@ export const useAuthStore = defineStore('auth', () => {
|
|||||||
quickAddMagicMode: PrefixMode.Default,
|
quickAddMagicMode: PrefixMode.Default,
|
||||||
colorSchema: 'auto',
|
colorSchema: 'auto',
|
||||||
...newSettings.frontendSettings,
|
...newSettings.frontendSettings,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
// console.log('settings from auth store', {...settings.value.frontendSettings})
|
// console.log('settings from auth store', {...settings.value.frontendSettings})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user