mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
feat(settings): add button to restart application
This commit is contained in:
parent
3605a77b25
commit
1e985f7858
@ -22,6 +22,8 @@ const TPL = `
|
||||
<p>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.</p>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-micro restart-app-button">Restart the application to view the changes</button>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user