Trevor Buckner
63bebe1efd
Lint everything
...
Catching up on a bunch of linting so random changes stop showing up on PRs when the linter is run.
2025-10-06 00:02:24 -04:00
Trevor Buckner
41aebf084b
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.
2025-10-05 21:57:19 -04:00
Trevor Buckner
12052853db
Merge branch 'master' into new/home/edit/_unsavedChanges_common
2025-10-05 20:07:56 -04:00
Víctor Losada Hernández
ac18f4bd1d
Merge branch 'master' of https://github.com/naturalcrit/homebrewery into fix-red-background
2025-10-05 19:43:29 +02:00
Trevor Buckner
2c4c4b8f92
Make unsavedChanges state common
...
/editPage.jsx uses `unsavedChanges` state to detect when autosave should fire, or unsaved changes warning should display.
/homePage.jsx uses a similar check (different variables) to detect when to show the popup "save now"! button
/newPage.jsx doesn't do any of this, but probably should pop up a warning when saving hasn't happened for a long time
This commit just gives all of the pages the same common `unsavedChanges` state, calculated in the same way, and updates any sections that depend on that updated state.
This is precursor work to adding "unsaved changes" warnings to all three pages.
2025-10-04 22:17:24 -04:00
Trevor Buckner
6057b35d19
Merge branch 'master' into UnifyNewHomeEdit-Structure&Naming
2025-10-04 21:48:10 -04:00
Trevor Buckner
20e12ebcb5
Remove handler function for cursor/renderer page. Use setState directly
2025-10-04 21:39:24 -04:00
G.Ambatte
18367526bd
Merge branch 'master' into standardizeLocalStorageKeyNames-#4119
2025-10-04 13:07:51 +13:00
Víctor Losada Hernández
e8a0681015
Merge branch 'master' of https://github.com/naturalcrit/homebrewery into fix-red-background
2025-10-03 21:37:06 +02:00
Trevor Buckner
ba23763294
Merge branch 'master' into UnifyNewHomeEdit-Structure&Naming
2025-10-02 19:45:42 -04:00
Trevor Buckner
1c6a39363c
Combine handleText/Style/Snippet/Meta functions into common function
...
Also adds any related imports and key names
2025-10-02 19:33:15 -04:00
Trevor Buckner
bcca5fa97d
In /homepage, rename brew state to currentBrew to match /new and /edit
2025-10-02 19:27:45 -04:00
Trevor Buckner
51b91567f6
Merge branch 'master' into fix-red-background
2025-10-02 18:39:31 -04:00
G.Ambatte
900cf6aebb
Change SAVEKEY definition to after username is populated
2025-10-02 22:59:24 +13:00
Víctor Losada Hernández
ff5450ad8c
Merge branch 'master' of https://github.com/naturalcrit/homebrewery into fix-red-background
2025-09-29 22:28:12 +02:00
Trevor Buckner
07495b0dea
Make Print/Vault/New common nav buttons to all pages
2025-09-29 12:48:25 -04:00
G.Ambatte
718dba3e4a
Merge branch 'master' into standardizeLocalStorageKeyNames-#4119
2025-09-29 23:14:14 +13:00
Trevor Buckner
c6ed67db08
Merge branch 'master' into UnifyNewHomeEdit-Structure&Naming
2025-09-26 22:56:15 -04:00
Trevor Buckner
c5071aa27e
Restore unsaved warning timeout duration to 15 mins
2025-09-22 19:55:39 -04:00
Trevor Buckner
f0baa763ec
lint
2025-09-22 19:52:42 -04:00
Trevor Buckner
3ec650557e
Fix Autosave and unsaved changes warning
...
Use normal setTimeout for autosave instead of _.debounce. Fixes a lot of issues with functional component.
Also fix existing bug where multiple "unsaved data" warnings could be queued up if the user keeps typing while the warning is being displayed.
2025-09-22 19:49:57 -04:00
Trevor Buckner
31a8101df7
Move "share" dropdown to own component
2025-09-13 19:37:59 -04:00
Trevor Buckner
788324fe31
Merge handText/Style/Snip/MetaChange into handleBrewChange
2025-09-11 22:03:25 -04:00
Trevor Buckner
da8772daa7
Use setXXXPageNum instead of handleXXXPageNum
...
No need for separate wrapper functions when we can just pass the setState functions directly.
2025-09-11 16:14:45 -04:00
G.Ambatte
8d4ea7cfd8
Update listPage storage keys
2025-09-10 20:20:42 +12:00
G.Ambatte
5504c1b96b
Update Autosave key
2025-09-10 20:00:53 +12:00
G.Ambatte
088ca9971c
Update accountPage keys
2025-09-10 19:16:29 +12:00
G.Ambatte
c99f59d42b
Update newPage.jsx keys
2025-09-10 19:08:47 +12:00
Trevor Buckner
c2e6150edf
Fix mistaken delete
2025-09-09 22:39:11 -04:00
Trevor Buckner
95a1d74644
Linting
2025-09-09 22:35:55 -04:00
Trevor Buckner
1044aa74b0
Cleanup
2025-09-09 22:27:58 -04:00
Trevor Buckner
8a0f350c47
Fix mutating HTMLErrors directly instead of setState
2025-09-09 22:19:43 -04:00
Trevor Buckner
6f2c397574
Restore autosave warning to 15 minutes
2025-09-09 20:47:09 -04:00
Trevor Buckner
8706f91b58
Fis autosaveWarning
2025-09-09 08:37:17 -04:00
Trevor Buckner
90f6e7ec37
Make autosaving work
...
debouncing does not play nice with functional component. Any debounced function gets locked in as the original state, meaning we keep saving the original document and overwriting the current document when a save fires.
Must pass in the parameters instead of pulling directly from state to work properly.
2025-09-09 01:57:13 -04:00
Trevor Buckner
90a81237ec
rename handleAutoSave to toggleAutoSave
2025-09-08 23:18:25 -04:00
Trevor Buckner
883f59ff0d
rename autosave state to autoSaveEnabled
2025-09-08 23:13:21 -04:00
Trevor Buckner
a75364c7f6
remove unused displayLockMessage state
2025-09-08 23:06:16 -04:00
Trevor Buckner
597ce7cb48
Convert renderNavBar and render
2025-09-08 23:05:47 -04:00
Trevor Buckner
d94afa9c50
convert functions and states
2025-09-08 19:33:02 -04:00
Trevor Buckner
1aeded648e
make newPage functional
2025-09-02 22:21:49 -04:00
Trevor Buckner
93b86632fc
Change from require to import
2025-08-30 20:14:29 -04:00
Trevor Buckner
d01860d4de
Merge branch 'master' into MakeHomePageFunctionalComponent
2025-08-30 19:47:10 -04:00
Trevor Buckner
9c336062c6
Fix typo
2025-08-30 19:39:15 -04:00
Trevor Buckner
2cd47c46f6
Merge branch 'master' into Convert-ErrorNavItem-to-functional-component
2025-08-30 19:35:50 -04:00
Trevor Buckner
8671404bdc
Refactor ErrorNavItem to not need "this" parameter
...
Toward making edit/new/home pages functional, which do not have "this"
2025-08-30 19:35:22 -04:00
Trevor Buckner
518a3434be
Changes fetchThemeBundle helper to not need "this" parameter
...
Looks a bit ugly but this is temporary toward converting edit/home/new into functional components
2025-08-30 19:02:39 -04:00
Trevor Buckner
15c04ef37e
Update homePage.jsx
2025-08-30 17:14:37 -04:00
Trevor Buckner
8cf55932a9
Fix useEffect and Refs; Update fetchThemeBundle to work with functional
2025-08-30 17:10:20 -04:00
Trevor Buckner
759dcb5833
Change functions to const vars
2025-08-30 16:49:54 -04:00