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

@@ -227,8 +227,7 @@ export default Vue.extend({
version,
langs,
latestVersion: undefined,
checkingForUpdate: false,
darkmode: localStorage.getItem('darkmode') == 'true'
checkingForUpdate: false
};
},
computed: {
@@ -246,6 +245,11 @@ export default Vue.extend({
set(value) { this.$store.commit('device/set', { key: 'autoPopout', value }); }
},
darkmode: {
get() { return this.$store.state.device.darkmode; },
set(value) { this.$store.commit('device/set', { key: 'darkmode', value }); }
},
enableSounds: {
get() { return this.$store.state.device.enableSounds; },
set(value) { this.$store.commit('device/set', { key: 'enableSounds', value }); }
@@ -276,11 +280,6 @@ export default Vue.extend({
set(value) { this.$store.commit('device/set', { key: 'enableExperimentalFeatures', value }); }
}
},
watch: {
darkmode() {
(this as any)._updateDarkmode_(this.darkmode);
}
},
created() {
(this as any).os.getMeta().then(meta => {
this.meta = meta;