Add Zotero.isBetaBuild and fix Zotero.isDevBuild

Previously `isDevBuild` was true for beta, dev, or source builds (but
also wasn't used anywhere)
This commit is contained in:
Dan Stillman 2024-05-29 06:48:12 -04:00
parent e96426d18c
commit 08ffa64abf
2 changed files with 5 additions and 6 deletions

View file

@ -229,11 +229,10 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
this.isClient = true;
this.isStandalone = true;
Zotero.version = Services.appinfo.version;
Zotero.isDevBuild = Zotero.version.includes('beta')
|| Zotero.version.includes('dev')
|| Zotero.version.includes('SOURCE');
Zotero.isSourceBuild = Zotero.version.includes('SOURCE');
this.version = Services.appinfo.version;
this.isBetaBuild = Zotero.version.includes('-beta');
this.isDevBuild = Zotero.version.includes('-dev');
this.isSourceBuild = Zotero.version.includes('SOURCE');
// OS platform
var win = Components.classes["@mozilla.org/appshell/appShellService;1"]

View file

@ -511,7 +511,7 @@ var ZoteroPane = new function()
// Show warning in toolbar for 'dev' channel builds and troubleshooting mode
try {
let afterElement = 'zotero-tb-tabs-menu';
let isDevBuild = Zotero.version.includes('-dev');
let isDevBuild = Zotero.isDevBuild;
let isSafeMode = Services.appinfo.inSafeMode;
// Uncomment to test
//isDevBuild = true;