Skip to content

Commit

Permalink
Remember appearance sub tab in settings UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Feb 12, 2022
1 parent 481d6ef commit 0ecfb89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 0 additions & 1 deletion frontend/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down
13 changes: 12 additions & 1 deletion frontend/src/views/settings/appearance.vue
Original file line number Diff line number Diff line change
@@ -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') }}
Expand Down Expand Up @@ -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']),
},
Expand Down

0 comments on commit 0ecfb89

Please sign in to comment.