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 Domains to the demo's top-bar layout
Juan Denis68695a779c41
diff --git a/docs/REDESIGN_MAP.md b/docs/REDESIGN_MAP.mdindex c623ed08..ac74c3a5 100644--- a/docs/REDESIGN_MAP.md+++ b/docs/REDESIGN_MAP.md@@ -118,7 +118,7 @@ Effort: S/M/L/XL. Nature: **Restyle** (look only) · **+IA** (layout/tab/route r| 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** |-| 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) |+| 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). **Follow-up:** give DNSZones + SSLCertificates pages the same top bar so the tab group persists. || 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 || 11 | **Git** | L | Restyle+IA+BE | `pages/Git.jsx`, `pages/_git.scss`, `services/api/files.js` | RepoDeployDrawer | provider OAuth connect/disconnect + provider list; Gitea storage/users/runners metrics |diff --git a/frontend/src/components/ds/PageTopbar.jsx b/frontend/src/components/ds/PageTopbar.jsxnew file mode 100644index 00000000..7d010aa0--- /dev/null+++ b/frontend/src/components/ds/PageTopbar.jsx@@ -0,0 +1,42 @@+import { NavLink } from 'react-router-dom';+import { cn } from '@/lib/utils';++// The demo's page top bar (see docs/REDESIGN_MAP.md §6 decision 3): infra pages+// carry their own top bar — an icon + title, an optional routed sub-nav that+// replaces sidebar sub-menus, a spacer, and right-aligned actions.+//+// <PageTopbar icon={<Globe/>} title="Domains"+// tabs={[{ to:'/domains', label:'Domains', end:true }, { to:'/dns', label:'DNS Zones' }]}+// actions={<Button>Add domain</Button>} />+export function PageTopbar({ icon, title, meta, tabs, actions, className }) {+ return (+ <header className={cn('sk-topbar', className)}>+ {icon && <span className="sk-topbar__ico">{icon}</span>}+ <div className="sk-topbar__titles">+ <h1 className="sk-topbar__title">{title}</h1>+ {meta && <span className="sk-topbar__meta">{meta}</span>}+ </div>++ {tabs && tabs.length > 0 && (+ <nav className="sk-topbar__tabs" aria-label={`${title} sections`}>+ {tabs.map((t) => (+ <NavLink+ key={t.to}+ to={t.to}+ end={t.end}+ className={({ isActive }) => cn('sk-topbar__tab', isActive && 'is-active')}+ >+ {t.icon}+ {t.label}+ </NavLink>+ ))}+ </nav>+ )}++ <div className="sk-topbar__spacer" />+ {actions && <div className="sk-topbar__actions">{actions}</div>}+ </header>+ );+}++export default PageTopbar;diff --git a/frontend/src/components/ds/index.js b/frontend/src/components/ds/index.jsindex c3167369..f16f0d60 100644--- a/frontend/src/components/ds/index.js+++ b/frontend/src/components/ds/index.js@@ -12,4 +12,5 @@ export { AreaChart } from './AreaChart';export { ScoreGauge } from './ScoreGauge';export { Feed, FeedItem } from './Feed';export { Drawer } from './Drawer';+export { PageTopbar } from './PageTopbar';export { svcGrad, initials, gaugeColor } from './utils';diff --git a/frontend/src/components/sidebarItems.js b/frontend/src/components/sidebarItems.jsindex eaeb4b41..a0969876 100644--- a/frontend/src/components/sidebarItems.js+++ b/frontend/src/components/sidebarItems.js@@ -35,15 +35,15 @@ export const SIDEBAR_ITEMS = []},{+ // Redesign: Domains is migrated to the top-bar layout (REDESIGN_MAP §6+ // decision 3). Its DNS Zones + SSL sub-nav now lives in the page's top+ // bar (PageTopbar tabs), not as sidebar sub-items. Routes /dns and /ssl+ // are unchanged and still reachable from those tabs.id: 'domains',label: 'Domains',route: '/domains',category: 'infrastructure',- icon: '<circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>',- subItems: [- { id: 'dns', label: 'DNS Zones', route: '/dns', icon: '<path d="M12 2L2 7l10 5 10-5-10-5z"/><path d="M2 17l10 5 10-5"/><path d="M2 12l10 5 10-5"/>' },- { id: 'ssl', label: 'SSL Certificates', route: '/ssl', icon: '<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>' }- ]+ icon: '<circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>'},{id: 'services',diff --git a/frontend/src/pages/Domains.jsx b/frontend/src/pages/Domains.jsxindex d26de646..5ba87e6b 100644--- a/frontend/src/pages/Domains.jsx+++ b/frontend/src/pages/Domains.jsx@@ -1,8 +1,8 @@-import React, { useState, useEffect } from 'react';+import { useState, useEffect } from 'react';+import { useNavigate } from 'react-router-dom';import {- Globe, Plus, Shield, ShieldCheck, ShieldOff, RefreshCw,- Trash2, ExternalLink, CheckCircle, XCircle, AlertTriangle,- Clock, Server, Lock, Unlock, Search+ Globe, Plus, ShieldCheck, RefreshCw, Trash2, ExternalLink,+ AlertTriangle, Clock, Lock, Search, ChevronRight, Network as NetworkIcon,} from 'lucide-react';import api from '../services/api';import { useToast } from '../contexts/ToastContext';@@ -10,23 +10,27 @@ import EmptyState from '../components/EmptyState';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';import { Label } from '@/components/ui/label';-import { Badge } from '@/components/ui/badge';import { Checkbox } from '@/components/ui/checkbox';import {- Select,- SelectTrigger,- SelectContent,- SelectItem,- SelectValue,+ Select, SelectTrigger, SelectContent, SelectItem, SelectValue,} from '@/components/ui/select';+import { PageTopbar, MetricCard, SegControl, Pill, Drawer } from '@/components/ds';++const DOMAIN_TABS = [+ { to: '/domains', label: 'Domains', end: true, icon: <Globe size={15} /> },+ { to: '/dns', label: 'DNS Zones', icon: <NetworkIcon size={15} /> },+ { to: '/ssl', label: 'SSL', icon: <Lock size={15} /> },+];const Domains = () => {const toast = useToast();+ const navigate = useNavigate();const [domains, setDomains] = useState([]);const [apps, setApps] = useState([]);- const [sslStatus, setSslStatus] = useState(null);const [loading, setLoading] = useState(true);const [error, setError] = useState('');+ const [filter, setFilter] = useState('all');+ const [drawerDomain, setDrawerDomain] = useState(null);// Modal statesconst [showAddModal, setShowAddModal] = useState(false);@@ -49,16 +53,14 @@ const Domains = () => {setLoading(true);const timeout = (promise, ms) => Promise.race([promise,- new Promise((_, reject) => setTimeout(() => reject(new Error('Request timeout')), ms))+ new Promise((_, reject) => setTimeout(() => reject(new Error('Request timeout')), ms)),]);- const [domainsData, appsData, sslData] = await Promise.all([+ const [domainsData, appsData] = await Promise.all([timeout(api.getDomains(), 10000).catch(() => ({ domains: [] })),timeout(api.getApps(), 10000).catch(() => ({ apps: [] })),- timeout(api.getDomainsSslStatus(), 10000).catch(() => null)]);setDomains(domainsData.domains || []);setApps(appsData.apps || []);- setSslStatus(sslData);} catch (err) {setError('Failed to load data');console.error(err);@@ -70,13 +72,12 @@ const Domains = () => {async function handleAddDomain(e) {e.preventDefault();if (!domainName || !selectedAppId) return;-try {setActionLoading(true);await api.createDomain({name: domainName,application_id: parseInt(selectedAppId),- is_primary: isPrimary+ is_primary: isPrimary,});setShowAddModal(false);setDomainName('');@@ -92,7 +93,6 @@ const Domains = () => {async function handleDeleteDomain(domain) {if (!confirm(`Are you sure you want to delete ${domain.name}?`)) return;-try {await api.deleteDomain(domain.id);loadData();@@ -104,7 +104,6 @@ const Domains = () => {async function handleEnableSsl(e) {e.preventDefault();if (!selectedDomain || !sslEmail) return;-try {setActionLoading(true);await api.enableSsl(selectedDomain.id, sslEmail);@@ -121,7 +120,6 @@ const Domains = () => {async function handleDisableSsl(domain) {if (!confirm(`Disable SSL for ${domain.name}?`)) return;-try {await api.disableSsl(domain.id);loadData();@@ -160,24 +158,53 @@ const Domains = () => {return app ? app.name : 'Unknown';}+ // ── SSL state helpers ────────────────────────────────────+ function sslDays(d) {+ if (!d.ssl_enabled || !d.ssl_expires_at) return null;+ const ms = new Date(d.ssl_expires_at).getTime() - Date.now();+ if (Number.isNaN(ms)) return null;+ return Math.max(0, Math.round(ms / 86400000));+ }+ function sslState(d) {+ if (!d.ssl_enabled) return 'none';+ const days = sslDays(d);+ return days != null && days < 30 ? 'expiring' : 'valid';+ }+ function sslPill(d) {+ const st = sslState(d);+ const days = sslDays(d);+ if (st === 'valid') return <Pill kind="green">{days != null ? `Valid · ${days}d` : 'Valid'}</Pill>;+ if (st === 'expiring') return <Pill kind="amber">Expires {days}d</Pill>;+ return <Pill kind="gray">No SSL</Pill>;+ }++ const sslActiveCount = domains.filter(d => d.ssl_enabled).length;+ const expiringCount = domains.filter(d => sslState(d) === 'expiring').length;+ const attentionCount = domains.filter(d => !d.ssl_enabled).length;++ const shown = domains.filter(d => (+ filter === 'all' ? true+ : filter === 'ssl' ? sslState(d) === 'expiring'+ : filter === 'issues' ? !d.ssl_enabled : true+ ));+return (- <div className="page-container">- <header className="top-bar">- <div>- <h1>Domains & SSL</h1>- <p className="subtitle">Manage your domains and SSL certificates</p>- </div>- <div className="top-bar-actions">- <Button variant="outline" onClick={loadData}>- <RefreshCw size={16} />- Refresh- </Button>- <Button onClick={() => setShowAddModal(true)}>- <Plus size={16} />- Add Domain- </Button>- </div>- </header>+ <div className="page-container domains-page">+ <PageTopbar+ icon={<Globe size={18} />}+ title="Domains"+ tabs={DOMAIN_TABS}+ actions={(+ <>+ <Button variant="outline" size="sm" onClick={loadData}>+ <RefreshCw size={15} /> Check DNS+ </Button>+ <Button size="sm" onClick={() => setShowAddModal(true)}>+ <Plus size={15} /> Add domain+ </Button>+ </>+ )}+ />{error && (<div className="error-banner">@@ -186,33 +213,6 @@ const Domains = () => {</div>)}- {/* SSL Status */}- {sslStatus && (- <div className="ssl-status-bar">- <div className="ssl-status-item">- <div className={`ssl-status-icon ${sslStatus.certbot_installed ? 'active' : 'inactive'}`}>- {sslStatus.certbot_installed ? <ShieldCheck size={24} /> : <ShieldOff size={24} />}- </div>- <div className="ssl-status-info">- <h4>Certbot</h4>- <span>{sslStatus.certbot_installed ? 'Installed' : 'Not Installed'}</span>- </div>- </div>- <div className="ssl-status-item">- <div className="ssl-status-icon active">- <Lock size={24} />- </div>- <div className="ssl-status-info">- <h4>Certificates</h4>- <span>{sslStatus.total_certificates} active</span>- </div>- </div>- </div>- )}-- {/* Domains List */}- <h2 className="section-title">Domains</h2>-{loading ? (<EmptyState loading title="Loading domains..." />) : domains.length === 0 ? (@@ -220,150 +220,160 @@ const Domains = () => {icon={Globe}title="No domains configured"description="Add a domain to your application to get started."- action={- <Button onClick={() => setShowAddModal(true)}>- <Plus size={16} />- Add Domain- </Button>- }+ action={<Button onClick={() => setShowAddModal(true)}><Plus size={16} /> Add Domain</Button>}/>) : (- <div className="domain-list">- {domains.map(domain => (- <div key={domain.id} className="domain-item">- <div className="domain-item-info">- <div className={`domain-item-icon ${domain.ssl_enabled ? 'ssl' : ''}`}>- {domain.ssl_enabled ? <ShieldCheck size={20} /> : <Globe size={20} />}- </div>- <div className="domain-item-details">- <h3>- {domain.name}- {domain.is_primary && <span className="primary-badge">Primary</span>}- </h3>- <div className="domain-item-meta">- <span className="app-link">- <Server size={12} />- {getAppName(domain.application_id)}- </span>- {domain.ssl_enabled && (- <span className="ssl-badge">- <Lock size={12} />- SSL Active- </span>- )}- </div>- </div>- </div>- <div className="domain-item-actions">- <Button variant="outline" size="sm" asChild>- <a- href={`${domain.ssl_enabled ? 'https' : 'http'}://${domain.name}`}- target="_blank"- rel="noopener noreferrer"- >- <ExternalLink size={14} />- Visit- </a>- </Button>- <Button- variant="outline"- size="sm"- onClick={() => handleVerifyDomain(domain)}- >- <Search size={14} />- Verify DNS- </Button>- {domain.ssl_enabled ? (- <>- <Button- variant="outline"- size="sm"- onClick={() => handleRenewSsl(domain)}- disabled={actionLoading}- >- <RefreshCw size={14} />- Renew SSL- </Button>- <Button- variant="outline"- size="sm"- onClick={() => handleDisableSsl(domain)}- >- <Unlock size={14} />- </Button>- </>- ) : (- <Button- size="sm"- onClick={() => {- setSelectedDomain(domain);- setShowSslModal(true);- }}- >- <Lock size={14} />- Enable SSL- </Button>- )}- <Button- variant="outline"- size="sm"- onClick={() => handleDeleteDomain(domain)}- >- <Trash2 size={14} />- </Button>- </div>+ <div className="domains-body">+ <div className="dom-kpis">+ <MetricCard tone="accent" icon={<Globe size={16} />} value={domains.length} label="Domains" />+ <MetricCard tone="green" icon={<Lock size={16} />} value={sslActiveCount} label="SSL active" />+ <MetricCard tone="amber" icon={<Clock size={16} />} value={expiringCount} label="Expiring ≤30d" />+ <MetricCard tone="red" icon={<AlertTriangle size={16} />} value={attentionCount} label="Needs attention" />+ </div>++ <div className="dom-listhead">+ <h2 className="dom-listhead__title">All domains</h2>+ <SegControl+ value={filter}+ onChange={setFilter}+ options={[+ { value: 'all', label: 'All' },+ { value: 'ssl', label: 'Expiring SSL' },+ { value: 'issues', label: 'Attention' },+ ]}+ />+ </div>++ {shown.length === 0 ? (+ <div className="dom-empty">No domains match this filter.</div>+ ) : (+ <div className="dom-card">+ <table className="sk-dtable">+ <thead>+ <tr>+ <th>Domain</th>+ <th>Linked site</th>+ <th>SSL</th>+ <th>Auto-renew</th>+ <th>Status</th>+ <th style={{ width: 30 }} />+ </tr>+ </thead>+ <tbody>+ {shown.map(d => (+ <tr key={d.id} className="is-clickable" onClick={() => setDrawerDomain(d)}>+ <td>+ <div className="sk-cell-name">+ <span className="dom-fav"><Globe size={15} /></span>+ <span>+ {d.name}+ {d.is_primary && <span className="dom-primary">Primary</span>}+ </span>+ </div>+ </td>+ <td>+ {d.application_id+ ? <span className="sk-tag">{getAppName(d.application_id)}</span>+ : <span className="dom-dash">—</span>}+ </td>+ <td>{sslPill(d)}</td>+ <td>+ {d.ssl_enabled+ ? (d.ssl_auto_renew ? <Pill kind="green">on</Pill> : <Pill kind="gray">off</Pill>)+ : <span className="dom-dash">—</span>}+ </td>+ <td><Pill kind={d.ssl_enabled ? 'green' : 'amber'}>{d.ssl_enabled ? 'active' : 'unconfigured'}</Pill></td>+ <td><ChevronRight size={16} className="dom-chev" /></td>+ </tr>+ ))}+ </tbody>+ </table></div>- ))}+ )}</div>)}- {/* SSL Certificates */}- {sslStatus && sslStatus.certificates && sslStatus.certificates.length > 0 && (- <>- <h2 className="section-title" style={{ marginTop: '40px' }}>SSL Certificates</h2>- <div className="cert-list">- {sslStatus.certificates.map((cert, index) => (- <div key={index} className="cert-item">- <div className="cert-item-info">- <div className="cert-item-icon">- <ShieldCheck size={20} />- </div>- <div className="cert-item-details">- <h3>{cert.name}</h3>- <div className="cert-item-meta">- <span>- <Globe size={12} />- {cert.domains?.join(', ')}- </span>- {cert.expiry && (- <span className={cert.expiry_valid ? 'valid' : 'expiring'}>- <Clock size={12} />- Expires: {cert.expiry}- </span>- )}- </div>- </div>+ {/* ── Detail drawer ──────────────────────────────── */}+ <Drawer+ open={!!drawerDomain}+ onOpenChange={(open) => { if (!open) setDrawerDomain(null); }}+ icon={<Globe size={18} />}+ iconColor="var(--accent-bright)"+ title={drawerDomain?.name || ''}+ subtitle={drawerDomain+ ? `${drawerDomain.application_id ? getAppName(drawerDomain.application_id) : 'unlinked'} · ${sslState(drawerDomain)}`+ : ''}+ width={640}+ >+ {drawerDomain && (+ <div className="dom-drawer">+ <div className="dom-drawer__actions">+ <Button variant="outline" size="sm" asChild>+ <a href={`${drawerDomain.ssl_enabled ? 'https' : 'http'}://${drawerDomain.name}`} target="_blank" rel="noopener noreferrer">+ <ExternalLink size={14} /> Visit+ </a>+ </Button>+ <Button variant="outline" size="sm" onClick={() => handleVerifyDomain(drawerDomain)}>+ <Search size={14} /> Verify DNS+ </Button>+ {drawerDomain.ssl_enabled ? (+ <>+ <Button variant="outline" size="sm" disabled={actionLoading} onClick={() => handleRenewSsl(drawerDomain)}>+ <RefreshCw size={14} /> Renew SSL+ </Button>+ <Button variant="outline" size="sm" onClick={() => handleDisableSsl(drawerDomain)}>+ <Lock size={14} /> Disable SSL+ </Button>+ </>+ ) : (+ <Button size="sm" onClick={() => { setSelectedDomain(drawerDomain); setShowSslModal(true); setDrawerDomain(null); }}>+ <Lock size={14} /> Enable SSL+ </Button>+ )}+ </div>++ <div className="dom-specs">+ <div className="sk-spec-card">+ <div className="sk-spec-card__label">SSL certificate</div>+ <div style={{ marginTop: 8 }}>{sslPill(drawerDomain)}</div>+ <div className="sk-spec-card__sub">+ {drawerDomain.ssl_enabled+ ? (drawerDomain.ssl_expires_at ? `Expires ${new Date(drawerDomain.ssl_expires_at).toLocaleDateString()}` : "Let's Encrypt")+ : 'Not issued'}</div>- <div className="cert-status">- {cert.expiry_valid ? (- <Badge variant="success">- <CheckCircle size={14} />- Valid- </Badge>- ) : (- <Badge variant="warning">- <AlertTriangle size={14} />- Expiring Soon- </Badge>- )}+ </div>+ <div className="sk-spec-card">+ <div className="sk-spec-card__label">Linked site</div>+ <div className="sk-spec-card__value">{drawerDomain.application_id ? getAppName(drawerDomain.application_id) : 'Unlinked'}</div>+ <div className="sk-spec-card__sub">{drawerDomain.is_primary ? 'Primary domain' : 'Alias'}</div>+ </div>+ <div className="sk-spec-card">+ <div className="sk-spec-card__label">Status</div>+ <div style={{ marginTop: 8 }}>+ <Pill kind={drawerDomain.ssl_enabled ? 'green' : 'amber'}>{drawerDomain.ssl_enabled ? 'active' : 'unconfigured'}</Pill></div>+ <div className="sk-spec-card__sub">Auto-renew {drawerDomain.ssl_auto_renew ? 'on' : 'off'}</div></div>- ))}+ </div>++ <div className="dom-drawer__section">+ <h3 className="dom-drawer__sectiontitle">DNS records</h3>+ <p className="dom-drawer__hint">DNS records for this domain are managed in DNS Zones.</p>+ <Button variant="outline" size="sm" onClick={() => navigate('/dns')}>+ <NetworkIcon size={14} /> Manage DNS records+ </Button>+ </div>++ <div className="dom-drawer__danger">+ <Button variant="outline" size="sm" className="dom-delete-btn" onClick={() => { handleDeleteDomain(drawerDomain); setDrawerDomain(null); }}>+ <Trash2 size={14} /> Delete domain+ </Button>+ </div></div>- </>- )}+ )}+ </Drawer>- {/* Add Domain Modal */}+ {/* ── Add Domain Modal ───────────────────────────── */}{showAddModal && (<div className="modal-overlay" onClick={() => setShowAddModal(false)}><div className="modal" onClick={e => e.stopPropagation()}>@@ -374,20 +384,12 @@ const Domains = () => {<form onSubmit={handleAddDomain}><div className="form-group"><Label>Domain Name</Label>- <Input- type="text"- placeholder="example.com"- value={domainName}- onChange={e => setDomainName(e.target.value)}- required- />+ <Input type="text" placeholder="example.com" value={domainName} onChange={e => setDomainName(e.target.value)} required /></div><div className="form-group"><Label>Application</Label><Select value={selectedAppId} onValueChange={setSelectedAppId} required>- <SelectTrigger>- <SelectValue placeholder="Select an application" />- </SelectTrigger>+ <SelectTrigger><SelectValue placeholder="Select an application" /></SelectTrigger><SelectContent>{apps.map(app => (<SelectItem key={app.id} value={String(app.id)}>{app.name}</SelectItem>@@ -397,27 +399,20 @@ const Domains = () => {</div><div className="form-group"><label className="checkbox-label">- <Checkbox- checked={isPrimary}- onCheckedChange={setIsPrimary}- />+ <Checkbox checked={isPrimary} onCheckedChange={setIsPrimary} />Set as primary domain</label></div><div className="modal-actions">- <Button type="button" variant="outline" onClick={() => setShowAddModal(false)}>- Cancel- </Button>- <Button type="submit" disabled={actionLoading}>- {actionLoading ? 'Adding...' : 'Add Domain'}- </Button>+ <Button type="button" variant="outline" onClick={() => setShowAddModal(false)}>Cancel</Button>+ <Button type="submit" disabled={actionLoading}>{actionLoading ? 'Adding...' : 'Add Domain'}</Button></div></form></div></div>)}- {/* Enable SSL Modal */}+ {/* ── Enable SSL Modal ───────────────────────────── */}{showSslModal && selectedDomain && (<div className="modal-overlay" onClick={() => setShowSslModal(false)}><div className="modal" onClick={e => e.stopPropagation()}>@@ -429,28 +424,18 @@ const Domains = () => {<div className="ssl-info-box"><ShieldCheck size={32} /><div>- <h4>Free SSL from Let's Encrypt</h4>+ <h4>Free SSL from Let's Encrypt</h4><p>A free SSL certificate will be obtained for <strong>{selectedDomain.name}</strong></p></div></div><div className="form-group"><Label>Email Address</Label>- <Input- type="email"- placeholder="[email protected]"- value={sslEmail}- onChange={e => setSslEmail(e.target.value)}- required- />+ <Input type="email" placeholder="[email protected]" value={sslEmail} onChange={e => setSslEmail(e.target.value)} required /><p className="hint">Required for certificate expiration notifications</p></div><div className="modal-actions">- <Button type="button" variant="outline" onClick={() => setShowSslModal(false)}>- Cancel- </Button>- <Button type="submit" disabled={actionLoading}>- {actionLoading ? 'Obtaining Certificate...' : 'Enable SSL'}- </Button>+ <Button type="button" variant="outline" onClick={() => setShowSslModal(false)}>Cancel</Button>+ <Button type="submit" disabled={actionLoading}>{actionLoading ? 'Obtaining Certificate...' : 'Enable SSL'}</Button></div></form></div>diff --git a/frontend/src/styles/components/_design-system.scss b/frontend/src/styles/components/_design-system.scssindex bb69a951..210e9c1a 100644--- a/frontend/src/styles/components/_design-system.scss+++ b/frontend/src/styles/components/_design-system.scss@@ -237,6 +237,78 @@ $sk-tones: ('accent', 'green', 'cyan', 'amber', 'red', 'violet');.sk-cell-sub { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }}+// ------------------------------------------------------------+// PageTopbar — the demo's per-page top bar (icon + title + routed sub-nav ++// actions). Replaces sidebar sub-menus for infra pages.+// ------------------------------------------------------------+.sk-topbar {+ display: flex;+ align-items: center;+ gap: 14px;+ min-height: 60px;+ padding: 10px 4px;+ margin-bottom: 4px;+ border-bottom: 1px solid var(--border-soft);++ &__ico { color: var(--accent-bright); display: inline-flex; flex-shrink: 0; }+ &__titles { display: flex; align-items: baseline; gap: 10px; min-width: 0; }+ &__title { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }+ &__meta { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }+ &__spacer { flex: 1; }+ &__actions { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }++ // Routed sub-nav (the ex-sidebar sub-items)+ &__tabs { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; }+ &__tab {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ padding: 6px 11px;+ border-radius: 8px;+ font-size: 13px;+ font-weight: 450;+ color: var(--text-dim);+ text-decoration: none;+ transition: background 0.14s, color 0.14s;++ svg { width: 15px; height: 15px; }+ &:hover { background: var(--surface-hover); color: var(--text); }+ &.is-active { background: var(--accent-bg); color: var(--accent-bright); font-weight: 500; }+ }++ @media (max-width: 768px) {+ flex-wrap: wrap;+ &__tabs { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }+ }+}++// SSL-style pill with day count is just a Pill; provide the spec-card + ssl+// helpers the domain drawer uses.+.sk-spec-card {+ background: var(--surface);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius);+ padding: 14px 15px;++ &__label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--mono); }+ &__value { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 8px; }+ &__sub { font-family: var(--mono); font-size: 11px; color: var(--text-faint); margin-top: 6px; }+}++// Key/value info row (drawer nameservers, details).+.sk-info-row {+ display: flex;+ justify-content: space-between;+ align-items: center;+ gap: 16px;+ padding: 11px 0;+ border-top: 1px solid var(--border-soft);+ font-size: 13px;+ &:first-child { border-top: none; }+ .k { color: var(--text-faint); font-family: var(--mono); font-size: 12px; }+ .v { font-family: var(--mono); color: var(--text); text-align: right; font-size: 12.5px; overflow-wrap: anywhere; }+}+// ------------------------------------------------------------// Drawer — right-side slide-over header chrome (panel comes from ui/sheet).// ------------------------------------------------------------diff --git a/frontend/src/styles/pages/_domains.scss b/frontend/src/styles/pages/_domains.scssindex a77a54fb..d5792418 100644--- a/frontend/src/styles/pages/_domains.scss+++ b/frontend/src/styles/pages/_domains.scss@@ -1,193 +1,139 @@// ============================================-// DOMAINS & SSL PAGE+// DOMAINS PAGE (redesign — top-bar layout, see docs/REDESIGN_MAP.md)// ============================================-// SSL Status Bar-.ssl-status-bar {+.domains-page {display: flex;- gap: $space-6;- margin-bottom: $space-8;-- @media (max-width: $breakpoint-md) {- flex-direction: column;- }-}--.ssl-status-item {- @include flex-start();- gap: $space-4;- padding: $space-5;- background: $bg-card;- border: 1px solid $border-subtle;- border-radius: $radius-xl;- flex: 1;-}--.ssl-status-icon {- @include icon-box(48px);- border-radius: $radius-xl - 2;-- &.active {- background: $success-bg;- color: $success;- }-- &.inactive {- background: $danger-bg;- color: $danger;- }+ flex-direction: column;}-.ssl-status-info {- h4 {- font-size: $font-size-md;- font-weight: $font-weight-semibold;- margin-bottom: $space-1;- }-- span {- font-size: $font-size-sm + 1;- color: $text-secondary;- }+.domains-body {+ max-width: 1320px;+ width: 100%;+ margin: 0 auto;+ padding-top: $space-5;}-// Domain List-.domain-list {- @include flex-column-gap($space-3);-}--.domain-item {- @include list-item-base();-}--.domain-item-info {- @include flex-start();+// KPI strip+.dom-kpis {+ display: grid;+ grid-template-columns: repeat(4, 1fr);gap: $space-4;- flex: 1;- min-width: 0;-}--.domain-item-icon {- @include icon-box();- background: $bg-hover;- border-radius: $radius-lg;- color: $text-secondary;+ margin-bottom: $space-5;- &.ssl {- background: $success-bg;- color: $success;- }+ @media (max-width: $breakpoint-lg) { grid-template-columns: repeat(2, 1fr); }+ @media (max-width: $breakpoint-sm) { grid-template-columns: 1fr; }}-.domain-item-details {- min-width: 0;+// List header + segmented filter+.dom-listhead {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: $space-4;+ margin-bottom: $space-3;- h3 {- font-size: $font-size-base;+ &__title {+ margin: 0;+ font-size: 15px;font-weight: $font-weight-semibold;color: $text-primary;- margin-bottom: $space-1;- @include flex-start();- gap: $space-2;}}-.primary-badge {- background: $accent-glow;- color: $accent-primary;- padding: $space-1 - 2 $space-2;- border-radius: $radius-sm;- font-size: $font-size-xs;- font-weight: $font-weight-semibold;- text-transform: uppercase;+// Table card+.dom-card {+ background: var(--surface);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius);+ overflow: hidden;}-.domain-item-meta {- @include flex-start();- gap: $space-4;- font-size: $font-size-sm;+.dom-empty {+ padding: $space-10;+ text-align: center;color: $text-tertiary;-- span {- @include flex-start();- gap: $space-1;- }-}--.app-link {- color: $text-secondary;-}--.ssl-badge {- color: $success;-}--.domain-item-actions {- display: flex;- gap: $space-2;+ font-size: $font-size-sm;+ background: var(--surface);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius);+}++// Domain cell bits+.dom-fav {+ width: 30px;+ height: 30px;+ border-radius: 8px;+ display: grid;+ place-items: center;flex-shrink: 0;- flex-wrap: wrap;+ background: var(--accent-bg);+ color: var(--accent-bright);}-// Certificate List-.cert-list {- @include flex-column-gap($space-3);+.dom-primary {+ margin-left: $space-2;+ padding: 1px 6px;+ border-radius: $radius-sm;+ background: var(--accent-bg);+ color: var(--accent-bright);+ font-family: var(--mono);+ font-size: 10px;+ font-weight: $font-weight-semibold;+ text-transform: uppercase;+ letter-spacing: 0.04em;}-.cert-item {- @include list-item-base();+.dom-dash {+ color: var(--text-ghost);+ font-family: var(--mono);+ font-size: 12px;}-.cert-item-info {- @include flex-start();- gap: $space-4;- flex: 1;- min-width: 0;-}+.dom-chev { color: var(--text-ghost); }-.cert-item-icon {- @include icon-box();- background: $success-bg;- border-radius: $radius-lg;- color: $success;-}+// ── Detail drawer body ──────────────────────────────────────+.dom-drawer {+ padding: $space-5 $space-5 $space-8;+ display: flex;+ flex-direction: column;+ gap: $space-5;-.cert-item-details {- min-width: 0;+ &__actions {+ display: flex;+ flex-wrap: wrap;+ gap: $space-2;+ }- h3 {- font-size: $font-size-base;+ &__section { display: flex; flex-direction: column; align-items: flex-start; gap: $space-2; }+ &__sectiontitle {+ margin: 0;+ font-size: 14px;font-weight: $font-weight-semibold;color: $text-primary;- margin-bottom: $space-1;}-}+ &__hint { margin: 0; font-size: $font-size-sm; color: $text-tertiary; }-.cert-item-meta {- @include flex-start();- gap: $space-4;- font-size: $font-size-sm;- color: $text-tertiary;-- span {- @include flex-start();- gap: $space-1;+ &__danger {+ padding-top: $space-4;+ border-top: 1px solid var(--border-soft);+ }+}- &.valid {- color: $success;- }+.dom-specs {+ display: grid;+ grid-template-columns: repeat(3, 1fr);+ gap: $space-3;- &.expiring {- color: $warning;- }- }+ @media (max-width: $breakpoint-sm) { grid-template-columns: 1fr; }}-.cert-status {- flex-shrink: 0;+.dom-delete-btn {+ color: $danger;+ &:hover { background: var(--red-bg); color: $danger; }}-// SSL Info Box (in modal)+// ── Kept: modal styles used by Add-Domain + Enable-SSL forms ─.ssl-info-box {@include flex-start();gap: $space-4;@@ -208,13 +154,10 @@font-size: $font-size-sm;color: $text-secondary;- strong {- color: $text-primary;- }+ strong { color: $text-primary; }}}-// Checkbox label.checkbox-label {@include flex-start();gap: $space-2;