aboutsummaryrefslogtreecommitdiffstats
path: root/src/enforce-macos-app-location.ts
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-10-15 09:48:06 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-15 09:48:06 +0200
commit14d2364fc69e0222133115c55a36286986006098 (patch)
tree9e9b3c41ef742bbe87ca1632b292c67043051957 /src/enforce-macos-app-location.ts
parent5.6.3-nightly.34 [skip ci] (diff)
downloadferdium-app-14d2364fc69e0222133115c55a36286986006098.tar.gz
ferdium-app-14d2364fc69e0222133115c55a36286986006098.tar.zst
ferdium-app-14d2364fc69e0222133115c55a36286986006098.zip
chore: update eslint setup (#2074)
Diffstat (limited to 'src/enforce-macos-app-location.ts')
-rw-r--r--src/enforce-macos-app-location.ts18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/enforce-macos-app-location.ts b/src/enforce-macos-app-location.ts
index 0f858013d..0e6bf9ecc 100644
--- a/src/enforce-macos-app-location.ts
+++ b/src/enforce-macos-app-location.ts
@@ -12,11 +12,9 @@ export function enforceMacOSAppLocation() {
12 const clickedButtonIndex = api.dialog.showMessageBoxSync({ 12 const clickedButtonIndex = api.dialog.showMessageBoxSync({
13 type: 'error', 13 type: 'error',
14 message: 'Move to Applications folder?', 14 message: 'Move to Applications folder?',
15 detail: 'Ferdi must live in the Applications folder to be able to run correctly.', 15 detail:
16 buttons: [ 16 'Ferdi must live in the Applications folder to be able to run correctly.',
17 'Move to Applications folder', 17 buttons: ['Move to Applications folder', 'Quit Ferdi'],
18 'Quit Ferdi',
19 ],
20 defaultId: 0, 18 defaultId: 0,
21 cancelId: 1, 19 cancelId: 1,
22 }); 20 });
@@ -28,13 +26,13 @@ export function enforceMacOSAppLocation() {
28 26
29 api.app.moveToApplicationsFolder({ 27 api.app.moveToApplicationsFolder({
30 conflictHandler: conflict => { 28 conflictHandler: conflict => {
31 if (conflict === 'existsAndRunning') { // Can't replace the active version of the app 29 if (conflict === 'existsAndRunning') {
30 // Can't replace the active version of the app
32 api.dialog.showMessageBoxSync({ 31 api.dialog.showMessageBoxSync({
33 type: 'error', 32 type: 'error',
34 message: 'Another version of Ferdi is currently running. Quit it, then launch this version of the app again.', 33 message:
35 buttons: [ 34 'Another version of Ferdi is currently running. Quit it, then launch this version of the app again.',
36 'OK', 35 buttons: ['OK'],
37 ],
38 }); 36 });
39 37
40 api.app.quit(); 38 api.app.quit();