mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-08-03 19:38:36 -04:00
Embargo updates from Win7/8/8.1
Fixes #593. # Conflicts: # www/js/init.js
This commit is contained in:
parent
67579ae54b
commit
9f8a1084ed
@ -1013,14 +1013,17 @@ function checkUpdateServer () {
|
||||
});
|
||||
// Electron updates
|
||||
if (window.electronAPI) {
|
||||
var electronVersion = navigator.userAgent.replace(/^.*Electron.([\d.]+).*/i, '$1');
|
||||
var isUpdateableElectronVersion = !electronVersion.startsWith(params.win7ElectronVersion);
|
||||
var baseApp = (params.packagedFile && /wikivoyage/.test(params.packagedFile)) ? 'wikivoyage'
|
||||
: (params.packagedFile && /wikmed|mdwiki/.test(params.packagedFile)) ? 'wikimed'
|
||||
: 'electron';
|
||||
if (baseApp === 'electron') {
|
||||
if (baseApp === 'electron' && isUpdateableElectronVersion) {
|
||||
console.log('Launching Electron auto-updater...');
|
||||
electronAPI.checkForUpdates();
|
||||
} else {
|
||||
console.log('Auto-update: Packaged apps with large ZIM archives are not currently auto-updated.');
|
||||
console.log('Auto-update: ' + (isUpdateableElectronVersion ? 'Packaged apps with large ZIM archives are not currently'
|
||||
: 'Versions for Windows 7+ 32bit cannot be') + ' auto-updated.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ params['cachedStartPages'] = {
|
||||
// 'mdwiki_en_all_maxi': 'A/Wikipedia:WikiProject_Medicine/Open_Textbook_of_Medicine2',
|
||||
wikivoyage_en_all_maxi: 'A/Main_Page'
|
||||
};
|
||||
params['win7ElectronVersion'] = '22.3'; // KEEP UP TO DATE!!! This is the last minor version to support Win 7/8/8.1. Auto-update is embargoed for values starting with this.
|
||||
params['kiwixDownloadLink'] = 'https://download.kiwix.org/zim/'; // Include final slash
|
||||
params['kiwixHiddenDownloadLink'] = 'https://master.download.kiwix.org/zim/';
|
||||
/** ***** DEV: ENSURE SERVERS BELOW ARE LISTED IN package.appxmanifest ************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user