mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 18:25:51 +01:00
feat(options): restart when setting locale
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user