diff --git a/.env.example b/.env.example index 737c408..7b1618a 100644 --- a/.env.example +++ b/.env.example @@ -25,7 +25,8 @@ PLATFORM_DB_USERNAME=ladill_link PLATFORM_DB_PASSWORD= SESSION_DRIVER=database -SESSION_LIFETIME=120 +# Idle web session length in minutes (1440 = 24 hours of inactivity). +SESSION_LIFETIME=1440 SESSION_DOMAIN=.ladill.com LADILL_SSO_CLIENT_ID= diff --git a/config/session.php b/config/session.php index 5b541b7..570bbab 100644 --- a/config/session.php +++ b/config/session.php @@ -32,7 +32,7 @@ return [ | */ - 'lifetime' => (int) env('SESSION_LIFETIME', 120), + 'lifetime' => (int) env('SESSION_LIFETIME', 1440), 'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false), diff --git a/resources/views/partials/mobile-bottom-nav.blade.php b/resources/views/partials/mobile-bottom-nav.blade.php index 8613313..9cea189 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 ?? '#'; @@ -11,6 +15,13 @@ if ($profileMenuItems === [] && $profileUrl !== '#') { $profileMenuItems = [['type' => 'link', 'label' => 'Profile', 'href' => $profileUrl]]; } + $walletBalanceRoute = (string) config('billing.wallet_balance_route', 'wallet.balance'); + $showWalletInSheet = \Illuminate\Support\Facades\Route::has($walletBalanceRoute) + || collect($profileMenuItems)->contains(fn (array $item): bool => ($item['type'] ?? '') === 'wallet'); + $sheetMenuItems = array_values(array_filter( + $profileMenuItems, + fn (array $item): bool => ($item['type'] ?? 'link') !== 'wallet' + )); $navActive = fn (bool $active) => $active ? 'text-indigo-600' : 'text-slate-600'; @endphp
Billing
+ @include('partials.wallet-widget', [ + 'onNavigate' => 'profileOpen = false', + 'class' => 'mx-0', + ]) +