1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00

4.0.0-rc19.1

* Changed: Remember which sections of the settings menu a user has expanded and restore that state when re-opening the menu.
* Changed: Begin tracking which settings a user has seen, so that a future update can begin highlighting newly added settings.
* Changed: Clean up the new localization code a bit more.
This commit is contained in:
SirStendec 2019-05-03 22:36:26 -04:00
parent 35316b8827
commit 3e9e1b2ede
21 changed files with 242 additions and 38 deletions

View file

@ -27,9 +27,10 @@
:class="{'active': selected === idx, 'ffz-unmatched-item': showing && ! shouldShow(i)}"
role="tab"
class="tab tw-pd-y-05 tw-pd-x-1"
@click="selected = idx"
@click="select(idx)"
>
{{ t(i.i18n_key, i.title, i) }}
<span v-if="i.unseen > 0" class="tw-pill">{{ i.unseen }}</span>
</div>
</header>
<section
@ -81,6 +82,10 @@ export default {
}
},
mounted() {
this.markSeen()
},
methods: {
focus() {
this.$el.querySelector('header').focus();
@ -106,22 +111,37 @@ export default {
this.lastTab();
},
markSeen() {
this.$emit('mark-seen', this.item.tabs[this.selected]);
},
firstTab() {
this.selected = 0;
this.markSeen();
},
lastTab() {
this.selected = this.item.tabs.length - 1;
this.markSeen();
},
prevTab() {
if ( this.selected > 0 )
if ( this.selected > 0 ) {
this.selected--;
this.markSeen();
}
},
select(idx) {
this.selected = idx;
this.markSeen();
},
nextTab() {
if ( this.selected + 1 < this.item.tabs.length )
if ( this.selected + 1 < this.item.tabs.length ) {
this.selected++;
this.markSeen();
}
},
shouldShow(item) {