Renamed variable to make more sense

This commit is contained in:
2022-03-04 18:24:53 +01:00
parent fc2b139653
commit b9f39e690d

View File

@@ -8,7 +8,7 @@
export default {
data() {
return {
darkmode: this.supported()
darkmode: this.systemDarkModeEnabled()
};
},
methods: {
@@ -16,7 +16,7 @@ export default {
this.darkmode = !this.darkmode;
document.body.className = this.darkmode ? "dark" : "light";
},
supported() {
systemDarkModeEnabled() {
const computedStyle = window.getComputedStyle(document.body);
if (computedStyle["colorScheme"] != null) {
return computedStyle.colorScheme.includes("dark");