Add mobile bottom nav and hide header avatar on small screens.
Deploy Ladill Frontdesk / deploy (push) Successful in 29s
Deploy Ladill Frontdesk / deploy (push) Successful in 29s
Frontdesk now matches the Ladill mobile pattern: app name in the header, Home/Search/Notifications/Profile in the bottom bar with a profile sheet. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -28,6 +28,33 @@
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
@auth
|
||||
@php
|
||||
$navUser = auth()->user();
|
||||
$navInitials = collect(explode(' ', trim((string) $navUser?->name)))
|
||||
->filter()->take(2)
|
||||
->map(fn ($part) => strtoupper(substr($part, 0, 1)))
|
||||
->implode('');
|
||||
$navAvatarUrl = $navUser && method_exists($navUser, 'avatarUrl')
|
||||
? $navUser->avatarUrl()
|
||||
: ($navUser?->avatar_url ?? null);
|
||||
@endphp
|
||||
@include('partials.mobile-bottom-nav', [
|
||||
'homeUrl' => route('frontdesk.dashboard'),
|
||||
'homeActive' => request()->routeIs('frontdesk.dashboard'),
|
||||
'searchUrl' => route('frontdesk.visitors.index'),
|
||||
'searchActive' => request()->routeIs('frontdesk.visitors.*'),
|
||||
'notificationsUrl' => route('notifications.index'),
|
||||
'notificationsActive' => request()->routeIs('notifications.*'),
|
||||
'unreadUrl' => route('notifications.unread'),
|
||||
'profileActive' => false,
|
||||
'profileName' => $navUser?->name ?? '',
|
||||
'profileSubtitle' => $navUser?->email ?? '',
|
||||
'profileMenuItems' => \App\Support\UserProfileMenu::items($navUser),
|
||||
'avatarUrl' => $navAvatarUrl,
|
||||
'initials' => $navInitials !== '' ? $navInitials : 'U',
|
||||
])
|
||||
@endauth
|
||||
@include('partials.wallet-topup-modal', ['openOnLoad' => (bool) session('topup_required')])
|
||||
@include('partials.afia')
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user