Skip to content

Commit

Permalink
show update notification once, add new blog post link to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mbektas committed Mar 3, 2024
1 parent c23e960 commit a5cd919
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
47 changes: 26 additions & 21 deletions src/main/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,29 +532,34 @@ export class JupyterApplication implements IApplication, IDisposable {
}

private _setupAutoUpdater() {
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
const dialogOpts: Electron.MessageBoxOptions = {
type: 'info',
buttons: ['Restart', 'Later'],
title: 'Application Update',
message: process.platform === 'win32' ? releaseNotes : releaseName,
detail:
'A new version has been downloaded. Restart the application to apply the updates.'
};
autoUpdater.once(
'update-downloaded',
(event, releaseNotes, releaseName) => {
const dialogOpts: Electron.MessageBoxOptions = {
type: 'info',
buttons: ['Restart', 'Later'],
title: 'Application Update',
message: process.platform === 'win32' ? releaseNotes : releaseName,
detail:
'A new version has been downloaded. Restart the application to apply the updates.'
};

dialog.showMessageBox(dialogOpts).then(returnValue => {
if (returnValue.response === 0) {
if (
userSettings.getValue(SettingType.updateBundledEnvAutomatically) &&
bundledEnvironmentIsInstalled()
) {
appData.updateBundledEnvOnRestart = true;
appData.save();
dialog.showMessageBox(dialogOpts).then(returnValue => {
if (returnValue.response === 0) {
if (
userSettings.getValue(
SettingType.updateBundledEnvAutomatically
) &&
bundledEnvironmentIsInstalled()
) {
appData.updateBundledEnvOnRestart = true;
appData.save();
}
autoUpdater.quitAndInstall();
}
autoUpdater.quitAndInstall();
}
});
});
});
}
);

autoUpdater.on('error', message => {
log.error('There was a problem updating the application');
Expand Down
1 change: 1 addition & 0 deletions troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ You can use the CLI commands to list and change project setting overrides. See [

This repo contains the most up to date documentation on JupyterLab Desktop. However you can refer to the Jupyter blog posts on JLD for more context and information on the application. Below are the links to the blog posts.

- [Python environment management using JupyterLab Desktop CLI (03/01/2024)](https://blog.jupyter.org/python-environment-management-using-jupyterlab-desktop-cli-e57485c9287c)
- [Python environment management in JupyterLab Desktop (02/20/2024)](https://blog.jupyter.org/python-environment-management-in-jupyterlab-desktop-3b119c5811d9)
- [Introducing the new JupyterLab Desktop! (02/09/2023)](https://blog.jupyter.org/introducing-the-new-jupyterlab-desktop-bca1982bdb23)
- [JupyterLab Desktop — 2022 recap (12/13/2022)](https://blog.jupyter.org/jupyterlab-desktop-2022-recap-28bdf00205c6)
Expand Down

0 comments on commit a5cd919

Please sign in to comment.