commit
9fb51c57b3
|
@ -76,6 +76,8 @@
|
||||||
if (cat.settings.find(s => s.id === setting.id).value !== setting.value) {
|
if (cat.settings.find(s => s.id === setting.id).value !== setting.value) {
|
||||||
changed = true;
|
changed = true;
|
||||||
setting.changed = true;
|
setting.changed = true;
|
||||||
|
} else {
|
||||||
|
setting.changed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<div class="bd-setting-switch">
|
<div class="bd-setting-switch">
|
||||||
<div class="bd-title">
|
<div class="bd-title">
|
||||||
<h3>{{setting.text}}</h3>
|
<h3>{{setting.text}}</h3>
|
||||||
<label class="bd-switch-wrapper">
|
<label class="bd-switch-wrapper" @click="toggle">
|
||||||
<input type="checkbox" class="bd-switch-checkbox" />
|
<input type="checkbox" class="bd-switch-checkbox" />
|
||||||
<div class="bd-switch" :class="{'bd-checked': setting.value}" />
|
<div class="bd-switch" :class="{'bd-checked': setting.value}" />
|
||||||
</label>
|
</label>
|
||||||
|
@ -22,6 +22,11 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: ['setting', 'change']
|
props: ['setting', 'change'],
|
||||||
|
methods: {
|
||||||
|
toggle() {
|
||||||
|
this.change(this.setting.id, !this.setting.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue