mirror of
https://github.com/S2-/gitlit
synced 2025-08-02 20:30:05 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
a259bd3e14
|
|||
e3ed1c6e44
|
|||
5d60c8baac
|
|||
8afc7fdac1
|
|||
e934617a03
|
|||
9f696e12f9
|
|||
b326c45593
|
|||
c905040f0e
|
|||
a171760bd6
|
@@ -13,15 +13,18 @@
|
|||||||
//update stuff
|
//update stuff
|
||||||
ipcRenderer.on('update', (event, state) => {
|
ipcRenderer.on('update', (event, state) => {
|
||||||
if (state.event === 'updateAvailable') {
|
if (state.event === 'updateAvailable') {
|
||||||
$('.js-updatenotice').text(`New version ${state.version} available. Downloading...`);
|
$('.js-updatenotice').text(`New version ${state.version} available. Click here to download.`);
|
||||||
$('.js-updatenotice').prop('disabled', true);
|
|
||||||
$('.js-updatenotice').show();
|
$('.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') {
|
if (state.event === 'updateReadyToInstall') {
|
||||||
$('.js-updatenotice').text(`New version ready to install. Click here to start installer.`);
|
$('.js-updatenotice').text(`New version ready to install. Click here to start installer.`);
|
||||||
$('.js-updatenotice').show();
|
$('.js-updatenotice').show();
|
||||||
$('.js-updatenotice').prop('disabled', false);
|
$('.js-updatenotice').prop('disabled', false);
|
||||||
|
$('.js-updatenotice').prop('state', 'ready-to-install');
|
||||||
$('.js-updatenotice').data('file', state.file);
|
$('.js-updatenotice').data('file', state.file);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -31,9 +34,16 @@
|
|||||||
if ($('.js-updatenotice').prop('disabled')) {
|
if ($('.js-updatenotice').prop('disabled')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$('.js-updatenotice').prop('disabled', true);
|
|
||||||
$('.js-updatenotice').text(`Launching installer...`);
|
if ($('.js-updatenotice').prop('state') === 'ready-to-download') {
|
||||||
ipcRenderer.send('installUpdate', $('.js-updatenotice').data('file'));
|
$('.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
|
//end update stuff
|
||||||
|
|
||||||
|
@@ -26,9 +26,9 @@ if (process.platform === 'win32') {
|
|||||||
gau.onUpdateAvailable = (version, asset) => {
|
gau.onUpdateAvailable = (version, asset) => {
|
||||||
win.webContents.send('update', {
|
win.webContents.send('update', {
|
||||||
event: 'updateAvailable',
|
event: 'updateAvailable',
|
||||||
version: version
|
version: version,
|
||||||
|
asset: asset
|
||||||
});
|
});
|
||||||
gau.downloadNewVersion(asset);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
gau.onNewVersionReadyToInstall = (file) => {
|
gau.onNewVersionReadyToInstall = (file) => {
|
||||||
@@ -38,6 +38,10 @@ if (process.platform === 'win32') {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ipcMain.on('downloadUpdate', (event, asset) => {
|
||||||
|
gau.downloadNewVersion(asset);
|
||||||
|
});
|
||||||
|
|
||||||
ipcMain.on('installUpdate', (event, file) => {
|
ipcMain.on('installUpdate', (event, file) => {
|
||||||
gau.executeUpdate(file);
|
gau.executeUpdate(file);
|
||||||
win.webContents.send('update', {
|
win.webContents.send('update', {
|
||||||
|
905
package-lock.json
generated
905
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gitlit",
|
"name": "gitlit",
|
||||||
"version": "2.0.7",
|
"version": "2.0.11",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "app/main.js",
|
"main": "app/main.js",
|
||||||
"build": {
|
"build": {
|
||||||
@@ -27,13 +27,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"animate.css": "^3.5.2",
|
"animate.css": "^4.1.1",
|
||||||
"bootstrap": "^4.5.0",
|
"bootstrap": "^4.5.3",
|
||||||
"ejs": "^3.1.3",
|
"ejs": "^3.1.5",
|
||||||
"ejs-render-remote": "^1.0.13",
|
"ejs-render-remote": "^1.0.13",
|
||||||
"electron-find": "^1.0.6",
|
"electron-find": "^1.0.6",
|
||||||
"electron-localshortcut": "^3.2.1",
|
"electron-localshortcut": "^3.2.1",
|
||||||
"github-app-updater": "^1.0.4",
|
"github-app-updater": "^1.0.5",
|
||||||
"jquery": "^3.5.1",
|
"jquery": "^3.5.1",
|
||||||
"material-design-icons": "^3.0.1",
|
"material-design-icons": "^3.0.1",
|
||||||
"minimist": "^1.2.5",
|
"minimist": "^1.2.5",
|
||||||
@@ -42,8 +42,8 @@
|
|||||||
"popper.js": "^1.16.1"
|
"popper.js": "^1.16.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "^9.1.0",
|
"electron": "^10.1.3",
|
||||||
"electron-builder": "^22.7.0"
|
"electron-builder": "^22.9.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron .",
|
"start": "electron .",
|
||||||
|
Reference in New Issue
Block a user