From 560cceca9bfa3c1d12bdec37b1ffbf4635f605bb Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Sun, 8 Feb 2026 01:35:45 -0500 Subject: [PATCH 1/3] refactor: simplify menu icon logic in NavBar component --- src/views/Modals/Inputs/LabelModal.jsx | 139 +++++++++++++------------ src/views/components/NavBar.jsx | 70 +++++++------ 2 files changed, 111 insertions(+), 98 deletions(-) diff --git a/src/views/Modals/Inputs/LabelModal.jsx b/src/views/Modals/Inputs/LabelModal.jsx index 0cc4038..8080190 100644 --- a/src/views/Modals/Inputs/LabelModal.jsx +++ b/src/views/Modals/Inputs/LabelModal.jsx @@ -91,75 +91,80 @@ function LabelModal({ isOpen, onClose, label }) { } return ( - - - {label ? 'Edit Label' : 'Add Label'} - + + + + + } + > + + + + Name + + setLabelName(e.target.value)} + /> + - - - Name - - setLabelName(e.target.value)} - /> - + + + Color + + + - - - Color - - - - - {error && ( - - {error} - - )} - - - - + {error && ( + + {error} + + )} ) diff --git a/src/views/components/NavBar.jsx b/src/views/components/NavBar.jsx index e25b226..deb83b8 100644 --- a/src/views/components/NavBar.jsx +++ b/src/views/components/NavBar.jsx @@ -127,6 +127,44 @@ const NavBar = () => { } }) }, []) + + const getMenuIcon = () => { + const menuRounded = ( + setDrawerOpen(true)}> + + + ) + if (!Capacitor.isNativePlatform()) { + return menuRounded + } + if ( + ['/chores', '/'].includes(location.pathname) && + !searchParams.get('filter') + ) { + return menuRounded + } + return ( + { + if (location.pathname === '/chores') { + // Navigate back to calendar view + navigate('/') + } else { + // Default back navigation + navigate(-1) + } + }} + title={ + searchParams.get('from') === 'calendar' ? 'Back to Calendar' : 'Back' + } + > + + + ) + } + if ( [ '/signup', @@ -172,37 +210,7 @@ const NavBar = () => { backgroundColor: 'var(--joy-palette-background-body)', }} > - {['/chores', '/'].includes(location.pathname) && - !searchParams.get('filter') ? ( - setDrawerOpen(true)} - > - - - ) : ( - { - if (location.pathname === '/chores') { - // Navigate back to calendar view - navigate('/') - } else { - // Default back navigation - navigate(-1) - } - }} - title={ - searchParams.get('from') === 'calendar' - ? 'Back to Calendar' - : 'Back' - } - > - - - )} + {getMenuIcon()} From 492e2f2e7eab05e201d3853ef42afac379857396 Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Sun, 8 Feb 2026 01:39:33 -0500 Subject: [PATCH 2/3] refactor: update modal components to use larger size and full width with titles --- .../Modals/Inputs/AcknowledgmentModal.jsx | 7 ++-- .../Modals/Inputs/BackupRestoreModal.jsx | 32 ++++++++----------- src/views/Modals/Inputs/CreateThingModal.jsx | 11 ++++--- src/views/Modals/Inputs/DateModal.jsx | 9 ++++-- src/views/Modals/Inputs/EditThingState.jsx | 10 ++++-- src/views/Modals/Inputs/IconPickerModal.jsx | 7 ++-- src/views/Modals/Inputs/NudgeModal.jsx | 8 ++--- .../Modals/Inputs/PasswordChangeModal.jsx | 12 ++++--- src/views/Modals/Inputs/SelectModal.jsx | 9 ++++-- src/views/Modals/Inputs/TextModal.jsx | 9 ++++-- src/views/Modals/Inputs/UserDeletionModal.jsx | 3 +- src/views/Modals/Inputs/UserModal.jsx | 11 ++++--- 12 files changed, 74 insertions(+), 54 deletions(-) diff --git a/src/views/Modals/Inputs/AcknowledgmentModal.jsx b/src/views/Modals/Inputs/AcknowledgmentModal.jsx index 234483e..36b2ab7 100644 --- a/src/views/Modals/Inputs/AcknowledgmentModal.jsx +++ b/src/views/Modals/Inputs/AcknowledgmentModal.jsx @@ -64,15 +64,14 @@ function AcknowledgmentModal({ config }) { - - {config?.title} - {loading ? ( ) : ( - <> - - ๐Ÿ”„ Backup & Restore - + setActiveTab(newValue)} + > + + Create Backup + Restore Backup + - setActiveTab(newValue)} - > - - Create Backup - Restore Backup - + {renderBackupTab()} - {renderBackupTab()} - - {renderRestoreTab()} - - + {renderRestoreTab()} + )} ) diff --git a/src/views/Modals/Inputs/CreateThingModal.jsx b/src/views/Modals/Inputs/CreateThingModal.jsx index 9dbb041..97996e1 100644 --- a/src/views/Modals/Inputs/CreateThingModal.jsx +++ b/src/views/Modals/Inputs/CreateThingModal.jsx @@ -60,10 +60,13 @@ function CreateThingModal({ isOpen, onClose, onSave, currentThing }) { } return ( - - - {currentThing?.id ? 'Edit' : 'Create'} Thing - + Name