Light up "what's new" when upgrading extension.

This commit is contained in:
Tamius Han 2019-07-07 15:12:15 +02:00
parent 4cd67161ba
commit cce3a677bb
4 changed files with 22 additions and 1 deletions

View File

@ -836,6 +836,7 @@ var ExtensionConf = {
}
},
],
whatsNewChecked: true,
// -----------------------------------------
// ::: SITE CONFIGURATION :::
// -----------------------------------------

View File

@ -129,6 +129,9 @@ class Settings {
// in case settings in previous version contained a fucky wucky, we overwrite existing settings with a patch
ObjectCopy.overwrite(this.active, ExtensionConfPatch['4.2.0']);
// set 'whatsNewChecked' flag to false when updating
this.active.whatsNewChecked = false;
this.set(this.active);
return this.active;
}

View File

@ -100,7 +100,8 @@
:class="{'selected-tab': selectedTab === 'whats-new'}"
@click="selectTab('whats-new')"
>
<div class="">
<div :class="{'new': !settings.active.whatsNewChecked}"
>
What's new?
</div>
<div class="">
@ -256,6 +257,10 @@ export default {
},
selectTab(tab) {
this.selectedTab = tab;
if (tab === 'whats-new') {
this.settings.active.whatsNewChecked = true;
this.settings.save();
}
},
selectFrame(frame) {
this.selectedFrame = frame;

View File

@ -332,6 +332,18 @@ small {
padding-right: 10px;
}
.new {
color: #fff;
}
.new::after {
content: "";
color: $info-color !important;
display: inline-block;
font-weight: bold;
padding-right: 10px;
}
.experimental::after {
// content: "Experimental";
content: "";