diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-05-16 15:28:30 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-05-19 10:44:56 +0200 |
| commit | c7ef0929dc76fe858a33be7945c87e27af8e5e1e (patch) | |
| tree | 29a0e02ae60a0d0f40c7a3670128e20c2dd39e0c /gui/src/main | |
| parent | aa7a8d44c32bc5fb88898b3682b7b49dd3e91fe2 (diff) | |
| download | mullvadvpn-c7ef0929dc76fe858a33be7945c87e27af8e5e1e.tar.xz mullvadvpn-c7ef0929dc76fe858a33be7945c87e27af8e5e1e.zip | |
Add command line switch for force display of changes dialog
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/index.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 622194fbd7..fc34ab2033 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -106,7 +106,10 @@ const SANDBOX_DISABLED = app.commandLine.hasSwitch('no-sandbox'); const ALLOWED_PERMISSIONS = ['clipboard-sanitized-write']; -const QUIT_WITHOUT_DISCONNECT_FLAG = '--quit-without-disconnect'; +enum Options { + quitWithoutDisconnect = '--quit-without-disconnect', + showChanges = '--show-changes', +} enum AppQuitStage { unready, @@ -260,6 +263,7 @@ class ApplicationMain { private quitWithoutDisconnect = false; private changelog?: IChangelog; + private forceShowChanges = process.argv.includes(Options.showChanges); private navigationHistory?: IHistoryObject; private scrollPositions: ScrollPositions = {}; @@ -275,7 +279,7 @@ class ApplicationMain { // This ensures that only a single instance is running at the same time, but also exits if // there's no already running instance when the quit without disconnect flag is supplied. - if (!app.requestSingleInstanceLock() || process.argv.includes(QUIT_WITHOUT_DISCONNECT_FLAG)) { + if (!app.requestSingleInstanceLock() || process.argv.includes(Options.quitWithoutDisconnect)) { this.quitWithoutDisconnect = true; app.quit(); return; @@ -327,7 +331,7 @@ class ApplicationMain { private addSecondInstanceEventHandler() { app.on('second-instance', (_event, argv, _workingDirectory) => { - if (argv.includes(QUIT_WITHOUT_DISCONNECT_FLAG)) { + if (argv.includes(Options.quitWithoutDisconnect)) { // Quit if another instance is started with the quit without disconnect flag. this.quitWithoutDisconnect = true; app.quit(); @@ -1288,6 +1292,7 @@ class ApplicationMain { windowsSplitTunnelingApplications: this.windowsSplitTunnelingApplications, macOsScrollbarVisibility: this.macOsScrollbarVisibility, changelog: this.changelog ?? [], + forceShowChanges: this.forceShowChanges, navigationHistory: this.navigationHistory, scrollPositions: this.scrollPositions, })); |
