diff --git a/app/Support/helpers.php b/app/Support/helpers.php index 75163b0..8bf8445 100644 --- a/app/Support/helpers.php +++ b/app/Support/helpers.php @@ -23,6 +23,13 @@ if (! function_exists('ladill_domains_url')) { } } +if (! function_exists('ladill_home_url')) { + function ladill_home_url(string $path = ''): string + { + return 'https://home.'.config('app.platform_domain').($path !== '' ? '/'.ltrim($path, '/') : ''); + } +} + if (! function_exists('ladill_account_url')) { function ladill_account_url(string $path = ''): string { diff --git a/resources/views/layouts/email.blade.php b/resources/views/layouts/email.blade.php index 96bbb69..0c5c074 100644 --- a/resources/views/layouts/email.blade.php +++ b/resources/views/layouts/email.blade.php @@ -47,8 +47,11 @@ 'profileName' => $navUser?->name ?? '', 'profileSubtitle' => $navUser?->email ?? '', 'profileMenuItems' => [ - ['type' => 'link', 'label' => 'Profile', 'href' => $navAcct.'/profile'], - ['type' => 'link', 'label' => 'Account Settings', 'href' => $navAcct.'/account-settings'], + ['type' => 'link', 'label' => 'Home', 'href' => ladill_home_url()], + ['type' => 'link', 'label' => 'Profile', 'href' => ladill_account_url('profile')], + ['type' => 'link', 'label' => 'Account Settings', 'href' => ladill_account_url('account-settings')], + ['type' => 'link', 'label' => 'Dashboard', 'href' => route('email.dashboard')], + ['type' => 'link', 'label' => 'Billing', 'href' => ladill_account_url('billing')], ['type' => 'logout', 'label' => 'Logout', 'action' => route('logout')], ], 'avatarUrl' => $navUser?->avatar_url, diff --git a/resources/views/layouts/hosting.blade.php b/resources/views/layouts/hosting.blade.php index e436bad..6526ffb 100644 --- a/resources/views/layouts/hosting.blade.php +++ b/resources/views/layouts/hosting.blade.php @@ -46,8 +46,11 @@ 'profileName' => $navUser?->name ?? '', 'profileSubtitle' => $navUser?->email ?? '', 'profileMenuItems' => [ - ['type' => 'link', 'label' => 'Profile', 'href' => $navAcct.'/profile'], - ['type' => 'link', 'label' => 'Account Settings', 'href' => $navAcct.'/account-settings'], + ['type' => 'link', 'label' => 'Home', 'href' => ladill_home_url()], + ['type' => 'link', 'label' => 'Profile', 'href' => ladill_account_url('profile')], + ['type' => 'link', 'label' => 'Account Settings', 'href' => ladill_account_url('account-settings')], + ['type' => 'link', 'label' => 'Dashboard', 'href' => route('hosting.dashboard')], + ['type' => 'link', 'label' => 'Billing', 'href' => ladill_account_url('billing')], ['type' => 'logout', 'label' => 'Logout', 'action' => route('logout')], ], 'avatarUrl' => $navUser?->avatar_url, diff --git a/resources/views/partials/topbar.blade.php b/resources/views/partials/topbar.blade.php index 9fb06e8..e29798d 100644 --- a/resources/views/partials/topbar.blade.php +++ b/resources/views/partials/topbar.blade.php @@ -1,4 +1,8 @@ -@php $u = auth()->user(); $acct = 'https://'.config('app.account_domain'); @endphp +@php + $u = auth()->user(); + $acct = ladill_account_url(); + $home = ladill_home_url(); +@endphp
-
+

Switch account

@foreach ($accessibleAccounts as $acctOption)
@@ -65,8 +69,8 @@ @endif {{-- Profile / avatar menu (desktop; mobile uses bottom nav) --}} -