Keldos commited on
Commit
f1f92ba
·
1 Parent(s): 7c42784

fix: 修复更新最新版但降级后提示更新问题

Browse files
Files changed (1) hide show
  1. web_assets/javascript/updater.js +4 -0
web_assets/javascript/updater.js CHANGED
@@ -86,12 +86,16 @@ async function updateLatestVersion() {
86
  versionInfoElement.innerHTML = marked.parse(infoMessage, {mangle: false, headerIds: false});
87
  console.log(`New version ${latestVersion} found!`);
88
  disableUpdateBtn_enableCancelBtn();
 
 
89
  } else if (localVersionTime < latestVersionTime) {
90
  const infoMessage = `Local version check failed, it seems to be a local rivision. \n\nBut latest revision is ${latestVersionInfo}. Try ${manualUpdateInfo}.`
91
  versionInfoElement.innerHTML = marked.parse(infoMessage, {mangle: false, headerIds: false});
92
  console.log(`New version ${latestVersion} found!`);
93
  disableUpdateBtn_enableCancelBtn();
94
  // if (!isInIframe) openUpdateToast();
 
 
95
  } else {
96
  noUpdate("Local version check failed, it seems to be a local rivision. <br>But your revision is newer than the latest release.");
97
  }
 
86
  versionInfoElement.innerHTML = marked.parse(infoMessage, {mangle: false, headerIds: false});
87
  console.log(`New version ${latestVersion} found!`);
88
  disableUpdateBtn_enableCancelBtn();
89
+ localStorage.setItem('isLatestVersion', 'false');
90
+ isLatestVersion = false;
91
  } else if (localVersionTime < latestVersionTime) {
92
  const infoMessage = `Local version check failed, it seems to be a local rivision. \n\nBut latest revision is ${latestVersionInfo}. Try ${manualUpdateInfo}.`
93
  versionInfoElement.innerHTML = marked.parse(infoMessage, {mangle: false, headerIds: false});
94
  console.log(`New version ${latestVersion} found!`);
95
  disableUpdateBtn_enableCancelBtn();
96
  // if (!isInIframe) openUpdateToast();
97
+ localStorage.setItem('isLatestVersion', 'false');
98
+ isLatestVersion = false;
99
  } else {
100
  noUpdate("Local version check failed, it seems to be a local rivision. <br>But your revision is newer than the latest release.");
101
  }