aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.ts
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2024-05-08 02:54:03 +0100
committerLibravatar GitHub <noreply@github.com>2024-05-08 07:24:03 +0530
commitb0fa45f1840b3dc369b474d8820a5914bbcb5b69 (patch)
tree023319639e9a0edff363b7b93c106e466843ece8 /src/index.ts
parent6.7.4-nightly.6 [skip ci] (diff)
downloadferdium-app-b0fa45f1840b3dc369b474d8820a5914bbcb5b69.tar.gz
ferdium-app-b0fa45f1840b3dc369b474d8820a5914bbcb5b69.tar.zst
ferdium-app-b0fa45f1840b3dc369b474d8820a5914bbcb5b69.zip
feat: prompt the user to restart ferdium on some settings changes (#1748)
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/index.ts b/src/index.ts
index 09e411e13..13265cc07 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -794,3 +794,15 @@ app.on(
794 callback(checkIfCertIsPresent(certificate.data)); 794 callback(checkIfCertIsPresent(certificate.data));
795 }, 795 },
796); 796);
797
798ipcMain.on('relaunch-app', async (_, options) => {
799 // Ask user to confirm
800 const result = await dialog.showMessageBox(mainWindow!, options);
801
802 if (result.response === options.cancelId) {
803 return;
804 }
805
806 app.relaunch();
807 app.quit();
808});