config: null,
offline: false,
filter: '',
- vlayout: true
+ vlayout: true,
+ overrideDark: null
},
created: function () {
let that = this;
}
}, false);
},
+ computed: {
+ isDark: function() {
+ return this.overrideDark !== null
+ ? this.overrideDark
+ : matchMedia("(prefers-color-scheme: dark)").matches;
+ }
+ },
methods: {
checkOffline: function () {
let that = this;
});
});
},
+ toggleTheme: function() {
+ this.overrideDark = !this.isDark;
+ }
}
});