This commit is contained in:
syuilo
2018-05-24 05:28:46 +09:00
parent b320d08a5e
commit 89461c598f
12 changed files with 79 additions and 73 deletions

View File

@@ -141,7 +141,6 @@ export default Vue.extend({
version,
codename,
langs,
darkmode: localStorage.getItem('darkmode') == 'true',
latestVersion: undefined,
checkingForUpdate: false
};
@@ -152,6 +151,11 @@ export default Vue.extend({
return Vue.filter('userName')((this as any).os.i);
},
darkmode: {
get() { return this.$store.state.device.darkmode; },
set(value) { this.$store.commit('device/set', { key: 'darkmode', value }); }
},
postStyle: {
get() { return this.$store.state.device.postStyle; },
set(value) { this.$store.commit('device/set', { key: 'postStyle', value }); }
@@ -168,12 +172,6 @@ export default Vue.extend({
},
},
watch: {
darkmode() {
(this as any)._updateDarkmode_(this.darkmode);
}
},
mounted() {
document.title = 'Misskey | %i18n:@settings%';
},