From 79f919bb406cfdc303d47eb3c7afd4d739fc561e Mon Sep 17 00:00:00 2001 From: isaacclad Date: Mon, 8 Jun 2026 04:45:35 +0000 Subject: [PATCH] Pin Settings to the sidebar footer in Ladill Hosting. Move Settings out of the Account and Advanced sections into a pinned footer on both the app and control panel sidebars. Co-authored-by: Cursor --- .../hosting/panel/partials/sidebar.blade.php | 28 +++++++++++++------ resources/views/partials/sidebar.blade.php | 12 ++++++-- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/resources/views/hosting/panel/partials/sidebar.blade.php b/resources/views/hosting/panel/partials/sidebar.blade.php index 15949bd..3c16f0b 100644 --- a/resources/views/hosting/panel/partials/sidebar.blade.php +++ b/resources/views/hosting/panel/partials/sidebar.blade.php @@ -89,17 +89,17 @@ 'permission' => 'viewLogs', 'icon' => '', ], - [ - 'name' => 'Settings', - 'route' => route('hosting.panel.settings', $account), - 'active' => str_starts_with($currentRoute, 'hosting.panel.settings'), - 'capability' => 'settings', - 'permission' => 'viewSettings', - 'icon' => '', - ], ], ]; + $settingsItem = [ + 'name' => 'Settings', + 'route' => route('hosting.panel.settings', $account), + 'active' => str_starts_with($currentRoute, 'hosting.panel.settings'), + 'icon' => '', + ]; + $showSettings = $panelRuntime->supports('settings') && $currentUser?->can('viewSettings', $account); + foreach ($navGroups as $group => $items) { $navGroups[$group] = array_values(array_filter($items, static function (array $item) use ($panelRuntime, $currentUser, $account): bool { $capability = $item['capability'] ?? null; @@ -198,6 +198,18 @@ @endif + @if ($showSettings) + + @endif + {{-- Account Info Footer --}}
diff --git a/resources/views/partials/sidebar.blade.php b/resources/views/partials/sidebar.blade.php index c62cba6..428af42 100644 --- a/resources/views/partials/sidebar.blade.php +++ b/resources/views/partials/sidebar.blade.php @@ -36,8 +36,6 @@ 'icon' => ''], ['name' => 'Team', 'route' => route('account.team'), 'active' => request()->routeIs('account.team'), 'icon' => ''], - ['name' => 'Settings', 'route' => route('account.settings'), 'active' => request()->routeIs('account.settings'), - 'icon' => ''], ]; @endphp @foreach($accountNav as $item) @@ -47,4 +45,14 @@ @endforeach + +