Resolve #6170
This commit is contained in:
@ -18,7 +18,7 @@ import PostFormDialog from './components/post-form-dialog.vue';
|
||||
import Dialog from './components/dialog.vue';
|
||||
import Menu from './components/menu.vue';
|
||||
import { router } from './router';
|
||||
import { applyTheme, lightTheme } from './theme';
|
||||
import { applyTheme, lightTheme, builtinThemes } from './theme';
|
||||
|
||||
Vue.use(Vuex);
|
||||
Vue.use(VueHotkey);
|
||||
@ -163,6 +163,12 @@ os.init(async () => {
|
||||
isMobile: isMobile
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.device.darkMode'() {
|
||||
const themes = builtinThemes.concat(this.$store.state.device.themes);
|
||||
applyTheme(themes.find(x => x.id === (this.$store.state.device.darkMode ? this.$store.state.device.darkTheme : this.$store.state.device.lightTheme)));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
api: os.api,
|
||||
signout: os.signout,
|
||||
|
Reference in New Issue
Block a user