suppress 'updated' for new installs

This commit is contained in:
Alex Pankratov
2021-04-10 14:32:14 +02:00
parent a1b319d6f6
commit 196e00edaf

View File

@@ -1774,6 +1774,7 @@
openInner() openInner()
{ {
var conf = this.getJson('config'); var conf = this.getJson('config');
var newInstall = true;
if (conf && (conf.format != NB.confVersion)) if (conf && (conf.format != NB.confVersion))
{ {
@@ -1789,9 +1790,6 @@
} }
else else
{ {
this.conf.verLast = 20210327;
this.conf.verSeen = 20200220; // 20200429;
this.conf.theme = this.getItem('theme'); this.conf.theme = this.getItem('theme');
if (this.getItem('fsize') == 'z1') if (this.getItem('fsize') == 'z1')
@@ -1855,6 +1853,8 @@
if (! m) if (! m)
continue; continue;
newInstall = false;
var board_id = parseInt(m[1]); var board_id = parseInt(m[1]);
if (this.boardIndex.has(board_id)) if (this.boardIndex.has(board_id))
continue; continue;
@@ -1870,6 +1870,12 @@
if (this.conf.board && ! this.boardIndex.has(this.conf.board)) if (this.conf.board && ! this.boardIndex.has(this.conf.board))
this.conf.board = null; this.conf.board = null;
if (! conf && ! newInstall) // pre-20210410 upgrade
{
this.conf.verLast = 20210327;
this.conf.verSeen = 20200220; // 20200429;
}
this.type = 'LocalStorage'; this.type = 'LocalStorage';
return true; return true;
@@ -2954,7 +2960,7 @@
{ {
var conf = NB.storage.getConfig(); var conf = NB.storage.getConfig();
if (conf.verSeen < NB.codeVersion) if (conf.verSeen && conf.verSeen < NB.codeVersion)
{ {
$('.logo').addClass('updated'); $('.logo').addClass('updated');
$('.logo .alert').html("(updated)"); $('.logo .alert').html("(updated)");