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
feat(ui): migrate the Files page group to the top-bar layout
Juan Denisfaa6355c7571
diff --git a/docs/REDESIGN_MAP.md b/docs/REDESIGN_MAP.mdindex f219206c..ab76122c 100644--- a/docs/REDESIGN_MAP.md+++ b/docs/REDESIGN_MAP.md@@ -117,7 +117,7 @@ Effort: S/M/L/XL. Nature: **Restyle** (look only) · **+IA** (layout/tab/route r| 4 | **WordPress detail (tabbed)** | **XL** | Restyle+IA+BE | `pages/WordPressDetail.jsx` (owns all 14 tabs), `pages/_wordpress.scss`, `_applications.scss` | header env-switcher, FilesDrawer/code-viewer, StatCard/gauge/bar-h | DB largest-tables, OPcache/extensions, uptime response-time + 90d, analytics referrers/devices, posture score || 5 | **Docker** | M | Restyle | `pages/Docker.jsx`, `pages/_docker.scss` | KPI tiles | none (strict subset of current) | **✅ pass 1 done** — added `MetricCard` KPI strip (Containers/Images/Volumes/Networks from existing `stats`) atop `dx-main`, restyled status filter → segmented control. KEPT the richer dx- rail/5-tabs/inspector/exec/multi-server. Deferred: per-container accent dot, Projects KPI, logs modal→drawer. || 6 | **Database Explorer** | M | Restyle | `pages/Databases.jsx`, `databases/ConsoleTab.jsx`, `SourceTree.jsx`, `ResultsGrid.jsx`, `pages/_databases.scss` | syntax-highlight/gutter editor wrapper | optional "Export as SQL" dump | **✅ pass 1 done** — page already matched the target shell (token-aligned in Phase 0); added engine status-dot glow, green result count, `UTF-8` + `● Connected` status-bar segments. Deferred: syntax-highlight editor + gutter, `+` new-tab pill, ctx-menu Browse-rows/Export-SQL, semantic cell tints. |-| 7 | **File Manager** | M | Restyle+IA | `pages/FileManager.jsx`, `file-manager/FolderTree.jsx`, `PreviewDrawer.jsx`, `ContextMenu.jsx`, `pages/_file-manager.scss` | `file-manager/highlight.js` | cloud/S3 sources = **out of scope** |+| 7 | **File Manager** | M | Restyle+IA | `pages/FileManager.jsx`, `file-manager/FolderTree.jsx`, `PreviewDrawer.jsx`, `ContextMenu.jsx`, `pages/_file-manager.scss` | `file-manager/highlight.js` | cloud/S3 sources = **out of scope** | **✅ top-bar migrated** — shared `FILE_TABS` (Files/FTP Server); `PageTopbar` on both pages (FileManager top bar above its fullscreen browser; FTP header swapped, conditional actions kept); **sidebar sub-menu removed**. **Follow-up:** restyle the FileManager body (storage-sources tree, syntax-highlight preview) + FTP body. || 8 | **Domains** | L | Restyle+IA+BE | `pages/Domains.jsx`, `pages/_domains.scss` | DomainDrawer (SSL/registration/DNSSEC/NS + inline DNS records) | registrar, registration-expiry, DNSSEC, nameservers, registration auto-renew, status (WHOIS) | **✅ migrated (first top-bar page)** — built shared **`PageTopbar`** ds primitive; Domains now uses the demo's top-bar layout with routed sub-nav (Domains/DNS Zones/SSL) replacing the **removed sidebar sub-menu**; KPI strip + segmented filter + `.sk-dtable` + detail **Drawer**. Omitted unbacked columns (registrar/DNSSEC/nameservers — no WHOIS backend). **Trio complete:** DNSZones + SSLCertificates pages now render the same `PageTopbar` (shared `DOMAIN_TABS`), so the Domains/DNS/SSL tab group persists across all three. DNS/SSL page *bodies* are not yet fully restyled (their lists/forms still old-look) — a later pass. || 9 | **Monitoring** | **XL** | Restyle+IA+BE | `pages/Monitoring.jsx`, `pages/_monitoring.scss` | `services/api/monitoring.js`, monitors/status/incidents subviews | synthetic monitors (HTTP/Ping/Port/Keyword); **status pages + incidents already have backend** — wire in; request-volume/p50-p95 per-app likely gap || 10 | **Backups** | **XL** | Restyle+IA+BE | `pages/Backups.jsx`, `pages/_backups.scss` | RestoreDrawer, Heatmap | activity timeseries, GFS retention, multi-destination storage, selective/clone restore, per-snapshot duration/progress |diff --git a/frontend/src/components/files/fileTabs.jsx b/frontend/src/components/files/fileTabs.jsxnew file mode 100644index 00000000..1004d1f3--- /dev/null+++ b/frontend/src/components/files/fileTabs.jsx@@ -0,0 +1,9 @@+import { FolderOpen, Network } from 'lucide-react';++// Shared sub-nav for the Files page group (Files / FTP Server). Rendered in each+// page's <PageTopbar tabs={FILE_TABS}> — the demo's top-bar layout replaces the+// old sidebar sub-menu (see docs/REDESIGN_MAP.md §6 decision 3).+export const FILE_TABS = [+ { to: '/files', label: 'Files', end: true, icon: <FolderOpen size={15} /> },+ { to: '/ftp', label: 'FTP Server', icon: <Network size={15} /> },+];diff --git a/frontend/src/components/sidebarItems.js b/frontend/src/components/sidebarItems.jsindex cc7173ef..c90cbef7 100644--- a/frontend/src/components/sidebarItems.js+++ b/frontend/src/components/sidebarItems.js@@ -93,14 +93,14 @@ export const SIDEBAR_ITEMS = [// core 'git' item here. Sidebar presets that list 'git' still hide the// plugin's nav item via getHiddenItemIds().{+ // Redesign: Files uses the top-bar layout (REDESIGN_MAP §6 decision 3).+ // FTP Server now lives in the page's top bar (PageTopbar FILE_TABS), not+ // as a sidebar sub-item. Route /ftp is unchanged, reachable from the tab.id: 'files',label: 'Files',route: '/files',category: 'operations',- icon: '<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/>',- subItems: [- { id: 'ftp', label: 'FTP Server', route: '/ftp', icon: '<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/>' }- ]+ icon: '<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/>'},{id: 'monitoring',diff --git a/frontend/src/pages/FTPServer.jsx b/frontend/src/pages/FTPServer.jsxindex a779bc78..6915e568 100644--- a/frontend/src/pages/FTPServer.jsx+++ b/frontend/src/pages/FTPServer.jsx@@ -2,6 +2,8 @@ import { useState, useEffect } from 'react';import { FolderUp, UserPlus, Network } from 'lucide-react';import useTabParam from '../hooks/useTabParam';import { api } from '../services/api';+import { PageTopbar } from '@/components/ds';+import { FILE_TABS } from '../components/files/fileTabs';import { useToast } from '../contexts/ToastContext';import Spinner from '../components/Spinner';import EmptyState from '../components/EmptyState';@@ -241,12 +243,12 @@ function FTPServer() {return (<div className="page-container ftp-server">- <div className="page-header">- <div className="page-header-content">- <h1>FTP Server</h1>- <p className="page-description">Manage FTP users and file transfer settings</p>- </div>- <div className="page-header-actions">+ <PageTopbar+ icon={<Network size={18} />}+ title="FTP Server"+ tabs={FILE_TABS}+ actions={(+ <>{!isInstalled ? (<Button onClick={() => setShowInstallModal(true)}>Install FTP Server@@ -287,8 +289,9 @@ function FTPServer() {)}</>)}- </div>- </div>+ </>+ )}+ />{!isInstalled ? (<EmptyState@@ -563,7 +566,7 @@ function FTPServer() {{selectedService === 'vsftpd' ? (<p><strong>vsftpd</strong> is a secure, fast, and stable FTP server.- It's the default choice for most Ubuntu/Debian systems.+ It's the default choice for most Ubuntu/Debian systems.</p>) : (<p>diff --git a/frontend/src/pages/FileManager.jsx b/frontend/src/pages/FileManager.jsxindex fbdd83ab..abd70ab9 100644--- a/frontend/src/pages/FileManager.jsx+++ b/frontend/src/pages/FileManager.jsx@@ -16,6 +16,8 @@ import { useSearchParams } from 'react-router-dom';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';import { Label } from '@/components/ui/label';+import { PageTopbar } from '@/components/ds';+import { FILE_TABS } from '../components/files/fileTabs';import FolderTree from '../components/file-manager/FolderTree';import FileCard from '../components/file-manager/FileCard';@@ -774,6 +776,12 @@ function FileManager() {onChange={handleUploadInput}/>+ <PageTopbar+ icon={<FolderOpen size={18} />}+ title="Files"+ tabs={FILE_TABS}+ />+{isRemote && (<div className="file-manager-target-banner">Browsing on <strong>{target.name}</strong> — read/write only.diff --git a/frontend/src/styles/pages/_file-manager.scss b/frontend/src/styles/pages/_file-manager.scssindex a33052a9..416a7627 100644--- a/frontend/src/styles/pages/_file-manager.scss+++ b/frontend/src/styles/pages/_file-manager.scss@@ -33,6 +33,15 @@ $ft-default: #94a3b8;box-sizing: border-box;}+ // Redesign top bar (Files / FTP tabs) sits flush at the top; the browser+ // body keeps filling the remaining height.+ > .sk-topbar {+ flex-shrink: 0;+ padding-left: 0;+ padding-right: 0;+ margin-bottom: 0;+ }+// ─── Page header ────────────────────────────────────.page-header {display: flex;