1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-02 20:30:05 +02:00

13 Commits

Author SHA1 Message Date
s2
16138409f9 2.0.12 2020-12-11 12:34:12 +01:00
s2
f604749ce8 update electron 2020-12-11 12:33:55 +01:00
s2
a259bd3e14 2.0.11 2020-10-16 12:01:12 +02:00
s2
e3ed1c6e44 update node modules 2020-10-16 12:00:49 +02:00
s2
5d60c8baac 2.0.10 2020-09-13 12:53:00 +02:00
s2
8afc7fdac1 update node modules 2020-09-13 12:52:30 +02:00
s2
e934617a03 ask if the update should be downloaded 2020-09-13 12:52:22 +02:00
s2
9f696e12f9 2.0.9 2020-09-13 10:24:36 +02:00
s2
b326c45593 update node modules 2020-09-13 10:24:23 +02:00
s2
c905040f0e 2.0.8 2020-07-21 14:29:51 +02:00
s2
a171760bd6 update npm modules 2020-07-21 14:29:38 +02:00
s2
ce50a38e35 2.0.7 2020-07-07 11:50:30 +02:00
s2
133f72df2a fix updater 2020-07-07 11:50:21 +02:00
4 changed files with 511 additions and 461 deletions

View File

@@ -13,15 +13,18 @@
//update stuff
ipcRenderer.on('update', (event, state) => {
if (state.event === 'updateAvailable') {
$('.js-updatenotice').text(`New version ${state.version} available. Downloading...`);
$('.js-updatenotice').prop('disabled', true);
$('.js-updatenotice').text(`New version ${state.version} available. Click here to download.`);
$('.js-updatenotice').show();
$('.js-updatenotice').prop('disabled', false);
$('.js-updatenotice').prop('state', 'ready-to-download');
$('.js-updatenotice').data('asset', state.asset);
}
if (state.event === 'updateReadyToInstall') {
$('.js-updatenotice').text(`New version ready to install. Click here to start installer.`);
$('.js-updatenotice').show();
$('.js-updatenotice').prop('disabled', false);
$('.js-updatenotice').prop('state', 'ready-to-install');
$('.js-updatenotice').data('file', state.file);
}
});
@@ -31,9 +34,16 @@
if ($('.js-updatenotice').prop('disabled')) {
return;
}
if ($('.js-updatenotice').prop('state') === 'ready-to-download') {
$('.js-updatenotice').prop('disabled', true);
$('.js-updatenotice').text(`Downloading new version...`);
ipcRenderer.send('downloadUpdate', $('.js-updatenotice').data('asset'));
} else if ($('.js-updatenotice').prop('state') === 'ready-to-install') {
$('.js-updatenotice').prop('disabled', true);
$('.js-updatenotice').text(`Launching installer...`);
ipcRenderer.send('installUpdate', $('.js-updatenotice').data('file'));
}
});
//end update stuff

View File

@@ -26,9 +26,9 @@ if (process.platform === 'win32') {
gau.onUpdateAvailable = (version, asset) => {
win.webContents.send('update', {
event: 'updateAvailable',
version: version
version: version,
asset: asset
});
gau.downloadNewVersion(asset);
};
gau.onNewVersionReadyToInstall = (file) => {
@@ -38,11 +38,16 @@ if (process.platform === 'win32') {
});
};
ipcMain.on('downloadUpdate', (event, asset) => {
gau.downloadNewVersion(asset);
});
ipcMain.on('installUpdate', (event, file) => {
gau.executeUpdate(file);
win.webContents.send('update', {
event: 'updateInstalling'
});
app.quit();
});
}, 5000);
}
@@ -267,9 +272,3 @@ ipcMain.on('restart', (event, newRepoDir) => {
app.on('ready', () => {
startup(createWindow);
});
app.on('window-all-closed', function() {
if (process.platform != 'darwin') {
app.quit();
}
});

921
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "gitlit",
"version": "2.0.6",
"version": "2.0.12",
"description": "",
"main": "app/main.js",
"build": {
@@ -27,13 +27,13 @@
}
},
"dependencies": {
"animate.css": "^3.5.2",
"bootstrap": "^4.5.0",
"ejs": "^3.1.3",
"animate.css": "^4.1.1",
"bootstrap": "^4.5.3",
"ejs": "^3.1.5",
"ejs-render-remote": "^1.0.13",
"electron-find": "^1.0.6",
"electron-localshortcut": "^3.2.1",
"github-app-updater": "^1.0.4",
"github-app-updater": "^1.0.5",
"jquery": "^3.5.1",
"material-design-icons": "^3.0.1",
"minimist": "^1.2.5",
@@ -42,8 +42,8 @@
"popper.js": "^1.16.1"
},
"devDependencies": {
"electron": "^9.1.0",
"electron-builder": "^22.7.0"
"electron": "^11.0.4",
"electron-builder": "^22.9.1"
},
"scripts": {
"start": "electron .",