From b9f39e690da6fbac48bf180ade2c4f1646d8103e Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Fri, 4 Mar 2022 18:24:53 +0100 Subject: [PATCH] Renamed variable to make more sense --- src/components/ui/darkmodeToggle.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ui/darkmodeToggle.vue b/src/components/ui/darkmodeToggle.vue index 5858514..5881982 100644 --- a/src/components/ui/darkmodeToggle.vue +++ b/src/components/ui/darkmodeToggle.vue @@ -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");