aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/SettingToggle.vue
diff options
context:
space:
mode:
authorEvan Steinkerchner <esteinkerchner@gmail.com>2022-03-13 15:00:09 -0400
committerGitHub <noreply@github.com>2022-03-13 15:00:09 -0400
commit049610bc9178a57732356801e20488cf669eda5e (patch)
tree321d3bad29b06777514c1f0ea8f7ae07f32089b6 /src/components/SettingToggle.vue
parentf3980069351ec91bea1999e5efff5c343a808706 (diff)
parent5db2414d052af629e2848f53ce9c2e0e686eefaf (diff)
downloadhomer-049610bc9178a57732356801e20488cf669eda5e.tar.gz
homer-049610bc9178a57732356801e20488cf669eda5e.tar.zst
homer-049610bc9178a57732356801e20488cf669eda5e.zip
Merge pull request #311 from Aryess/main
Fix #121 - Change default theme and layout from config
Diffstat (limited to 'src/components/SettingToggle.vue')
-rw-r--r--src/components/SettingToggle.vue3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/SettingToggle.vue b/src/components/SettingToggle.vue
index 985ca84..6c8a10f 100644
--- a/src/components/SettingToggle.vue
+++ b/src/components/SettingToggle.vue
@@ -12,6 +12,7 @@ export default {
12 name: String, 12 name: String,
13 icon: String, 13 icon: String,
14 iconAlt: String, 14 iconAlt: String,
15 defaultValue: Boolean,
15 }, 16 },
16 data: function () { 17 data: function () {
17 return { 18 return {
@@ -24,6 +25,8 @@ export default {
24 25
25 if (this.name in localStorage) { 26 if (this.name in localStorage) {
26 this.value = JSON.parse(localStorage[this.name]); 27 this.value = JSON.parse(localStorage[this.name]);
28 } else {
29 this.value = this.defaultValue;
27 } 30 }
28 31
29 this.$emit("updated", this.value); 32 this.$emit("updated", this.value);