2 <a v-on:click="toggleSetting()" class="navbar-item is-inline-block-mobile">
3 <span><i :class="['fas', 'fa-fw', value ? icon : secondaryIcon]"></i></span>
10 name: "SettingToggle",
15 defaultValue: Boolean,
23 created: function () {
24 this.secondaryIcon = this.iconAlt || this.icon;
26 if (this.name in localStorage) {
27 this.value = JSON.parse(localStorage[this.name]);
29 this.value = this.defaultValue;
32 this.$emit("updated", this.value);
35 toggleSetting: function () {
36 this.value = !this.value;
37 localStorage[this.name] = this.value;
38 this.$emit("updated", this.value);