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 a8d7501..1a94e48 100644 --- a/config/mobile-topbar.php +++ b/config/mobile-topbar.php @@ -2,21 +2,4 @@ return [ 'app_name' => 'Hosting', - 'default_title' => 'Dashboard', - 'patterns' => [ - 'hosting.dashboard' => 'Dashboard', - 'hosting.index' => 'Dashboard', - 'hosting.search' => 'Search', - 'hosting.single-domain' => 'Single Domain', - 'hosting.multi-domain' => 'Multi Domain', - 'hosting.wordpress' => 'WordPress', - 'hosting.accounts.*' => 'Accounts', - 'hosting.orders.*' => 'Orders', - 'hosting.panel.*' => 'Control panel', - 'account.wallet' => 'Wallet', - 'account.billing' => 'Billing', - 'account.team*' => 'Team', - 'account.settings' => 'Settings', - '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 }}