Skip to content

Commit 0ecfb89

Browse files
committed
Remember appearance sub tab in settings UI.
1 parent 481d6ef commit 0ecfb89

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

frontend/src/views/Settings.vue

-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ export default Vue.extend({
243243
},
244244
245245
watch: {
246-
// Capture contentType and body passed from the parent as props.
247246
tab(t) {
248247
this.$utils.setPref('settings.tab', t);
249248
},

frontend/src/views/settings/appearance.vue

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="items">
3-
<b-tabs :animated="false">
3+
<b-tabs :animated="false" v-model="tab">
44
<b-tab-item :label="$t('settings.appearance.adminName')" label-position="on-border">
55
<div class="block">
66
{{ $t('settings.appearance.adminHelp') }}
@@ -55,9 +55,20 @@ export default Vue.extend({
5555
data() {
5656
return {
5757
data: this.form,
58+
tab: 0,
5859
};
5960
},
6061
62+
mounted() {
63+
this.tab = this.$utils.getPref('settings.apperanceTab') || 0;
64+
},
65+
66+
watch: {
67+
tab(t) {
68+
this.$utils.setPref('settings.apperanceTab', t);
69+
},
70+
},
71+
6172
computed: {
6273
...mapState(['settings']),
6374
},

0 commit comments

Comments
 (0)