From 1e985f78583a9bbcdedc7d953b79c9a462fb0fb7 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 9 Dec 2024 22:36:46 +0200 Subject: [PATCH] feat(settings): add button to restart application --- .../options/appearance/electron_integration.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/public/app/widgets/type_widgets/options/appearance/electron_integration.js b/src/public/app/widgets/type_widgets/options/appearance/electron_integration.js index 8a63d5555..a659227a9 100644 --- a/src/public/app/widgets/type_widgets/options/appearance/electron_integration.js +++ b/src/public/app/widgets/type_widgets/options/appearance/electron_integration.js @@ -20,8 +20,10 @@ const TPL = ` Enable background effects (Windows 11 only)

On the desktop application, it's possible to use a semi-transparent background tinted in the colors of the user's wallpaper to add a touch of color.

- + + + `; @@ -36,9 +38,13 @@ export default class ElectronIntegrationOptions extends OptionsWidget { }); this.$backgroundEffects = this.$widget.find("input.background-effects"); - this.$backgroundEffects.on("change", async () => { - await this.updateCheckboxOption("backgroundEffects", this.$backgroundEffects); - utils.reloadFrontendApp("background effect change"); + this.$backgroundEffects.on("change", () => this.updateCheckboxOption("backgroundEffects", this.$backgroundEffects)); + + const restartAppButton = this.$widget.find(".restart-app-button"); + restartAppButton.on("click", () => { + const app = utils.dynamicRequire('@electron/remote').app; + app.relaunch(); + app.exit(); }); }