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
redesign(services): migrate Service detail to the sk-topbar layout
Juan Denis1079c3b98d28
diff --git a/frontend/src/pages/ServiceDetail.jsx b/frontend/src/pages/ServiceDetail.jsxindex 166e65f7..b342c7f1 100644--- a/frontend/src/pages/ServiceDetail.jsx+++ b/frontend/src/pages/ServiceDetail.jsx@@ -20,7 +20,7 @@ import OverviewTab from '../components/service-detail/OverviewTab';import EmptyState from '../components/EmptyState';import { Layers, FileArchive, RotateCcw } from 'lucide-react';import { Button } from '@/components/ui/button';-import { Pill, ServiceTile } from '@/components/ds';+import { Pill, ServiceTile, PageTopbar } from '@/components/ds';// statusInfo.dotClass → ds Pill kindconst STATUS_PILL = {@@ -215,52 +215,23 @@ const ServiceDetail = () => {const isManual = service.source === 'manual';return (- <div className="page-container svc-detail">- {/* Breadcrumb */}- <div className="svc-detail__breadcrumb">- <Link to="/services">Services</Link>- <span className="svc-detail__breadcrumb-sep">/</span>- <span className="svc-detail__breadcrumb-current">{service.name}</span>- </div>-- {/* Header */}- <div className="svc-detail__header">- <div className="svc-detail__header-left">- <ServiceTile name={service.name} size={52} className="svc-detail__tile" />- <div className="svc-detail__title-block">- <div className="svc-detail__title-row">- <h1>{service.name}</h1>- <Pill kind={STATUS_PILL[service.statusInfo.dotClass] || 'gray'}>- {service.statusInfo.label}- </Pill>- <span- className="svc-detail__type-badge"- style={{ backgroundColor: service.typeInfo.bgColor, color: service.typeInfo.color, borderColor: service.typeInfo.borderColor }}- >- {service.typeInfo.label}- </span>- </div>- <div className="svc-detail__subtitle">- {service.port && <span>Port {service.port}</span>}- {service.port && <span className="svc-detail__sep">·</span>}- <span>Created {new Date(service.created_at).toLocaleDateString()}</span>- {service.domain && (- <>- <span className="svc-detail__sep">·</span>- <a- href={`https://${service.domain}`}- target="_blank"- rel="noopener noreferrer"- >- {service.domain}- </a>- </>- )}- </div>- </div>- </div>-- <div className="svc-detail__header-actions">+ <div className="app-detail-page app-detail-page--wide svc-detail">+ {/* Full-bleed top bar — the canonical PageTopbar (.sk-topbar): the SAME+ chrome as the Services LIST page and the WordPress detail page, so the+ top menu stays consistent. Breadcrumb in the title slot, all service+ actions on the right. */}+ <PageTopbar+ className="svc-detail-topbar"+ icon={<Layers size={18} />}+ title={(+ <span className="svc-crumbs">+ <Link to="/services">Services</Link>+ <span className="svc-crumbs__sep">/</span>+ <span className="svc-crumbs__cur">{service.name}</span>+ </span>+ )}+ actions={(+ <>{/* Deploy dropdown */}<div className="svc-detail__dropdown" ref={deployMenuRef}><Button onClick={() => setShowDeployMenu(!showDeployMenu)}>@@ -367,6 +338,46 @@ const ServiceDetail = () => {</div>)}</div>+ </>+ )}+ />++ {/* Everything below the full-bleed top bar lives in a centered, padded+ column (.app-detail-body), matching the WordPress detail page. */}+ <div className="app-detail-body">+ {/* Identity — tile + name + status + type (no actions). */}+ <div className="app-detail-header">+ <ServiceTile name={service.name} size={52} className="svc-detail__tile" />+ <div className="app-detail-title-block">+ <h1>+ {service.name}+ <Pill kind={STATUS_PILL[service.statusInfo.dotClass] || 'gray'}>+ {service.statusInfo.label}+ </Pill>+ <span+ className="svc-detail__type-badge"+ style={{ backgroundColor: service.typeInfo.bgColor, color: service.typeInfo.color, borderColor: service.typeInfo.borderColor }}+ >+ {service.typeInfo.label}+ </span>+ </h1>+ <div className="app-detail-subtitle">+ {service.port && <span>Port {service.port}</span>}+ {service.port && <span className="separator">·</span>}+ <span>Created {new Date(service.created_at).toLocaleDateString()}</span>+ {service.domain && (+ <>+ <span className="separator">·</span>+ <a+ href={`https://${service.domain}`}+ target="_blank"+ rel="noopener noreferrer"+ >+ {service.domain}+ </a>+ </>+ )}+ </div></div></div>@@ -466,12 +477,12 @@ const ServiceDetail = () => {</div>)}- {/* Tab Bar */}- <div className="svc-detail__tabs">+ {/* Tab Bar — shared underline-style strip (app-detail-tabs). */}+ <div className="app-detail-tabs">{availableTabs.map(tab => (<buttonkey={tab}- className={`svc-detail__tab ${activeTab === tab ? 'svc-detail__tab--active' : ''}`}+ className={`app-detail-tab ${activeTab === tab ? 'active' : ''}`}onClick={() => setActiveTab(tab)}>{TAB_LABELS[tab] || tab}@@ -480,7 +491,7 @@ const ServiceDetail = () => {</div>{/* Tab Content */}- <div className="svc-detail__content">+ <div className="app-detail-content">{activeTab === 'overview' && <OverviewTab app={service} deployConfig={deployConfig} />}{activeTab === 'events' && <EventsTab appId={service.id} />}{activeTab === 'logs' && <LogsTab app={service} />}@@ -499,6 +510,7 @@ const ServiceDetail = () => {/>)}</div>+ </div>{/* Git Connect Modal */}{showGitModal && isGitBased && (diff --git a/frontend/src/styles/pages/_service-detail.scss b/frontend/src/styles/pages/_service-detail.scssindex 023f8e63..778c9cc1 100644--- a/frontend/src/styles/pages/_service-detail.scss+++ b/frontend/src/styles/pages/_service-detail.scss@@ -1,53 +1,92 @@// ============================================// SERVICE DETAIL PAGE (redesign — infra console look)-// Header keeps the breadcrumb (detail pages don't get the group top bar);-// tab strip uses the accent-bg active wash; tab bodies consume the shared-// sk- primitives (Pill / MetricCard / Gauge / .sk-info-row / .sk-dtable).+// Shares the WordPress detail page's layout: a full-bleed PageTopbar+// (.sk-topbar) above a centered .app-detail-body, reusing the shared+// app-detail-* base chrome (_applications.scss). Tab bodies consume the+// shared sk- primitives (Pill / MetricCard / Gauge / .sk-info-row / .sk-dtable).// ============================================-.svc-detail {- // Breadcrumb — mono trail- &__breadcrumb {- display: flex;- align-items: center;- gap: $space-2;- margin-bottom: $space-5;- font-family: var(--mono);- font-size: $font-size-sm;+// Run the detail page FULL-BLEED like the list pages: drop the .main-content+// frame so the .sk-topbar spans edge-to-edge; .app-detail-body re-pads a+// centered column below. (Mirrors .main-content:has(.wp-detail-page).)+.main-content:has(.svc-detail) {+ padding: 0;- a {- color: var(--text-faint);- text-decoration: none;-- &:hover {- color: var(--accent-bright);- }- }+ // padding:0 also drops the base rule's mobile top-clearance, so restore it+ // (the fixed mobile header would otherwise overlap the top bar).+ @media (max-width: $breakpoint-md) {+ margin-top: calc(#{$mobile-header-height} + env(safe-area-inset-top));}+}- &__breadcrumb-sep {- color: var(--text-ghost);+.svc-detail {+ // ── Full-bleed shell ────────────────────────────────────────────────+ // Mirrors .wp-detail-page: the page reuses the shared app-detail-* base+ // chrome (from _applications.scss) and runs full-bleed, so the .sk-topbar+ // spans edge-to-edge above a centered, padded body. The .main-content+ // frame is dropped by the `:has()` rule at the bottom of this file.+ gap: 0;++ // Centered max-width column below the full-bleed top bar.+ .app-detail-body {+ display: flex;+ flex-direction: column;+ gap: $space-5;+ width: 100%;+ max-width: 1200px;+ margin-inline: auto;+ padding: $space-6 $space-6 $space-10;}- &__breadcrumb-current {- color: var(--text-dim);- font-weight: $font-weight-medium;+ // Identity row — flat (no card): just the tile + name on the page.+ .app-detail-header {+ padding: 4px 0 0;+ background: none;+ border: none;+ border-radius: 0;++ &::before { content: none; }}- // Header- &__header {- display: flex;- justify-content: space-between;- align-items: flex-start;- gap: $space-4;- margin-bottom: $space-4;+ // Breadcrumb rendered in the top bar's title slot.+ .svc-crumbs {+ display: inline-flex;+ align-items: center;+ gap: 8px;+ white-space: nowrap;++ a {+ color: var(--text-dim);+ text-decoration: none;+ &:hover { color: var(--accent-bright); }+ }+ &__sep { color: var(--text-ghost); }+ &__cur { color: var(--text); }}- &__header-left {- display: flex;- align-items: flex-start;- gap: $space-4;- min-width: 0;+ // The detail page carries several actions, so let the whole bar wrap+ // instead of squeezing the breadcrumb (matches .wp-detail-topbar).+ .svc-detail-topbar {+ padding: 10px $space-4;+ flex-wrap: wrap;+ row-gap: 8px;++ .sk-topbar__spacer { display: none; }+ .sk-topbar__titles { flex-shrink: 0; }++ .sk-topbar__actions {+ margin-left: auto;+ flex-wrap: wrap;+ justify-content: flex-end;+ row-gap: 6px;++ .ui-button {+ height: 32px;+ padding: 0 10px;+ font-size: 12.5px;+ gap: 6px;+ }+ }}// Gradient initial avatar (ds ServiceTile — size via props)@@ -56,26 +95,6 @@box-shadow: var(--shadow-sm);}- &__title-block {- min-width: 0;- }-- &__title-row {- display: flex;- align-items: center;- gap: $space-3;- flex-wrap: wrap;-- h1 {- font-size: 21px;- font-weight: $font-weight-semibold;- letter-spacing: -0.02em;- color: $text-primary;- margin: 0;- white-space: nowrap;- }- }-// Service-type tag (brand colors arrive via inline style props)&__type-badge {font-family: var(--mono);@@ -88,38 +107,6 @@border: 1px solid;}- &__subtitle {- display: flex;- align-items: center;- gap: $space-2;- flex-wrap: wrap;- margin-top: 6px;- font-family: var(--mono);- font-size: 12px;- color: var(--text-dim);-- a {- color: var(--accent-bright);- text-decoration: none;-- &:hover {- text-decoration: underline;- }- }- }-- &__sep {- color: var(--text-ghost);- }-- // Header Actions- &__header-actions {- display: flex;- align-items: center;- gap: $space-2;- flex-shrink: 0;- }-// Dropdown&__dropdown {position: relative;@@ -183,9 +170,9 @@}}- // Repo Bar+ // Repo Bar (spacing handled by the .app-detail-body flex gap)&__repo-bar {- margin-bottom: $space-5;+ display: flex;}&__repo-pill {@@ -267,7 +254,6 @@}&__versions {- margin-bottom: $space-5;padding: $space-4;background: var(--surface);border: 1px solid var(--border);@@ -359,52 +345,9 @@font-weight: $font-weight-medium;}- // Tab strip — accent wash on the active chip- &__tabs {- display: flex;- align-items: center;- gap: 2px;- border-bottom: 1px solid var(--border-soft);- padding-bottom: $space-2;- margin-bottom: $space-6;- overflow-x: auto;-- &::-webkit-scrollbar { height: 0; }- }-- &__tab {- padding: 7px 12px;- background: none;- border: none;- border-radius: 8px;- color: var(--text-dim);- font-size: 13px;- font-weight: $font-weight-normal;- cursor: pointer;- white-space: nowrap;- transition: background $transition-fast, color $transition-fast;-- &:hover {- background: var(--surface-hover);- color: $text-primary;- }-- &--active {- background: var(--accent-bg);- color: var(--accent-bright);- font-weight: $font-weight-medium;-- &:hover {- background: var(--accent-bg);- color: var(--accent-bright);- }- }- }-- // Content area- &__content {- min-height: 400px;- }+ // Tab strip + content now reuse the shared app-detail-tabs / app-detail-tab+ // / app-detail-content chrome (defined in _applications.scss), matching the+ // WordPress detail page — no bespoke tab styles here anymore.// Scoped console/editor polish for tabs that use shared classes// (Gunicorn editor, Commands output) — token re-tint only.