(litenote config) implement dark mode on notes

Closes #5
This commit is contained in:
2021-03-27 16:56:54 +01:00
parent f352f8ba0f
commit 373ba812f5
8 changed files with 72 additions and 20 deletions

View File

@@ -6,4 +6,5 @@ export interface UserSettings {
| 'Maven Pro'
| 'Noto Sans KR'
| 'Tajawal'
mode?: 'light' | 'dark'
}

View File

@@ -11,8 +11,8 @@ interface State {
user: string
repo: string
files: RepoFile[]
readme: string | null
userSettings: UserSettings | null
readme?: string | null
userSettings?: UserSettings | null
}
export const useUserRepoStore = defineStore({
@@ -21,8 +21,8 @@ export const useUserRepoStore = defineStore({
user: '',
repo: '',
files: [],
readme: null,
userSettings: null
readme: undefined,
userSettings: undefined
}),
actions: {
async setUserRepo(newUser: string, newRepo: string) {
@@ -45,7 +45,7 @@ export const useUserRepoStore = defineStore({
resetFiles() {
this.files = []
this.readme = null
this.userSettings = null
this.userSettings = undefined
}
}
})