From c07ab6b7500ab2f484d043c258543401783a0e34 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Sun, 28 Jun 2026 12:04:32 +0000 Subject: [PATCH] Hide header avatar on mobile and sync shared mobile nav partials. Profile moves to the bottom nav sheet on small screens; optional search tab support is synced from the Ladill platform template. Co-authored-by: Cursor --- app/Support/UserProfileMenu.php | 5 ++--- .../views/partials/mobile-bottom-nav.blade.php | 18 ++++++++++++------ .../partials/topbar-desktop-widgets.blade.php | 7 ++++--- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/app/Support/UserProfileMenu.php b/app/Support/UserProfileMenu.php index 2806cdb..9461caf 100644 --- a/app/Support/UserProfileMenu.php +++ b/app/Support/UserProfileMenu.php @@ -43,9 +43,8 @@ class UserProfileMenu ]; } - - if (Route::has((string) config("billing.wallet_balance_route", "wallet.balance"))) { - $items[] = ["type" => "wallet"]; + if (Route::has((string) config('billing.wallet_balance_route', 'wallet.balance'))) { + $items[] = ['type' => 'wallet']; } if (self::userIsAdmin($user)) { diff --git a/resources/views/partials/mobile-bottom-nav.blade.php b/resources/views/partials/mobile-bottom-nav.blade.php index 8613313..499483f 100644 --- a/resources/views/partials/mobile-bottom-nav.blade.php +++ b/resources/views/partials/mobile-bottom-nav.blade.php @@ -1,5 +1,9 @@ @php - $gridCols = !empty($centerCompose) ? 'grid-cols-5' : 'grid-cols-4'; + $showSearch = isset($searchUrl) && $searchUrl !== null && $searchUrl !== '#'; + $gridCols = match (true) { + ! empty($centerCompose) => $showSearch ? 'grid-cols-5' : 'grid-cols-4', + default => $showSearch ? 'grid-cols-4' : 'grid-cols-3', + }; $avatarUrl = $avatarUrl ?? null; $initials = $initials ?? 'U'; $notificationsUrl = $notificationsUrl ?? '#'; @@ -23,11 +27,13 @@ Home - - - Search - + @if ($showSearch) + + + Search + + @endif @if (!empty($centerCompose))
diff --git a/resources/views/partials/topbar-desktop-widgets.blade.php b/resources/views/partials/topbar-desktop-widgets.blade.php index bb1eca5..5e00826 100644 --- a/resources/views/partials/topbar-desktop-widgets.blade.php +++ b/resources/views/partials/topbar-desktop-widgets.blade.php @@ -1,6 +1,7 @@ {{-- - Standard desktop top-right widgets (CRM / Invoice layout): - Afia → notifications → launcher → divider → avatar dropdown. + Top-right header widgets: + Mobile — Afia + launcher only (profile/notifications live in bottom nav). + Desktop — Afia → notifications → launcher → divider → avatar dropdown. --}} @php $topbarUser = $user ?? auth()->user(); @@ -22,7 +23,7 @@ -
+