feat(options): restart when setting locale

This commit is contained in:
Elian Doran
2025-03-25 20:15:39 +02:00
parent a5a7a30cd5
commit ab58671625
3 changed files with 14 additions and 5 deletions

View File

@@ -61,11 +61,7 @@ export default class ElectronIntegrationOptions extends OptionsWidget {
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();
});
restartAppButton.on("click", utils.restartDesktopApp);
}
isEnabled() {

View File

@@ -59,6 +59,7 @@ export default class LocalizationOptions extends OptionsWidget {
this.$formattingLocaleSelect.on("change", async () => {
const newLocale = this.$formattingLocaleSelect.val();
await server.put(`options/formattingLocale/${newLocale}`);
utils.restartDesktopApp();
});
this.$widget.find(`input[name="first-day-of-week"]`).on("change", () => {