diff --git a/app/Support/MobileTopbar.php b/app/Support/MobileTopbar.php index 5115afc..cc91c71 100644 --- a/app/Support/MobileTopbar.php +++ b/app/Support/MobileTopbar.php @@ -6,19 +6,13 @@ class MobileTopbar { public static function resolve(): array { - $config = config('mobile-topbar', []); - $subtitle = $config['app_name'] ?? 'Ladill'; - $title = $config['default_title'] ?? 'Overview'; + $appName = config('mobile-topbar.app_name', 'Ladill'); - foreach ($config['patterns'] ?? [] as $pattern => $patternTitle) { - if (request()->routeIs($pattern)) { - $title = is_callable($patternTitle) ? $patternTitle() : $patternTitle; - break; - } - } + $title = $appName === 'Ladill' + ? 'Ladill' + : "Ladill {$appName}"; return [ - 'mobileTopbarSubtitle' => $subtitle, 'mobileTopbarTitle' => $title, ]; } diff --git a/config/mobile-topbar.php b/config/mobile-topbar.php index 9f4e01c..906d279 100644 --- a/config/mobile-topbar.php +++ b/config/mobile-topbar.php @@ -2,24 +2,4 @@ return [ 'app_name' => 'Events', - 'default_title' => 'Overview', - 'patterns' => [ - 'events.dashboard' => 'Overview', - 'events.search' => 'Search', - 'events.index' => 'Events', - 'events.create' => 'Create event', - 'events.show' => 'Event', - 'attendees.*' => 'Attendees', - 'events.attendees*' => 'Attendees', - 'badges.*' => 'Badge printing', - 'events.badge*' => 'Badge printing', - 'programmes.*' => 'Programmes', - 'events.payouts' => 'Payments & Payouts', - 'account.wallet' => 'Wallet', - 'account.billing' => 'Billing', - 'account.team*' => 'Team', - 'account.settings' => 'Settings', - 'account.developers*' => 'Developers', - 'notifications.*' => 'Notifications', - ], ]; diff --git a/resources/views/partials/mobile-topbar-title.blade.php b/resources/views/partials/mobile-topbar-title.blade.php index 16dfd59..ff10b4a 100644 --- a/resources/views/partials/mobile-topbar-title.blade.php +++ b/resources/views/partials/mobile-topbar-title.blade.php @@ -1,10 +1,6 @@ @php - $subtitle = $mobileTopbarSubtitle ?? null; - $title = $mobileTopbarTitle ?? 'Overview'; + $title = $mobileTopbarTitle ?? 'Ladill'; @endphp
- @if ($subtitle) -

{{ $subtitle }}

- @endif

{{ $title }}