Remember appearance sub tab in settings UI.

This commit is contained in:
Kailash Nadh 2022-02-12 17:13:45 +05:30
parent 481d6ef0a2
commit 0ecfb89f19
2 changed files with 12 additions and 2 deletions

View file

@ -243,7 +243,6 @@ export default Vue.extend({
},
watch: {
// Capture contentType and body passed from the parent as props.
tab(t) {
this.$utils.setPref('settings.tab', t);
},

View file

@ -1,6 +1,6 @@
<template>
<div class="items">
<b-tabs :animated="false">
<b-tabs :animated="false" v-model="tab">
<b-tab-item :label="$t('settings.appearance.adminName')" label-position="on-border">
<div class="block">
{{ $t('settings.appearance.adminHelp') }}
@ -55,9 +55,20 @@ export default Vue.extend({
data() {
return {
data: this.form,
tab: 0,
};
},
mounted() {
this.tab = this.$utils.getPref('settings.apperanceTab') || 0;
},
watch: {
tab(t) {
this.$utils.setPref('settings.apperanceTab', t);
},
},
computed: {
...mapState(['settings']),
},