0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-19 18:32:39 +00:00

Make the renderSaveButton() function common between edit/new/home

Each of the edit/home/new pages renders its save button differently. This makes it a common function with all the same possible render states (does the document have unsaved changes? Is it already saved? Was it auto-saved?).

- Common save button
- Adds the "save" button to /home page which wasn't there before
- Animates the "save" button in /home and /new when the user makes their first change to signal that yes, you do have to actually click the save button if you want to keep this.
- "reminder... you haven't saved for X minutes" still not functional on /new and /home since that involves more moving pieces.
This commit is contained in:
Trevor Buckner
2025-10-05 21:57:19 -04:00
parent a944b23ca0
commit 41aebf084b
5 changed files with 93 additions and 18 deletions

View File

@@ -1,6 +1,12 @@
.newPage {
.navItem.save {
.fadeInRight();
.transition(opacity);
background-color : @orange;
&:hover { background-color : @green; }
&.neverSaved {
.fadeOutRight();
opacity: 0;
}
}
}