aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/SaveBar.qml
AgeCommit message (Collapse)AuthorFilesLines
6 dayssettings: every page commits from the headerDanilo M.1-5/+11
The Mail, Assistant and Ask presets pages got a Save and Discard pair in the page header; the rest still had their own buttons wherever their page put them: User's Save at the bottom, Wallpaper's Apply and Reset beside the mock screens, Icons' Apply and Reset under the cursor cards, HyprSunset's and HyprIdle's Save + Restart in the page. They now all sit in the header SaveBar, which takes the page's own verbs (Apply and Reset, Save + Restart) and a busy state. HyprSunset and HyprIdle had no notion of an unsaved change, so their button was always live. They now count as changed when what save() would write differs from what was read, which enables Save only then, gives Discard (a reload) something to drop, and marks them in the sidebar; a window open no longer reloads them over unsaved edits. The staged cursor moved from IconsTab into the Icons singleton so the header and the sidebar can see it. Git and autostart act a row at a time, and a theme applies on click, so those have no bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 dayssettings: pages edit a draft, and Save writes itDanilo M.1-0/+43
The qtmaildir, Assistant and Ask presets pages wrote a field on Enter, and a switch or chip the moment it was clicked, so a half-finished change reached the file and a slip could not be taken back. They now edit a draft as fields are typed, and a Save and Discard pair in the page header (SaveBar, through Page.actions) writes or drops it. Save waits while a field holds a value that cannot be written, and a draft over a file that changed on disk meanwhile is refused at Save rather than written over it. A dot in the sidebar marks a page with unsaved edits; drafts survive moving between pages. The four Mail pages share one draft, since they are one file. Tool switches are staged too and renamed on Save; model Load, Prefer and Restart stay immediate, being actions rather than settings. Live editing needed two rules. A field is no longer bound to its value, which would reset the cursor and eat a typed trailing space; it follows the value only when the draft moves under it. And a Repeater's model is now the set of row keys (or a count), assigned only when that set changes: an array rebuilt from the draft on each keystroke recreates every row, including the one being typed in, which loses its focus. Git, autostart's rows, HyprSunset, HyprIdle and User keep their own buttons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>