Refactor
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user