diff options
Diffstat (limited to 'desktop/modules/appearance/SunsetModule.qml')
| -rw-r--r-- | desktop/modules/appearance/SunsetModule.qml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/desktop/modules/appearance/SunsetModule.qml b/desktop/modules/appearance/SunsetModule.qml index 557a2a4..d55d874 100644 --- a/desktop/modules/appearance/SunsetModule.qml +++ b/desktop/modules/appearance/SunsetModule.qml @@ -19,14 +19,20 @@ Module { // nf-fa-moon_o, present in Inconsolata Nerd Font. icon: "\uf186" settings: true + dirty: Hyprsunset.dirty group: "Desktop" keywords: ["hyprsunset", "night", "light", "temperature", "gamma", "location", "profile"] - function refresh() { Hyprsunset.refresh(); } + // Not over unsaved edits: the reload would drop them. + function refresh() { if (!Hyprsunset.dirty) Hyprsunset.refresh(); } page: Component { Page { title: "HyprSunset" + actions: Component { + SaveBar { saveText: "Save + Restart"; dirty: Hyprsunset.dirty + onSave: Hyprsunset.save(); onDiscard: Hyprsunset.refresh() } + } SunsetTab { width: parent.width } } } |
