ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
Lift the sidebar off the canvas, drop view presets
Juan Denisd8b3e130de59
diff --git a/frontend/src/components/Sidebar.jsx b/frontend/src/components/Sidebar.jsxindex 8a92908e..21958cd9 100644--- a/frontend/src/components/Sidebar.jsx+++ b/frontend/src/components/Sidebar.jsx@@ -3,9 +3,9 @@ import { NavLink, useNavigate, useLocation } from 'react-router-dom';import { useAuth } from '../contexts/useAuth.js';import { useTheme } from '../contexts/useTheme.js';import { useLayout } from '../contexts/useLayout.js';-import { Star, Settings, LogOut, Sun, Moon, Monitor, ChevronRight, ChevronUp, Layers, Palette, PanelLeft, PanelLeftClose, PanelTop, Check, X, Server } from 'lucide-react';+import { Star, Settings, LogOut, Sun, Moon, Monitor, ChevronRight, ChevronUp, Layers, Palette, PanelLeft, PanelLeftClose, PanelTop, X, Server } from 'lucide-react';import { api } from '../services/api';-import { SIDEBAR_CATEGORIES, SIDEBAR_CATEGORY_LABELS, SIDEBAR_PRESETS, getHiddenItemIds, getVisibleItems, applyWorkspaceNavPermissions } from './sidebarItems';+import { SIDEBAR_CATEGORIES, SIDEBAR_CATEGORY_LABELS, getHiddenItemIds, getVisibleItems, applyWorkspaceNavPermissions } from './sidebarItems';import { useTranslation } from 'react-i18next';import useLabel from '../i18n/labels';import { useContributions } from '../plugins/contributions';@@ -20,7 +20,7 @@ import { Button as SharedButton } from '@/components/ui/button';const Sidebar = ({ mobileOpen = false, isMobile = false, onMobileClose = () => {} }) => {const { t } = useTranslation();const label = useLabel();- const { user, logout, updateUser, hasPermission } = useAuth();+ const { user, logout, hasPermission } = useAuth();const { theme, setTheme, whiteLabel } = useTheme();const { layout, setLayout } = useLayout();const { activeWorkspace } = useWorkspace();@@ -149,7 +149,6 @@ const Sidebar = ({ mobileOpen = false, isMobile = false, onMobileClose = () => {const { hiddenSidebarIds: managedHidden } = useManagedProfile();const conditions = { wpInstalled, gpuAvailable, wordpressEnabled, devMode };- const currentPreset = user?.sidebar_config?.preset || 'recommended';const [manualExpanded, setManualExpanded] = useState({});const [autoExpanded, setAutoExpanded] = useState(null);const location = useLocation();@@ -159,14 +158,6 @@ const Sidebar = ({ mobileOpen = false, isMobile = false, onMobileClose = () => {setManualExpanded(prev => ({ ...prev, [itemId]: !currentlyExpanded }));};- const handlePresetSwitch = (presetKey) => {- if (presetKey === currentPreset) return;- const config = { preset: presetKey, hiddenItems: [] };- // Update locally first (instant), persist to backend in background- updateUser({ sidebar_config: config });- api.updateCurrentUser({ sidebar_config: config }).catch(() => {});- };-const visibleItems = useMemo(() => {const core = getVisibleItems(user?.sidebar_config);const hiddenIds = getHiddenItemIds(user?.sidebar_config);@@ -521,24 +512,6 @@ const Sidebar = ({ mobileOpen = false, isMobile = false, onMobileClose = () => {</SharedButton></div></div>- <div className="context-menu-section">- <div className="context-menu-label" id="sidebar-view-label">{t('nav.sidebarView', 'Sidebar view')}</div>- <div className="view-switcher" role="group" aria-labelledby="sidebar-view-label">- {Object.entries(SIDEBAR_PRESETS).map(([key, preset]) => (- <SharedButton variant="unstyled"- key={key}- type="button"- className={`view-btn ${currentPreset === key ? 'active' : ''}`}- onClick={() => handlePresetSwitch(key)}- aria-pressed={currentPreset === key}- title={label(preset, 'description')}- >- {label(preset)}- {currentPreset === key && <Check size={10} aria-hidden="true" />}- </SharedButton>- ))}- </div>- </div><div className="context-menu-divider" /><SharedButton variant="unstyled"type="button"diff --git a/frontend/src/styles/layout/_sidebar.scss b/frontend/src/styles/layout/_sidebar.scssindex ace30556..e53631af 100644--- a/frontend/src/styles/layout/_sidebar.scss+++ b/frontend/src/styles/layout/_sidebar.scss@@ -4,10 +4,11 @@.sidebar {width: $sidebar-width;- // Subtle top→bottom gradient (theme-aware: dark rail in dark mode, light in- // light mode). Redesign "infra console" look — see docs/REDESIGN_MAP.md §2.- background: var(--bg-sidebar);- border-right: 1px solid $border-subtle;+ // One surface step above the canvas plus a hairline edge, so the rail+ // separates from the page without becoming a boxed card. --bg-sidebar sat+ // ~2% off the light canvas and its --border-subtle edge vanished on both.+ background: var(--surface);+ border-right: 1px solid var(--border);display: flex;flex-direction: column;position: fixed;@@ -568,40 +569,6 @@}}-.view-switcher {- display: flex;- flex-wrap: wrap;- gap: $space-1;-}--.view-btn {- display: inline-flex;- align-items: center;- gap: $space-1;- padding: $space-1 $space-2;- border: 1px solid var(--border);- background: var(--surface-2);- color: var(--text-faint);- font-size: $text-xs;- font-weight: $font-weight-medium;- border-radius: $radius-control;- cursor: pointer;- transition: all 0.15s ease;- @include focus-ring();-- &:hover {- border-color: var(--border-strong);- color: var(--text-primary);- background: var(--surface-3);- }-- &.active {- border-color: var(--accent-dim);- color: var(--accent-bright);- background: var(--accent-bg);- }-}-.context-menu-divider {height: 1px;background: var(--border-soft);@@ -821,8 +788,8 @@gap: $space-3;padding: 0 $space-4;border-right: none;- border-bottom: 1px solid $border-subtle;- background: var(--bg-sidebar);+ border-bottom: 1px solid var(--border);+ background: var(--surface);}.brand-section {