Skip to content

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.

feat(ui): restyle the WordPress detail page (14 flat tabs) to the new look

Juan Denisa15099c25f0e
diff --git a/frontend/src/components/wordpress/EnvironmentCard.jsx b/frontend/src/components/wordpress/EnvironmentCard.jsx
index 08d0d582..7897c10d 100644
--- a/frontend/src/components/wordpress/EnvironmentCard.jsx
+++ b/frontend/src/components/wordpress/EnvironmentCard.jsx
@@ -1,6 +1,7 @@
import React, { useState } from 'react';
import { ExternalLink, RefreshCw, Trash2, GitBranch, Clock, AlertTriangle, Calendar, FileText } from 'lucide-react';
import { ConfirmDialog } from '../ConfirmDialog';
+import { Pill, EnvTag } from '../ds';
const EnvironmentCard = ({ environment, productionUrl, onSync, onDelete, onViewLogs, isProduction = false }) => {
const [syncing, setSyncing] = useState(false);
@@ -9,7 +10,7 @@ const EnvironmentCard = ({ environment, productionUrl, onSync, onDelete, onViewL
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
const isRunning = environment.status === 'running';
- const envType = environment.type || (isProduction ? 'production' : 'development');
+ const envType = environment.type || environment.environment_type || (isProduction ? 'production' : 'development');
// Helper functions
function formatDate(dateString) {
@@ -78,21 +79,16 @@ const EnvironmentCard = ({ environment, productionUrl, onSync, onDelete, onViewL
}
}
- function getEnvBadgeClass() {
- switch (envType) {
- case 'production': return 'env-production';
- case 'staging': return 'env-staging';
- default: return 'env-development';
- }
- }
+ const envTagLabel = envType === 'production' ? 'PROD'
+ : envType === 'staging' ? 'STAGING'
+ : envType === 'multidev' ? 'MULTIDEV'
+ : 'DEV';
return (
<div className={`wp-env-card ${isProduction ? 'production' : ''} ${stale ? 'stale' : ''}`}>
<div className="wp-env-header">
<div className="wp-env-info">
- <span className={`wp-env-badge ${getEnvBadgeClass()}`}>
- {envType.toUpperCase()}
- </span>
+ <EnvTag env={envTagLabel} />
<h4 className="wp-env-name">{environment.name}</h4>
</div>
<div className="wp-env-status-group">
@@ -102,10 +98,7 @@ const EnvironmentCard = ({ environment, productionUrl, onSync, onDelete, onViewL
Stale
</span>
)}
- <span className={`wp-env-status ${isRunning ? 'running' : 'stopped'}`}>
- <span className="status-dot" />
- {isRunning ? 'Running' : 'Stopped'}
- </span>
+ <Pill kind={isRunning ? 'green' : 'gray'}>{isRunning ? 'Running' : 'Stopped'}</Pill>
</div>
</div>
diff --git a/frontend/src/components/wordpress/HealthStatusPanel.jsx b/frontend/src/components/wordpress/HealthStatusPanel.jsx
index 081ab0d4..efc1e0de 100644
--- a/frontend/src/components/wordpress/HealthStatusPanel.jsx
+++ b/frontend/src/components/wordpress/HealthStatusPanel.jsx
@@ -12,10 +12,10 @@ const STATUS_CONFIG = {
const HealthDot = ({ status, size = 8 }) => {
const colorMap = {
- healthy: 'var(--color-success, #22c55e)',
- degraded: 'var(--color-warning, #eab308)',
- unhealthy: 'var(--color-danger, #ef4444)',
- unknown: 'var(--color-text-tertiary, #6b7280)',
+ healthy: 'var(--green, #3ddc97)',
+ degraded: 'var(--amber, #f5b945)',
+ unhealthy: 'var(--red, #fb6f6f)',
+ unknown: 'var(--text-faint, #646b7a)',
};
return (
diff --git a/frontend/src/components/wordpress/SnapshotTable.jsx b/frontend/src/components/wordpress/SnapshotTable.jsx
index b831a675..ce6d7db7 100644
--- a/frontend/src/components/wordpress/SnapshotTable.jsx
+++ b/frontend/src/components/wordpress/SnapshotTable.jsx
@@ -54,77 +54,78 @@ const SnapshotTable = ({ snapshots, onRestore, onDelete, loading = false }) => {
}
return (
- <table className="docker-table wp-snapshot-table">
- <thead>
- <tr>
- <th>Snapshot</th>
- <th>Size</th>
- <th>Created</th>
- <th>Git Context</th>
- <th style={{ textAlign: 'right' }}>Actions</th>
- </tr>
- </thead>
- <tbody>
- {snapshots.map(snapshot => (
- <tr key={snapshot.id}>
- <td>
- <div className="snapshot-name-cell">
- <span className="snapshot-name">{snapshot.name}</span>
- {snapshot.tag && (
- <span className="snapshot-tag">
- <Tag size={10} /> {snapshot.tag}
- </span>
- )}
- {snapshot.description && (
- <span className="snapshot-desc">{snapshot.description}</span>
- )}
- </div>
- </td>
- <td>
- <span className="mono">{formatBytes(snapshot.size_bytes)}</span>
- {snapshot.compressed && (
- <span className="compressed-badge" title="Compressed">gz</span>
- )}
- </td>
- <td>{formatDate(snapshot.created_at)}</td>
- <td>
- {snapshot.commit_sha ? (
- <div className="git-context">
- <GitCommit size={12} />
- <span className="mono">{snapshot.commit_sha.substring(0, 7)}</span>
- {snapshot.commit_message && (
- <span className="commit-msg" title={snapshot.commit_message}>
- {snapshot.commit_message.substring(0, 30)}
- {snapshot.commit_message.length > 30 && '...'}
+ <div className="wp-table-card">
+ <table className="sk-dtable wp-snapshot-table">
+ <thead>
+ <tr>
+ <th>Snapshot</th>
+ <th>Size</th>
+ <th>Created</th>
+ <th>Git Context</th>
+ <th className="wp-th-right">Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ {snapshots.map(snapshot => (
+ <tr key={snapshot.id}>
+ <td>
+ <div className="snapshot-name-cell">
+ <span className="snapshot-name">{snapshot.name}</span>
+ {snapshot.tag && (
+ <span className="snapshot-tag">
+ <Tag size={10} /> {snapshot.tag}
</span>
)}
+ {snapshot.description && (
+ <span className="snapshot-desc">{snapshot.description}</span>
+ )}
</div>
- ) : (
- <span className="text-muted">-</span>
- )}
- </td>
- <td className="docker-actions-cell">
- <button
- className="docker-icon-action"
- title="Restore"
- onClick={() => setConfirmRestore(snapshot)}
- disabled={actionLoading[`restore-${snapshot.id}`]}
- >
- <RotateCcw size={14} />
- </button>
- <button
- className="docker-icon-action"
- title="Delete"
- onClick={() => setConfirmDelete(snapshot)}
- disabled={actionLoading[`delete-${snapshot.id}`]}
- style={{ color: '#EF4444' }}
- >
- <Trash2 size={14} />
- </button>
- </td>
- </tr>
- ))}
- </tbody>
+ </td>
+ <td>
+ <span className="mono">{formatBytes(snapshot.size_bytes)}</span>
+ {snapshot.compressed && (
+ <span className="compressed-badge" title="Compressed">gz</span>
+ )}
+ </td>
+ <td><span className="snapshot-date">{formatDate(snapshot.created_at)}</span></td>
+ <td>
+ {snapshot.commit_sha ? (
+ <div className="git-context">
+ <GitCommit size={12} />
+ <span className="mono git-context-sha">{snapshot.commit_sha.substring(0, 7)}</span>
+ {snapshot.commit_message && (
+ <span className="commit-msg" title={snapshot.commit_message}>
+ {snapshot.commit_message.substring(0, 30)}
+ {snapshot.commit_message.length > 30 && '...'}
+ </span>
+ )}
+ </div>
+ ) : (
+ <span className="text-muted">-</span>
+ )}
+ </td>
+ <td className="wp-cell-actions">
+ <button
+ className="wp-row-action"
+ title="Restore"
+ onClick={() => setConfirmRestore(snapshot)}
+ disabled={actionLoading[`restore-${snapshot.id}`]}
+ >
+ <RotateCcw size={14} />
+ </button>
+ <button
+ className="wp-row-action wp-row-action--danger"
+ title="Delete"
+ onClick={() => setConfirmDelete(snapshot)}
+ disabled={actionLoading[`delete-${snapshot.id}`]}
+ >
+ <Trash2 size={14} />
+ </button>
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
<ConfirmDialog
isOpen={!!confirmRestore}
@@ -161,7 +162,7 @@ const SnapshotTable = ({ snapshots, onRestore, onDelete, loading = false }) => {
onConfirm={() => handleDelete(confirmDelete)}
onCancel={() => setConfirmDelete(null)}
/>
- </table>
+ </div>
);
};
diff --git a/frontend/src/pages/WordPressDetail.jsx b/frontend/src/pages/WordPressDetail.jsx
index d5a288e5..7718a472 100644
--- a/frontend/src/pages/WordPressDetail.jsx
+++ b/frontend/src/pages/WordPressDetail.jsx
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import { useParams, useNavigate, Link } from 'react-router-dom';
-import { ExternalLink, Settings, RefreshCw, Plus, Database, GitBranch, Package, Palette, Archive, Trash2, Replace, ShieldCheck, FolderOpen, FileText, Lock, Copy, Zap, Activity, Globe, Layers, BarChart3, FileBarChart, Printer, Download } from 'lucide-react';
+import { ExternalLink, Settings, RefreshCw, Plus, Database, GitBranch, Package, Palette, Archive, Trash2, Replace, ShieldCheck, FolderOpen, FileText, Lock, Copy, Zap, Activity, Globe, Layers, BarChart3, FileBarChart, Printer, Download, ChevronDown, Check, AlertTriangle, HardDrive } from 'lucide-react';
import { ResponsiveContainer, AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip } from 'recharts';
import useTabParam from '../hooks/useTabParam';
import wordpressApi from '../services/wordpress';
@@ -9,6 +9,7 @@ import { useToast } from '../contexts/ToastContext';
import { useLogsDrawer } from '../contexts/LogsDrawerContext';
import { EnvironmentCard, SnapshotTable, GitConnectForm, CommitList, DiskUsageBar } from '../components/wordpress';
import { HealthDot } from '../components/wordpress/HealthStatusPanel';
+import { Pill, EnvTag, MetricCard, SegControl } from '../components/ds';
import { ErrorBoundary, ErrorState } from '../components/ErrorBoundary';
import { useConfirm } from '../hooks/useConfirm';
import { ConfirmDialog } from '../components/ConfirmDialog';
@@ -18,7 +19,6 @@ import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Textarea } from '@/components/ui/textarea';
-import { Badge } from '@/components/ui/badge';
// Detail Page Skeleton for initial loading
const DetailPageSkeleton = () => (
@@ -75,6 +75,74 @@ const DetailPageSkeleton = () => (
const VALID_TABS = ['overview', 'environments', 'database', 'plugins', 'themes', 'php', 'git', 'backups', 'uptime', 'analytics', 'vulnerabilities', 'security', 'updates', 'reports'];
+// Environment-type → dot tint for the header environment switcher.
+const ENV_DOT_COLORS = {
+ production: 'var(--green)',
+ staging: 'var(--amber)',
+ development: 'var(--cyan)',
+ multidev: 'var(--violet)',
+};
+
+// Short label for an environment type tag (PROD / STAGING / DEV).
+const envTagLabel = (type) => (
+ type === 'production' ? 'PROD' : type === 'staging' ? 'STAGING' : 'DEV'
+);
+
+const ENV_TYPE_LABELS = { production: 'Production', staging: 'Staging', development: 'Development', multidev: 'Multidev' };
+
+// Compact header environment switcher — navigates between the environment
+// site ids already present in the loaded payload (no extra fetches).
+const EnvSwitcher = ({ options, onSelect }) => {
+ const [open, setOpen] = useState(false);
+
+ useEffect(() => {
+ if (!open) return undefined;
+ const close = () => setOpen(false);
+ window.addEventListener('click', close);
+ return () => window.removeEventListener('click', close);
+ }, [open]);
+
+ const current = options.find(o => o.current) || options[0];
+
+ return (
+ <div className="wp-envswitch-wrap">
+ <button
+ type="button"
+ className={`wp-envswitch ${open ? 'open' : ''}`}
+ onClick={(e) => { e.stopPropagation(); setOpen(o => !o); }}
+ title="Switch environment"
+ >
+ <span className="ed" style={{ background: ENV_DOT_COLORS[current.type] || 'var(--text-faint)' }} />
+ {ENV_TYPE_LABELS[current.type] || current.name}
+ <ChevronDown size={13} className="chev" />
+ </button>
+ {open && (
+ <div className="wp-envswitch-menu" onClick={e => e.stopPropagation()}>
+ <div className="wp-envswitch-head">Switch environment</div>
+ {options.map(o => (
+ <button
+ type="button"
+ className="wp-envswitch-opt"
+ key={o.id}
+ onClick={() => { setOpen(false); if (!o.current) onSelect(o.id); }}
+ >
+ <span className="ed" style={{ background: ENV_DOT_COLORS[o.type] || 'var(--text-faint)' }} />
+ <span className="wp-envswitch-opt-body">
+ <span className="nm">{o.name}</span>
+ <span className="meta">
+ {envTagLabel(o.type)}
+ {o.url ? ` · ${o.url.replace(/^https?:\/\//, '')}` : ''}
+ </span>
+ </span>
+ {o.current && <Check size={14} className="check" />}
+ </button>
+ ))}
+ </div>
+ )}
+ </div>
+ );
+};
+
const WordPressDetail = () => {
const { id } = useParams();
const navigate = useNavigate();
@@ -90,6 +158,9 @@ const WordPressDetail = () => {
const [clonedCreds, setClonedCreds] = useState(null);
useEffect(() => {
+ // Show the skeleton again when navigating between environment site ids
+ // (env switcher / "Open new site") so stale data never renders.
+ setLoading(true);
loadSite();
}, [id]);
@@ -165,6 +236,27 @@ const WordPressDetail = () => {
const isRunning = site.status === 'running';
+ // Environment switcher options from data already in the payload:
+ // production sites carry `environments`; child envs carry `production_site_id`.
+ let envOptions = null;
+ if (site.is_production && (site.environments || []).length > 0) {
+ envOptions = [
+ { id: site.id, name: site.name, type: 'production', url: site.url, current: true },
+ ...site.environments.map(e => ({
+ id: e.id,
+ name: e.name || e.environment_type || `Environment ${e.id}`,
+ type: e.environment_type || 'development',
+ url: e.url,
+ current: false,
+ })),
+ ];
+ } else if (!site.is_production && site.production_site_id) {
+ envOptions = [
+ { id: site.production_site_id, name: 'Production', type: 'production', current: false },
+ { id: site.id, name: site.name, type: site.environment_type || 'development', url: site.url, current: true },
+ ];
+ }
+
return (
<div className="app-detail-page wp-detail-page">
{/* One-time cloned-admin credentials banner */}
@@ -267,27 +359,33 @@ const WordPressDetail = () => {
<svg viewBox="0 0 24 24" width="28" height="28" fill="currentColor">
<path d="M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 19.542c-5.261 0-9.542-4.281-9.542-9.542S6.739 2.458 12 2.458 21.542 6.739 21.542 12 17.261 21.542 12 21.542z"/>
</svg>
+ <span className={`wp-head-dot ${isRunning ? 'running' : 'stopped'}`} />
</div>
<div className="app-detail-title-block">
<h1>
{site.name}
- <span className={`app-status-badge ${isRunning ? 'running' : 'stopped'}`}>
- <span className="pulse-dot" />
- {isRunning ? 'Running' : 'Stopped'}
- </span>
- {site.is_production && (
- <span className="env-badge env-production">PROD</span>
- )}
- {!site.is_production && site.production_site_id && (
- <span className="env-badge env-development">DEV</span>
+ <Pill kind={isRunning ? 'green' : 'gray'}>{isRunning ? 'Running' : 'Stopped'}</Pill>
+ {site.is_production ? (
+ <EnvTag env="PROD" />
+ ) : site.production_site_id ? (
+ <EnvTag env={envTagLabel(site.environment_type)} />
+ ) : null}
+ {envOptions && envOptions.length > 1 && (
+ <EnvSwitcher options={envOptions} onSelect={(envId) => navigate(`/wordpress/${envId}`)} />
)}
</h1>
<div className="app-detail-subtitle">
- <span>WordPress {site.wp_version || ''}</span>
+ <span>WordPress {site.wp_version || '—'}</span>
{site.url && (
<>
- <span className="separator">•</span>
- <span className="mono">{site.url}</span>
+ <span className="separator">·</span>
+ <a href={site.url} target="_blank" rel="noopener noreferrer">{site.url}</a>
+ </>
+ )}
+ {site.multisite && (
+ <>
+ <span className="separator">·</span>
+ <span>multisite</span>
</>
)}
</div>
@@ -618,11 +716,11 @@ const UptimeTab = ({ siteId }) => {
<div className="app-panel-header">Uptime</div>
<div className="app-panel-body">
{comp.last_check_at ? (
- <div className="app-info-grid">
- <div className="app-info-item"><span className="app-info-label">24 hours</span><span className="app-info-value">{pct(comp.uptime_24h)}</span></div>
- <div className="app-info-item"><span className="app-info-label">7 days</span><span className="app-info-value">{pct(comp.uptime_7d)}</span></div>
- <div className="app-info-item"><span className="app-info-label">30 days</span><span className="app-info-value">{pct(comp.uptime_30d)}</span></div>
- <div className="app-info-item"><span className="app-info-label">90 days</span><span className="app-info-value">{pct(comp.uptime_90d)}</span></div>
+ <div className="wp-kpis">
+ <MetricCard icon={<Activity size={16} />} tone="green" value={pct(comp.uptime_24h)} label="Uptime · 24 hours" />
+ <MetricCard icon={<Activity size={16} />} tone="green" value={pct(comp.uptime_7d)} label="Uptime · 7 days" />
+ <MetricCard icon={<Activity size={16} />} tone="cyan" value={pct(comp.uptime_30d)} label="Uptime · 30 days" />
+ <MetricCard icon={<Activity size={16} />} tone="cyan" value={pct(comp.uptime_90d)} label="Uptime · 90 days" />
</div>
) : (
<p className="hint">Awaiting the first health check (runs within 5 minutes).</p>
@@ -723,7 +821,7 @@ const UpdatesTab = ({ siteId }) => {
const runs = data?.runs || [];
const running = data?.running;
- const statusVariant = (s) => ({ completed: 'success', rolled_back: 'warning', failed: 'destructive', running: 'info' }[s] || 'secondary');
+ const statusPill = (s) => ({ completed: 'green', rolled_back: 'amber', failed: 'red', running: 'cyan' }[s] || 'gray');
return (
<div className="app-overview-grid">
@@ -769,10 +867,10 @@ const UpdatesTab = ({ siteId }) => {
const d = r.details || {};
const n = (d.updated || []).length;
return (
- <div className="form-group" key={r.id}>
- <div>
- <Badge variant={statusVariant(r.status)}>{r.status.replace('_', ' ')}</Badge>{' '}
- <span className="form-hint">{r.started_at ? new Date(r.started_at).toLocaleString() : ''} · {r.trigger}</span>
+ <div className="wp-run-row" key={r.id}>
+ <div className="wp-run-row-head">
+ <Pill kind={statusPill(r.status)}>{r.status.replace('_', ' ')}</Pill>
+ <span className="wp-run-row-meta">{r.started_at ? new Date(r.started_at).toLocaleString() : ''} · {r.trigger}</span>
</div>
<span className="form-hint">
{n === 0 ? 'No components needed updating' : `${n} component${n === 1 ? '' : 's'} updated`}
@@ -781,7 +879,7 @@ const UpdatesTab = ({ siteId }) => {
</span>
{d.warning && <span className="form-hint">⚠ {d.warning}</span>}
{(d.updated || []).slice(0, 10).map((u, i) => (
- <span className="form-hint" key={i}>{u.type} {u.slug}: {u.from} → {u.to}</span>
+ <span className="form-hint wp-run-component" key={i}>{u.type} {u.slug}: {u.from} → {u.to}</span>
))}
</div>
);
@@ -877,8 +975,10 @@ const SecurityTab = ({ siteId }) => {
issues.length === 0
? <p className="hint">All core and plugin files verify against official checksums.</p>
: <>
- <div className="app-detail-actions"><Badge variant="destructive">{issues.length} issue{issues.length === 1 ? '' : 's'}</Badge></div>
- {issues.slice(0, 50).map((line, i) => <div className="form-hint" key={i}>{line}</div>)}
+ <div className="app-detail-actions"><Pill kind="red">{issues.length} issue{issues.length === 1 ? '' : 's'}</Pill></div>
+ <div className="wp-code-list">
+ {issues.slice(0, 50).map((line, i) => <div key={i}>{line}</div>)}
+ </div>
</>
)}
</div>
@@ -888,7 +988,7 @@ const SecurityTab = ({ siteId }) => {
<div className="app-panel-header">Debug mode</div>
<div className="app-panel-body">
<div className="app-info-grid">
- <div className="app-info-item"><span className="app-info-label">WP_DEBUG</span><span className="app-info-value"><Badge variant={debug?.debug?.WP_DEBUG ? 'warning' : 'secondary'}>{debug?.debug?.WP_DEBUG ? 'on' : 'off'}</Badge></span></div>
+ <div className="app-info-item"><span className="app-info-label">WP_DEBUG</span><span className="app-info-value"><Pill kind={debug?.debug?.WP_DEBUG ? 'amber' : 'gray'}>{debug?.debug?.WP_DEBUG ? 'on' : 'off'}</Pill></span></div>
<div className="app-info-item"><span className="app-info-label">Debug log</span><span className="app-info-value">{debug?.debug?.WP_DEBUG_LOG ? 'on' : 'off'}</span></div>
<div className="app-info-item"><span className="app-info-label">Script debug</span><span className="app-info-value">{debug?.debug?.SCRIPT_DEBUG ? 'on' : 'off'}</span></div>
</div>
@@ -962,7 +1062,6 @@ const VulnerabilitiesTab = ({ siteId }) => {
const running = data?.scan_status === 'running';
const summary = data?.summary || {};
const vulns = data?.vulnerabilities || [];
- const sevVariant = (s) => ({ critical: 'destructive', high: 'destructive', medium: 'warning', low: 'info' }[s] || 'secondary');
return (
<div className="app-overview-grid">
@@ -979,20 +1078,23 @@ const VulnerabilitiesTab = ({ siteId }) => {
<div className="app-info-item"><span className="app-info-label">Last scan</span><span className="app-info-value">{data?.scanned_at ? new Date(data.scanned_at).toLocaleString() : 'Never'}</span></div>
<div className="app-info-item"><span className="app-info-label">Findings</span><span className="app-info-value">{summary.total ?? 0}</span></div>
</div>
- {summary.total > 0 && (
- <div className="app-detail-actions">
- {summary.critical > 0 && <Badge variant="destructive">{summary.critical} critical</Badge>}
- {summary.high > 0 && <Badge variant="destructive">{summary.high} high</Badge>}
- {summary.medium > 0 && <Badge variant="warning">{summary.medium} medium</Badge>}
- {summary.low > 0 && <Badge variant="info">{summary.low} low</Badge>}
- {summary.unknown > 0 && <Badge variant="secondary">{summary.unknown} unrated</Badge>}
- </div>
- )}
{data?.scan_error && <p className="hint">Last scan error: {data.scan_error}</p>}
<p className="hint">Cross-references installed plugin, theme, and core versions against the WPVulnerability community database. Re-run after updating.</p>
</div>
</div>
+ {data?.scanned_at && (
+ <div className="wp-kpis">
+ <MetricCard icon={<AlertTriangle size={16} />} tone="red" value={summary.critical ?? 0} label="Critical" />
+ <MetricCard icon={<AlertTriangle size={16} />} tone="red" value={summary.high ?? 0} label="High" />
+ <MetricCard icon={<AlertTriangle size={16} />} tone="amber" value={summary.medium ?? 0} label="Medium" />
+ <MetricCard icon={<AlertTriangle size={16} />} tone="cyan" value={summary.low ?? 0} label="Low" />
+ {summary.unknown > 0 && (
+ <MetricCard icon={<AlertTriangle size={16} />} tone="violet" value={summary.unknown} label="Unrated" />
+ )}
+ </div>
+ )}
+
{vulns.length === 0 ? (
<div className="app-panel">
<div className="app-panel-body">
@@ -1002,25 +1104,41 @@ const VulnerabilitiesTab = ({ siteId }) => {
) : (
<div className="app-panel">
<div className="app-panel-header">Findings</div>
- <div className="app-panel-body">
- {vulns.map(v => (
- <div className="form-group" key={v.id}>
- <div>
- <Badge variant={sevVariant(v.severity)}>{v.severity}</Badge>{' '}
- <strong>{v.name}</strong>
- </div>
- {v.title && <span className="form-hint">{v.title}</span>}
- <span className="form-hint">
- {v.source}{v.slug ? ` · ${v.slug}` : ''} · installed {v.installed_version}
- {v.fixed_in ? ` · fixed in ${v.fixed_in}` : ' · no fix yet'}
- {v.advisory_id ? ` · ${v.advisory_id}` : ''}
- </span>
- {v.reference_url && (
- <a href={v.reference_url} target="_blank" rel="noopener noreferrer" className="form-hint">View advisory ↗</a>
- )}
- </div>
- ))}
- </div>
+ <table className="sk-dtable wp-vuln-table">
+ <thead>
+ <tr>
+ <th>Severity</th>
+ <th>Component</th>
+ <th>Issue</th>
+ <th>Installed</th>
+ <th>Fixed in</th>
+ <th>Advisory</th>
+ </tr>
+ </thead>
+ <tbody>
+ {vulns.map(v => (
+ <tr key={v.id}>
+ <td><span className={`wp-sev wp-sev--${v.severity || 'unknown'}`}><span className="d" />{v.severity || 'unrated'}</span></td>
+ <td>
+ <div className="sk-cell-name">{v.name}</div>
+ <div className="sk-cell-sub">{v.source}{v.slug ? ` · ${v.slug}` : ''}</div>
+ </td>
+ <td className="wp-vuln-title">{v.title || '—'}</td>
+ <td><span className="sk-cell-mono">{v.installed_version}</span></td>
+ <td>
+ {v.fixed_in
+ ? <span className="wp-fix-chip">{v.fixed_in}</span>
+ : <span className="wp-no-fix">no fix yet</span>}
+ </td>
+ <td>
+ {v.reference_url
+ ? <a className="wp-advisory-link" href={v.reference_url} target="_blank" rel="noopener noreferrer">{v.advisory_id || 'advisory'} ↗</a>
+ : <span className="sk-cell-mono">{v.advisory_id || '—'}</span>}
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
</div>
)}
</div>
@@ -1067,24 +1185,22 @@ const AnalyticsTab = ({ siteId }) => {
return (
<div className="app-overview-grid">
<div className="app-overview-left">
- <div className="app-panel">
- <div className="app-panel-header">Traffic ({hours <= 24 ? 'last 24 hours' : 'last 7 days'})</div>
- <div className="app-panel-body">
- <div className="app-detail-actions">
- {ANALYTICS_PERIODS.map(p => (
- <Button key={p.hours} variant={hours === p.hours ? 'default' : 'outline'} size="sm" onClick={() => setHours(p.hours)}>{p.label}</Button>
- ))}
- </div>
- {data?.note && <p className="hint">{data.note}</p>}
- <div className="app-info-grid">
- <div className="app-info-item"><span className="app-info-label">Requests</span><span className="app-info-value">{(data?.requests ?? 0).toLocaleString()}</span></div>
- <div className="app-info-item"><span className="app-info-label">Unique Visitors</span><span className="app-info-value">{(data?.unique_visitors ?? 0).toLocaleString()}</span></div>
- <div className="app-info-item"><span className="app-info-label">Bandwidth</span><span className="app-info-value">{data?.bytes_human || '0 B'}</span></div>
- <div className="app-info-item"><span className="app-info-label">Error Rate</span><span className="app-info-value">{data?.error_rate ?? 0}%</span></div>
- <div className="app-info-item"><span className="app-info-label">Bot Traffic</span><span className="app-info-value">{data?.bot_pct ?? 0}%</span></div>
- <div className="app-info-item"><span className="app-info-label">404s</span><span className="app-info-value">{(data?.not_found ?? 0).toLocaleString()}</span></div>
- </div>
- </div>
+ <div className="wp-analytics-head">
+ <h3 className="wp-eyebrow">Traffic · {hours <= 24 ? 'last 24 hours' : 'last 7 days'}</h3>
+ <SegControl
+ options={ANALYTICS_PERIODS.map(p => ({ value: p.hours, label: p.label }))}
+ value={hours}
+ onChange={setHours}
+ />
+ </div>
+ {data?.note && <p className="hint">{data.note}</p>}
+ <div className="wp-kpis">
+ <MetricCard icon={<BarChart3 size={16} />} tone="accent" value={(data?.requests ?? 0).toLocaleString()} label="Requests" />
+ <MetricCard icon={<Globe size={16} />} tone="cyan" value={(data?.unique_visitors ?? 0).toLocaleString()} label="Unique visitors" />
+ <MetricCard icon={<HardDrive size={16} />} tone="violet" value={data?.bytes_human || '0 B'} label="Bandwidth" />
+ <MetricCard icon={<AlertTriangle size={16} />} tone={(data?.error_rate ?? 0) > 5 ? 'red' : 'amber'} value={`${data?.error_rate ?? 0}%`} label="Error rate" />
+ <MetricCard icon={<Activity size={16} />} tone="green" value={`${data?.bot_pct ?? 0}%`} label="Bot traffic" />
+ <MetricCard icon={<FileText size={16} />} tone="red" value={(data?.not_found ?? 0).toLocaleString()} label="404s" />
</div>
<div className="app-panel">
@@ -1094,20 +1210,20 @@ const AnalyticsTab = ({ siteId }) => {
<AreaChart data={data?.series || []} margin={{ top: 8, right: 8, left: -16, bottom: 0 }}>
<defs>
<linearGradient id="wpReq" x1="0" y1="0" x2="0" y2="1">
- <stop offset="5%" stopColor="#6366f1" stopOpacity={0.4} />
- <stop offset="95%" stopColor="#6366f1" stopOpacity={0} />
+ <stop offset="5%" stopColor="#6d7cff" stopOpacity={0.35} />
+ <stop offset="95%" stopColor="#6d7cff" stopOpacity={0} />
</linearGradient>
<linearGradient id="wpErr" x1="0" y1="0" x2="0" y2="1">
- <stop offset="5%" stopColor="#ef4444" stopOpacity={0.4} />
- <stop offset="95%" stopColor="#ef4444" stopOpacity={0} />
+ <stop offset="5%" stopColor="#fb6f6f" stopOpacity={0.35} />
+ <stop offset="95%" stopColor="#fb6f6f" stopOpacity={0} />
</linearGradient>
</defs>
<CartesianGrid strokeDasharray="3 3" stroke="#888" strokeOpacity={0.15} />
- <XAxis dataKey="hour" tickFormatter={fmtHour} tick={{ fontSize: 11, fill: '#888' }} minTickGap={24} />
- <YAxis allowDecimals={false} tick={{ fontSize: 11, fill: '#888' }} width={36} />
+ <XAxis dataKey="hour" tickFormatter={fmtHour} tick={{ fontSize: 11, fill: '#888' }} minTickGap={24} axisLine={false} tickLine={false} />
+ <YAxis allowDecimals={false} tick={{ fontSize: 11, fill: '#888' }} width={36} axisLine={false} tickLine={false} />
<Tooltip labelFormatter={fmtHour} />
- <Area type="monotone" dataKey="requests" name="Requests" stroke="#6366f1" fill="url(#wpReq)" strokeWidth={2} />
- <Area type="monotone" dataKey="errors" name="Errors" stroke="#ef4444" fill="url(#wpErr)" strokeWidth={2} />
+ <Area type="monotone" dataKey="requests" name="Requests" stroke="#8b93ff" fill="url(#wpReq)" strokeWidth={2} />
+ <Area type="monotone" dataKey="errors" name="Errors" stroke="#fb6f6f" fill="url(#wpErr)" strokeWidth={2} />
</AreaChart>
</ResponsiveContainer>
</div>
@@ -1319,8 +1435,8 @@ const ReportView = ({ report, onPrint, onDownload, onDelete }) => {
const vulns = d.vulnerabilities || {};
const health = d.health || {};
const sev = vulns.by_severity || {};
- const sevVariant = (s) => ({ critical: 'destructive', high: 'destructive', medium: 'warning', low: 'info' }[s] || 'secondary');
- const impactVariant = (i) => ({ critical: 'destructive', major: 'destructive', minor: 'warning' }[i] || 'secondary');
+ const sevTone = (s) => ({ critical: 'red', high: 'red', medium: 'amber', low: 'cyan' }[s] || 'gray');
+ const impactTone = (i) => ({ critical: 'red', major: 'red', minor: 'amber' }[i] || 'gray');
const fmt = (iso) => (iso ? new Date(iso).toLocaleString() : '—');
const fmtDay = (key) => {
if (!key) return '';
@@ -1366,9 +1482,9 @@ const ReportView = ({ report, onPrint, onDownload, onDelete }) => {
</div>
{(updates.rolled_back > 0 || updates.failed > 0) && (
<div className="app-detail-actions">
- {updates.completed > 0 && <Badge variant="success">{updates.completed} completed</Badge>}
- {updates.rolled_back > 0 && <Badge variant="warning">{updates.rolled_back} rolled back</Badge>}
- {updates.failed > 0 && <Badge variant="destructive">{updates.failed} failed</Badge>}
+ {updates.completed > 0 && <Pill kind="green">{updates.completed} completed</Pill>}
+ {updates.rolled_back > 0 && <Pill kind="amber">{updates.rolled_back} rolled back</Pill>}
+ {updates.failed > 0 && <Pill kind="red">{updates.failed} failed</Pill>}
</div>
)}
</div>
@@ -1382,15 +1498,15 @@ const ReportView = ({ report, onPrint, onDownload, onDelete }) => {
<AreaChart data={d.uptime_daily || []} margin={{ top: 8, right: 8, left: -16, bottom: 0 }}>
<defs>
<linearGradient id="wpUptime" x1="0" y1="0" x2="0" y2="1">
- <stop offset="5%" stopColor="#10b981" stopOpacity={0.4} />
- <stop offset="95%" stopColor="#10b981" stopOpacity={0} />
+ <stop offset="5%" stopColor="#3ddc97" stopOpacity={0.35} />
+ <stop offset="95%" stopColor="#3ddc97" stopOpacity={0} />
</linearGradient>
</defs>
<CartesianGrid strokeDasharray="3 3" stroke="#888" strokeOpacity={0.15} />
- <XAxis dataKey="date" tickFormatter={fmtDay} tick={{ fontSize: 11, fill: '#888' }} minTickGap={16} />
- <YAxis domain={[0, 100]} tick={{ fontSize: 11, fill: '#888' }} width={36} />
+ <XAxis dataKey="date" tickFormatter={fmtDay} tick={{ fontSize: 11, fill: '#888' }} minTickGap={16} axisLine={false} tickLine={false} />
+ <YAxis domain={[0, 100]} tick={{ fontSize: 11, fill: '#888' }} width={36} axisLine={false} tickLine={false} />
<Tooltip formatter={(v) => (v === null ? 'no data' : `${v}%`)} />
- <Area connectNulls type="monotone" dataKey="percent" name="Uptime %" stroke="#10b981" fill="url(#wpUptime)" strokeWidth={2} />
+ <Area connectNulls type="monotone" dataKey="percent" name="Uptime %" stroke="#3ddc97" fill="url(#wpUptime)" strokeWidth={2} />
</AreaChart>
</ResponsiveContainer>
<p className="hint">Uptime recomputed from recorded health-check samples ({uptime.samples} this month). Rolling 30-day: {uptime.rolling_30d ?? '—'}%.</p>
@@ -1403,9 +1519,9 @@ const ReportView = ({ report, onPrint, onDownload, onDelete }) => {
<div className="app-panel-header">Incidents</div>
<div className="app-panel-body">
{d.incidents.map(inc => (
- <div className="form-group" key={inc.id}>
- <div>
- <Badge variant={impactVariant(inc.impact)}>{inc.impact}</Badge>{' '}
+ <div className="wp-run-row" key={inc.id}>
+ <div className="wp-run-row-head">
+ <Pill kind={impactTone(inc.impact)}>{inc.impact}</Pill>
<strong>{inc.title}</strong>
</div>
<span className="form-hint">
@@ -1423,12 +1539,12 @@ const ReportView = ({ report, onPrint, onDownload, onDelete }) => {
<div className="app-panel-body">
{updates.runs.map(r => {
const n = (r.updated || []).length;
- const sv = ({ completed: 'success', rolled_back: 'warning', failed: 'destructive', running: 'info' }[r.status] || 'secondary');
+ const kind = ({ completed: 'green', rolled_back: 'amber', failed: 'red', running: 'cyan' }[r.status] || 'gray');
return (
- <div className="form-group" key={r.id}>
- <div>
- <Badge variant={sv}>{r.status.replace('_', ' ')}</Badge>{' '}
- <span className="form-hint">{fmt(r.started_at)} · {r.trigger}</span>
+ <div className="wp-run-row" key={r.id}>
+ <div className="wp-run-row-head">
+ <Pill kind={kind}>{r.status.replace('_', ' ')}</Pill>
+ <span className="wp-run-row-meta">{fmt(r.started_at)} · {r.trigger}</span>
</div>
<span className="form-hint">
{n === 0 ? 'No components needed updating' : `${n} component${n === 1 ? '' : 's'} updated`}
@@ -1462,15 +1578,15 @@ const ReportView = ({ report, onPrint, onDownload, onDelete }) => {
{vulns.total > 0 ? (
<>
<div className="app-detail-actions">
- {sev.critical > 0 && <Badge variant="destructive">{sev.critical} critical</Badge>}
- {sev.high > 0 && <Badge variant="destructive">{sev.high} high</Badge>}
- {sev.medium > 0 && <Badge variant="warning">{sev.medium} medium</Badge>}
- {sev.low > 0 && <Badge variant="info">{sev.low} low</Badge>}
- {sev.unknown > 0 && <Badge variant="secondary">{sev.unknown} unrated</Badge>}
+ {sev.critical > 0 && <Pill kind="red">{sev.critical} critical</Pill>}
+ {sev.high > 0 && <Pill kind="red">{sev.high} high</Pill>}
+ {sev.medium > 0 && <Pill kind="amber">{sev.medium} medium</Pill>}
+ {sev.low > 0 && <Pill kind="cyan">{sev.low} low</Pill>}
+ {sev.unknown > 0 && <Pill kind="gray">{sev.unknown} unrated</Pill>}
</div>
{(vulns.items || []).map((v, i) => (
- <div className="form-group" key={i}>
- <div><Badge variant={sevVariant(v.severity)}>{v.severity}</Badge>{' '}<strong>{v.name}</strong></div>
+ <div className="wp-run-row" key={i}>
+ <div className="wp-run-row-head"><Pill kind={sevTone(v.severity)}>{v.severity}</Pill><strong>{v.name}</strong></div>
<span className="form-hint">
{v.source}{v.slug ? ` · ${v.slug}` : ''} · installed {v.installed_version}
{v.fixed_in ? ` · fixed in ${v.fixed_in}` : ' · no fix yet'}
@@ -1773,8 +1889,20 @@ const OverviewTab = ({ site, onUpdate }) => {
}
}
+ const statusTone = site.status === 'running' ? 'green' : site.status === 'archived' ? 'violet' : 'amber';
+ const statusLabel = (site.status || 'unknown').replace(/^./, c => c.toUpperCase());
+
return (
- <div className="app-overview-grid">
+ <div className="wp-overview">
+ <div className="wp-kpis">
+ <MetricCard icon={<Activity size={16} />} tone={statusTone} value={statusLabel} label="Status" />
+ <MetricCard icon={<Globe size={16} />} tone="accent" value={wpInfo?.version || site.wp_version || '—'} label="WordPress core" />
+ <MetricCard icon={<HardDrive size={16} />} tone="cyan" value={site.disk_usage_human || '—'} label="Disk usage" />
+ {site.is_production && (
+ <MetricCard icon={<Layers size={16} />} tone="violet" value={1 + (site.environments || []).length} label="Environments" />
+ )}
+ </div>
+ <div className="app-overview-grid">
<div className="app-overview-left">
<div className="app-panel">
<div className="app-panel-header">Site Information</div>
@@ -2129,6 +2257,7 @@ const OverviewTab = ({ site, onUpdate }) => {
onConfirm={handleConfirm}
onCancel={handleCancel}
/>
+ </div>
</div>
);
};
@@ -2195,8 +2324,10 @@ const SiteSSLPanel = ({ site }) => {
</div>
<div className="app-info-item">
<span className="app-info-label">Status</span>
- <span className={`app-status-badge ${issued ? 'running' : 'stopped'}`}>
- {checking ? 'Checking...' : issued ? `Active (${health.grade})` : 'Not Secured'}
+ <span className="app-info-value">
+ <Pill kind={checking ? 'gray' : issued ? 'green' : 'amber'}>
+ {checking ? 'Checking...' : issued ? `Active (${health.grade})` : 'Not Secured'}
+ </Pill>
</span>
</div>
{issued && health.expires_at && (
@@ -3021,40 +3152,59 @@ const PluginsTab = ({ siteId }) => {
</div>
)}
- <div className="plugins-list">
- {plugins.length === 0 ? (
- <EmptyState icon={Package} title="No plugins installed" description="Install a plugin by entering its slug above." />
- ) : (
- plugins.map(plugin => (
- <div key={plugin.name} className={`plugin-item ${plugin.status === 'active' ? 'active' : ''}`}>
- <div className="plugin-info">
- <span className="plugin-name">{plugin.title || plugin.name}</span>
- <span className="plugin-version">{plugin.version}</span>
- {plugin.update === 'available' && (
- <span className="wp-update-badge">
- Update{plugin.update_version ? `: ${plugin.update_version}` : ''}
- </span>
- )}
- </div>
- <div className="plugin-actions">
- {plugin.update === 'available' && (
- <Button
- variant="outline"
- size="sm"
- onClick={() => handleUpdate(plugin.name)}
- disabled={updating !== null}
- >
- {updating === plugin.name ? 'Updating...' : 'Update'}
- </Button>
- )}
- <span className={`plugin-status ${plugin.status}`}>
- {plugin.status === 'active' ? 'Active' : 'Inactive'}
- </span>
- </div>
- </div>
- ))
- )}
- </div>
+ {plugins.length === 0 ? (
+ <EmptyState icon={Package} title="No plugins installed" description="Install a plugin by entering its slug above." />
+ ) : (
+ <div className="wp-table-card">
+ <table className="sk-dtable wp-asset-table">
+ <thead>
+ <tr>
+ <th>Plugin</th>
+ <th>Version</th>
+ <th>Status</th>
+ <th className="wp-th-right">Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ {plugins.map(plugin => (
+ <tr key={plugin.name}>
+ <td>
+ <div className="sk-cell-name">{plugin.title || plugin.name}</div>
+ {plugin.title && plugin.title !== plugin.name && (
+ <div className="sk-cell-sub">{plugin.name}</div>
+ )}
+ </td>
+ <td>
+ <span className="sk-cell-mono">{plugin.version}</span>
+ {plugin.update === 'available' && (
+ <span className="wp-update-badge">
+ Update{plugin.update_version ? `: ${plugin.update_version}` : ''}
+ </span>
+ )}
+ </td>
+ <td>
+ <Pill kind={plugin.status === 'active' ? 'green' : 'gray'}>
+ {plugin.status === 'active' ? 'Active' : 'Inactive'}
+ </Pill>
+ </td>
+ <td className="wp-cell-actions">
+ {plugin.update === 'available' && (
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => handleUpdate(plugin.name)}
+ disabled={updating !== null}
+ >
+ {updating === plugin.name ? 'Updating...' : 'Update'}
+ </Button>
+ )}
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ )}
</div>
);
};
@@ -3180,40 +3330,59 @@ const ThemesTab = ({ siteId }) => {
</div>
)}
- <div className="themes-list">
- {themes.length === 0 ? (
- <EmptyState icon={Palette} title="No themes installed" description="Install a theme by entering its slug above." />
- ) : (
- themes.map(theme => (
- <div key={theme.name} className={`theme-item ${theme.status === 'active' ? 'active' : ''}`}>
- <div className="theme-info">
- <span className="theme-name">{theme.title || theme.name}</span>
- <span className="theme-version">{theme.version}</span>
- {theme.update === 'available' && (
- <span className="wp-update-badge">
- Update{theme.update_version ? `: ${theme.update_version}` : ''}
- </span>
- )}
- </div>
- <div className="theme-actions">
- {theme.update === 'available' && (
- <Button
- variant="outline"
- size="sm"
- onClick={() => handleUpdate(theme.name)}
- disabled={updating !== null}
- >
- {updating === theme.name ? 'Updating...' : 'Update'}
- </Button>
- )}
- {theme.status === 'active' && (
- <span className="active-badge">Active</span>
- )}
- </div>
- </div>
- ))
- )}
- </div>
+ {themes.length === 0 ? (
+ <EmptyState icon={Palette} title="No themes installed" description="Install a theme by entering its slug above." />
+ ) : (
+ <div className="wp-table-card">
+ <table className="sk-dtable wp-asset-table">
+ <thead>
+ <tr>
+ <th>Theme</th>
+ <th>Version</th>
+ <th>Status</th>
+ <th className="wp-th-right">Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ {themes.map(theme => (
+ <tr key={theme.name}>
+ <td>
+ <div className="sk-cell-name">{theme.title || theme.name}</div>
+ {theme.title && theme.title !== theme.name && (
+ <div className="sk-cell-sub">{theme.name}</div>
+ )}
+ </td>
+ <td>
+ <span className="sk-cell-mono">{theme.version}</span>
+ {theme.update === 'available' && (
+ <span className="wp-update-badge">
+ Update{theme.update_version ? `: ${theme.update_version}` : ''}
+ </span>
+ )}
+ </td>
+ <td>
+ <Pill kind={theme.status === 'active' ? 'green' : 'gray'}>
+ {theme.status === 'active' ? 'Active' : 'Inactive'}
+ </Pill>
+ </td>
+ <td className="wp-cell-actions">
+ {theme.update === 'available' && (
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => handleUpdate(theme.name)}
+ disabled={updating !== null}
+ >
+ {updating === theme.name ? 'Updating...' : 'Update'}
+ </Button>
+ )}
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ )}
</div>
);
};
diff --git a/frontend/src/styles/pages/_wordpress.scss b/frontend/src/styles/pages/_wordpress.scss
index 775a7fe5..0e8280bd 100644
--- a/frontend/src/styles/pages/_wordpress.scss
+++ b/frontend/src/styles/pages/_wordpress.scss
@@ -425,33 +425,834 @@
}
}
-// WordPress Detail Page
+// ============================================
+// WORDPRESS DETAIL PAGE (redesign — infra console look)
+// ============================================
+// Everything here is scoped under .wp-detail-page on purpose: the base
+// `app-*` classes (.app-panel, .app-info-grid, .app-detail-tabs, …) live in
+// _applications.scss and are ALSO rendered by the Applications detail page,
+// which keeps its current look until its own pass. Same pattern as the
+// `.server-detail-page` block in _servers.scss.
.wp-detail-page {
+
+ // ---- Breadcrumbs (mono trail) ----
+ .app-detail-breadcrumbs {
+ font-family: var(--mono);
+ font-size: $font-size-sm;
+
+ a {
+ color: var(--text-faint);
+
+ &:hover {
+ color: var(--accent-bright);
+ }
+ }
+
+ > span {
+ color: var(--text-ghost);
+ }
+
+ .current {
+ color: var(--text-dim);
+ font-weight: $font-weight-medium;
+ }
+ }
+
+ // ---- Header (demo .site-header: gradient surface + accent wash) ----
+ .app-detail-header {
+ position: relative;
+ gap: $space-4;
+ padding: 20px 22px;
+ background: linear-gradient(120deg, var(--surface) 0%, var(--surface-2) 100%);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius-lg);
+
+ // No overflow:hidden (the env-switch menu must escape the header),
+ // so the wash inherits the radius instead.
+ &::before {
+ content: "";
+ position: absolute;
+ inset: 0;
+ border-radius: var(--radius-lg);
+ background: radial-gradient(420px 200px at 0% 0%, var(--accent-bg-soft), transparent 70%);
+ pointer-events: none;
+ }
+ }
+
+ .app-detail-icon {
+ position: relative;
+ width: 52px;
+ height: 52px;
+ border-radius: 13px;
+ border: 1px solid fade(#fff, 8%);
+ box-shadow: var(--shadow-sm);
+ }
+
.wp-icon {
- background: $color-wordpress !important;
+ background: linear-gradient(150deg, lighten($color-wordpress, 12%), $color-wordpress) !important;
+ }
+
+ // Status dot pinned to the favicon corner (demo .site-favicon .badge)
+ .wp-head-dot {
+ position: absolute;
+ bottom: -4px;
+ right: -4px;
+ width: 14px;
+ height: 14px;
+ border-radius: 50%;
+ border: 2.5px solid var(--surface);
+ background: var(--text-faint);
+
+ &.running {
+ background: var(--green);
+ }
+
+ &.stopped {
+ background: var(--red);
+ }
+ }
+
+ .app-detail-title-block h1 {
+ font-size: 21px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: -0.02em;
+ gap: 11px;
+ flex-wrap: wrap;
+ }
+
+ .app-detail-subtitle {
+ display: flex;
+ align-items: center;
+ gap: 9px;
+ flex-wrap: wrap;
+ margin-top: 4px;
+ font-family: var(--mono);
+ font-size: 12px;
+ color: var(--text-dim);
+
+ a {
+ color: var(--accent-bright);
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+
+ .separator {
+ color: var(--text-ghost);
+ }
+ }
+
+ // ---- Tab strip (14 flat tabs — accent underline, ids untouched) ----
+ .app-detail-tabs {
+ gap: 2px;
+ background: transparent;
+ border: none;
+ border-bottom: 1px solid var(--border-soft);
+ border-radius: 0;
+ padding: 0;
+ overflow-x: auto;
+
+ &::-webkit-scrollbar {
+ height: 0;
+ }
+ }
+
+ .app-detail-tab {
+ display: flex;
+ align-items: center;
+ gap: 7px;
+ padding: 11px 14px;
+ border-radius: 0;
+ border-bottom: 2px solid transparent;
+ color: var(--text-faint);
+ font-size: 13px;
+ font-weight: $font-weight-normal;
+ white-space: nowrap;
+ transition: color 0.14s;
+
+ svg {
+ color: var(--text-ghost);
+ transition: color 0.14s;
+ flex-shrink: 0;
+ }
+
+ &:hover {
+ background: none;
+ color: var(--text-dim);
+
+ svg {
+ color: var(--text-faint);
+ }
+ }
+
+ &.active {
+ background: none;
+ color: var(--text);
+ border-bottom-color: var(--accent);
+ font-weight: $font-weight-medium;
+
+ svg {
+ color: var(--accent-bright);
+ }
+ }
+ }
+
+ // ---- Panels (quiet surface + mono eyebrow header) ----
+ .app-panel {
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ }
+
+ .app-panel-header {
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+ gap: 7px;
+ padding: 12px 17px;
+ border-bottom: 1px solid var(--border-soft);
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
+
+ svg {
+ width: 13px;
+ height: 13px;
+ color: var(--accent-bright);
+ }
+ }
+
+ .app-panel-body {
+ padding: $space-4 17px;
+
+ .hint:last-child {
+ margin-bottom: 0;
+ }
+
+ .app-detail-actions {
+ flex-wrap: wrap;
+ align-items: center;
+ margin-bottom: $space-3;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+ }
+
+ .app-info-grid + .app-detail-actions,
+ .app-info-grid + .hint {
+ margin-top: $space-3;
+ }
+ }
+
+ // ---- Info grids → k/v spec rows (.sk-info-row look, CSS-only) ----
+ .app-info-grid {
+ display: flex;
+ flex-direction: column;
+ gap: 0;
+ }
+
+ .app-info-item {
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+ gap: $space-4;
+ padding: 10px 0;
+ border-top: 1px solid var(--border-soft);
+
+ &:first-child {
+ border-top: none;
+ padding-top: 0;
+ }
+
+ &:last-child {
+ padding-bottom: 0;
+ }
+ }
+
+ .app-info-label {
+ font-family: var(--mono);
+ font-size: 12px;
+ color: var(--text-faint);
+ min-width: 0;
+ overflow-wrap: anywhere;
+ }
+
+ .app-info-value {
+ display: inline-flex;
+ align-items: center;
+ justify-content: flex-end;
+ flex-wrap: wrap;
+ gap: $space-2;
+ font-family: var(--mono);
+ font-size: 12.5px;
+ color: var(--text);
+ text-align: right;
+ min-width: 0;
+ overflow-wrap: anywhere;
+
+ a {
+ color: var(--accent-bright);
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+ }
+
+ // ---- Section headers → mono eyebrows ----
+ .section-header {
+ margin-bottom: $space-4;
+
+ h3 {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ margin: 0;
+ font-family: var(--mono);
+ font-size: 11px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
+ }
+ }
+
+ // ---- KPI strip (ds MetricCard rows) ----
+ .wp-kpis {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
+ gap: $space-4;
+ }
+
+ .wp-overview {
+ display: flex;
+ flex-direction: column;
+ gap: $space-4;
+ }
+
+ // ---- Dense table chrome shared by plugins/themes/vulns ----
+ .wp-asset-table,
+ .wp-vuln-table {
+ .sk-cell-name {
+ font-size: 13px;
+ }
+
+ .sk-cell-sub {
+ margin-top: 2px;
+ }
+ }
+
+ .wp-vuln-title {
+ font-size: 12.5px;
+ color: var(--text-dim);
+ max-width: 360px;
+ overflow-wrap: anywhere;
+ }
+
+ // app-panel hosting a flush table (Findings)
+ .app-panel > .sk-dtable {
+ border-radius: 0 0 var(--radius) var(--radius);
+ overflow: hidden;
+ }
+
+ // ---- Severity chips (prototype .sev / security ramp) ----
+ .wp-sev {
+ display: inline-flex;
+ align-items: center;
+ gap: 7px;
+ font-family: var(--mono);
+ font-size: 11px;
+ font-weight: $font-weight-semibold;
+ text-transform: uppercase;
+ letter-spacing: 0.04em;
+ white-space: nowrap;
+
+ .d {
+ width: 9px;
+ height: 9px;
+ border-radius: 3px;
+ flex-shrink: 0;
+ background: var(--text-ghost);
+ }
+
+ &--critical {
+ color: var(--red);
+
+ .d {
+ background: var(--red);
+ box-shadow: 0 0 6px var(--red);
+ }
+ }
+
+ &--high {
+ color: var(--red);
+
+ .d {
+ background: var(--red);
+ }
+ }
+
+ &--medium {
+ color: var(--amber);
+
+ .d {
+ background: var(--amber);
+ }
+ }
+
+ &--low {
+ color: var(--cyan);
+
+ .d {
+ background: var(--cyan);
+ }
+ }
+
+ &--unknown {
+ color: var(--text-faint);
+
+ .d {
+ background: var(--text-faint);
+ }
+ }
+ }
+
+ .wp-fix-chip {
+ font-family: var(--mono);
+ font-size: 10.5px;
+ color: var(--accent-bright);
+ background: var(--accent-bg);
+ padding: 2px 7px;
+ border-radius: 5px;
+ white-space: nowrap;
}
+
+ .wp-no-fix {
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
+ }
+
+ .wp-advisory-link {
+ font-family: var(--mono);
+ font-size: 11.5px;
+ color: var(--accent-bright);
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+
+ // ---- Update chips + bulk bar (amber wash, mono) ----
+ .wp-update-badge {
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-medium;
+ color: var(--amber);
+ background: var(--amber-bg);
+ padding: 2px 7px;
+ border-radius: 5px;
+ margin-left: $space-2;
+ }
+
+ .bulk-update-bar {
+ background: var(--amber-bg);
+ border: 1px solid fade($warning, 25%);
+ border-radius: var(--radius);
+ font-family: var(--mono);
+ font-size: 12px;
+ color: var(--amber);
+ }
+
+ .install-form {
+ margin-bottom: $space-4;
+ }
+
+ // ---- Mono code well (integrity issue lines) ----
+ .wp-code-list {
+ margin-top: $space-3;
+ padding: $space-3 $space-4;
+ background: var(--bg-code);
+ border: 1px solid var(--border-soft);
+ border-radius: $radius-md;
+ max-height: 320px;
+ overflow-y: auto;
+ font-family: var(--mono);
+ font-size: 12px;
+ line-height: 1.7;
+ color: var(--text-code);
+ overflow-wrap: anywhere;
+ }
+
+ // ---- Run-history / incident rows (Updates + Reports) ----
+ .wp-run-row {
+ display: flex;
+ flex-direction: column;
+ gap: 3px;
+ padding: 11px 0;
+ border-top: 1px solid var(--border-soft);
+
+ &:first-child {
+ border-top: none;
+ padding-top: 0;
+ }
+
+ .form-hint {
+ margin-top: 0;
+ }
+ }
+
+ .wp-run-row-head {
+ display: flex;
+ align-items: center;
+ gap: $space-2;
+ flex-wrap: wrap;
+
+ strong {
+ font-size: 13px;
+ }
+ }
+
+ .wp-run-row-meta {
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
+ }
+
+ .wp-run-component {
+ font-family: var(--mono);
+ }
+
+ // ---- Analytics head (eyebrow + SegControl) ----
+ .wp-analytics-head {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ gap: $space-3;
+ flex-wrap: wrap;
+ }
+
+ .wp-eyebrow {
+ margin: 0;
+ font-family: var(--mono);
+ font-size: 11px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
+ }
+
+ // Recharts default tooltip → surface tokens (recharts inline-styles it)
+ .recharts-default-tooltip {
+ background: var(--surface-2) !important;
+ border: 1px solid var(--border) !important;
+ border-radius: var(--radius-sm);
+ box-shadow: var(--shadow-md);
+ font-family: var(--mono);
+ font-size: 11.5px;
+ }
+
+ .recharts-tooltip-label {
+ color: var(--text-faint) !important;
+ }
+
+ // ---- Report header actions keep normal type inside the eyebrow bar ----
+ .wp-report-actions {
+ font-family: $font-main;
+ text-transform: none;
+ letter-spacing: normal;
+ }
+
+ // ---- Commit list (scoped: Git.jsx renders .commit-item too) ----
+ .commit-list {
+ gap: 0;
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ overflow: hidden;
+ max-width: 860px;
+ }
+
+ .commit-item {
+ background: transparent;
+ border: none;
+ border-radius: 0;
+ padding: 12px $space-4;
+ transition: background 0.12s;
+
+ & + .commit-item {
+ border-top: 1px solid var(--border-soft);
+ }
+
+ &:hover {
+ background: var(--surface-2);
+ }
+
+ &.current {
+ background: fade($success, 5%);
+ }
+ }
+
+ .commit-icon {
+ color: var(--text-faint);
+
+ .current-icon {
+ color: var(--green);
+ }
+ }
+
+ .commit-sha {
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--accent-bright);
+ background: var(--accent-bg);
+ padding: 2px 7px;
+ border-radius: 5px;
+ }
+
+ .current-badge {
+ font-family: var(--mono);
+ font-size: 10px;
+ font-weight: $font-weight-semibold;
+ text-transform: uppercase;
+ letter-spacing: 0.05em;
+ background: var(--green-bg);
+ color: var(--green);
+ padding: 2px 7px;
+ border-radius: 5px;
+ }
+
+ .commit-date {
+ font-family: var(--mono);
+ font-size: 10.5px;
+ color: var(--text-faint);
+ }
+
+ .commit-message {
+ font-size: 13px;
+ font-weight: $font-weight-medium;
+ }
+
+ .commit-author {
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
+ }
+
+ // ---- DiskUsageBar container re-tint (styles live in _wordpress-pipeline) ----
+ .app-health-disk .disk-usage-bar-container {
+ background: var(--surface-2);
+ border-color: var(--border-soft);
+ }
+}
+
+// ---- Header environment switcher (prototype .env-switch / .env-menu) ----
+.wp-envswitch-wrap {
+ position: relative;
+ display: inline-flex;
+}
+
+.wp-envswitch {
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ padding: 5px 10px 5px 11px;
+ border: 1px solid var(--border-strong);
+ border-radius: 8px;
+ background: var(--surface-2);
+ font-family: $font-main;
+ font-size: 12.5px;
+ font-weight: $font-weight-medium;
+ letter-spacing: normal;
+ color: var(--text);
+ cursor: pointer;
+ transition: border-color 0.14s, background 0.14s;
+
+ .ed {
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ flex-shrink: 0;
+ }
+
+ .chev {
+ color: var(--text-faint);
+ transition: transform 0.15s;
+ }
+
+ &.open .chev {
+ transform: rotate(180deg);
+ }
+
+ &:hover {
+ background: var(--surface-3);
+ border-color: var(--border-strong);
+ }
+}
+
+.wp-envswitch-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ margin-top: 7px;
+ z-index: $z-dropdown + 5;
+ min-width: 280px;
+ background: var(--surface-2);
+ border: 1px solid var(--border-strong);
+ border-radius: 12px;
+ box-shadow: var(--shadow-lg);
+ padding: 7px;
}
-// Environment Cards
+.wp-envswitch-head {
+ font-family: var(--mono);
+ font-size: 10px;
+ letter-spacing: 0.12em;
+ text-transform: uppercase;
+ color: var(--text-ghost);
+ padding: 7px 10px 5px;
+}
+
+.wp-envswitch-opt {
+ display: flex;
+ align-items: center;
+ gap: 11px;
+ width: 100%;
+ padding: 9px 10px;
+ border: none;
+ border-radius: 9px;
+ background: none;
+ color: var(--text);
+ font-family: $font-main;
+ letter-spacing: normal;
+ text-transform: none;
+ text-align: left;
+ cursor: pointer;
+ transition: background 0.1s;
+
+ &:hover {
+ background: var(--surface-3);
+ }
+
+ .ed {
+ width: 9px;
+ height: 9px;
+ border-radius: 50%;
+ flex-shrink: 0;
+ }
+
+ .check {
+ margin-left: auto;
+ color: var(--accent-bright);
+ flex-shrink: 0;
+ }
+}
+
+.wp-envswitch-opt-body {
+ flex: 1;
+ min-width: 0;
+
+ .nm {
+ display: block;
+ font-weight: $font-weight-medium;
+ font-size: 13px;
+ }
+
+ .meta {
+ display: block;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ color: var(--text-faint);
+ margin-top: 1px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+}
+
+// ---- Surface card wrapper for dense tables (SnapshotTable & friends) ----
+.wp-table-card {
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ overflow: hidden;
+}
+
+.wp-th-right {
+ text-align: right !important;
+}
+
+.wp-cell-actions {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.wp-row-action {
+ display: inline-grid;
+ place-items: center;
+ width: 28px;
+ height: 28px;
+ border: none;
+ border-radius: 7px;
+ background: none;
+ color: var(--text-faint);
+ cursor: pointer;
+ transition: background 0.14s, color 0.14s;
+
+ &:hover:not(:disabled) {
+ background: var(--surface-3);
+ color: var(--text);
+ }
+
+ &:disabled {
+ opacity: 0.5;
+ cursor: default;
+ }
+
+ &--danger:hover:not(:disabled) {
+ background: var(--red-bg);
+ color: var(--red);
+ }
+}
+
+// Environment Cards (EnvironmentCard.jsx — WP detail Environments tab).
+// Restyled to the prototype's .env-card: quiet surface, accent border on
+// production, EnvTag/Pill rendered by the ds components.
.environments-grid {
display: grid;
- grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
+ grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
gap: $space-4;
margin-top: $space-4;
}
.wp-env-card {
- background: $bg-card;
- border: 1px solid $border-subtle;
- border-radius: $radius-lg;
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ transition: border-color 0.15s;
+
+ &:hover {
+ border-color: var(--border-strong);
+ }
&.production {
- border-color: fade($color-danger, 45%);
+ border-color: var(--accent-dim);
+
+ &:hover {
+ border-color: var(--accent-dim);
+ }
}
&.stale {
- border-color: fade($color-warning, 40%);
- background: fade($color-warning, 3%);
+ border-color: fade($warning, 35%);
}
}
@@ -465,12 +1266,13 @@
display: flex;
align-items: center;
gap: 4px;
- font-size: $font-size-xs;
+ font-family: var(--mono);
+ font-size: 10.5px;
font-weight: $font-weight-medium;
- padding: 2px 8px;
- border-radius: $radius-sm;
- background: fade($color-warning, 15%);
- color: $color-warning;
+ padding: 2px 7px;
+ border-radius: 5px;
+ background: var(--amber-bg);
+ color: var(--amber);
svg {
flex-shrink: 0;
@@ -478,23 +1280,12 @@
}
.text-warning {
- color: $color-warning !important;
-}
-
-.wp-env-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: $space-4;
- border-bottom: 1px solid $border-subtle;
-}
-
-.wp-env-info {
- display: flex;
- align-items: center;
- gap: $space-3;
+ color: var(--amber) !important;
}
+// Kept for the pipeline surfaces: PipelineView / WordPressProjects /
+// EnvironmentStatusBadge still render these classes (EnvironmentCard itself
+// now uses the ds EnvTag/Pill components instead).
.wp-env-badge {
font-size: $font-size-xs;
font-weight: $font-weight-bold;
@@ -519,13 +1310,6 @@
}
}
-.wp-env-name {
- font-size: $font-size-base;
- font-weight: $font-weight-semibold;
- color: $text-primary;
- margin: 0;
-}
-
.wp-env-status {
display: flex;
align-items: center;
@@ -556,17 +1340,45 @@
}
}
+.wp-env-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ gap: $space-2;
+ padding: 14px 16px;
+ border-bottom: 1px solid var(--border-soft);
+}
+
+.wp-env-info {
+ display: flex;
+ align-items: center;
+ gap: $space-2;
+ min-width: 0;
+}
+
+.wp-env-name {
+ font-size: 14px;
+ font-weight: $font-weight-semibold;
+ color: var(--text);
+ margin: 0;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
.wp-env-body {
- padding: $space-4;
+ padding: 14px 16px;
}
.wp-env-url {
margin-bottom: $space-3;
a {
- font-size: $font-size-sm;
- color: $color-primary;
- font-family: $font-family-mono;
+ font-family: var(--mono);
+ font-size: 12.5px;
+ color: var(--accent-bright);
+ text-decoration: none;
+ overflow-wrap: anywhere;
&:hover {
text-decoration: underline;
@@ -577,7 +1389,7 @@
.wp-env-meta {
display: grid;
grid-template-columns: repeat(2, 1fr);
- gap: $space-2;
+ gap: $space-3 $space-2;
}
.wp-env-meta-item {
@@ -585,106 +1397,152 @@
display: flex;
align-items: center;
gap: 4px;
- font-size: $font-size-xs;
- color: $text-tertiary;
- margin-bottom: 2px;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ letter-spacing: 0.05em;
+ text-transform: uppercase;
+ color: var(--text-faint);
+ margin-bottom: 3px;
+
+ svg {
+ color: var(--text-ghost);
+ }
}
.meta-value {
- font-size: $font-size-sm;
- color: $text-primary;
+ font-size: 12.5px;
+ color: var(--text);
&.mono {
- font-family: $font-family-mono;
+ font-family: var(--mono);
+ font-size: 12px;
}
}
}
.wp-env-footer {
display: flex;
- gap: $space-2;
- padding: $space-3 $space-4;
- border-top: 1px solid $border-subtle;
- background: $bg-tertiary;
- border-radius: 0 0 $radius-lg $radius-lg;
+ gap: $space-1;
+ padding: 10px 12px;
+ border-top: 1px solid var(--border-soft);
+ background: transparent;
+ border-radius: 0 0 var(--radius) var(--radius);
}
-// Snapshot Table
+// Snapshot Table (SnapshotTable.jsx — now a .sk-dtable inside .wp-table-card)
.wp-snapshot-table {
.snapshot-name-cell {
display: flex;
flex-direction: column;
- gap: 2px;
+ gap: 3px;
}
.snapshot-name {
- font-weight: $font-weight-medium;
- color: $text-primary;
+ font-weight: 550;
+ font-size: 13px;
+ color: var(--text);
}
.snapshot-tag {
display: inline-flex;
align-items: center;
gap: 4px;
- font-size: $font-size-xs;
- color: $color-info;
- background: fade($color-info, 10%);
- padding: 2px 6px;
- border-radius: $radius-sm;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ color: var(--cyan);
+ background: var(--cyan-bg);
+ padding: 2px 7px;
+ border-radius: 5px;
width: fit-content;
}
.snapshot-desc {
- font-size: $font-size-xs;
- color: $text-tertiary;
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
+ }
+
+ .snapshot-date {
+ font-family: var(--mono);
+ font-size: 12px;
+ color: var(--text-dim);
+ }
+
+ .mono {
+ font-family: var(--mono);
+ font-size: 12px;
+ color: var(--text-dim);
}
.compressed-badge {
display: inline-block;
+ font-family: var(--mono);
font-size: 10px;
- background: fade($color-success, 10%);
- color: $color-success;
- padding: 1px 4px;
- border-radius: 3px;
+ background: var(--green-bg);
+ color: var(--green);
+ padding: 1px 5px;
+ border-radius: 4px;
margin-left: $space-2;
}
+ .text-muted {
+ color: var(--text-ghost);
+ font-family: var(--mono);
+ }
+
.git-context {
display: flex;
align-items: center;
gap: 6px;
- color: $text-secondary;
+ color: var(--text-dim);
svg {
- color: $text-tertiary;
+ color: var(--text-faint);
+ flex-shrink: 0;
+ }
+
+ .git-context-sha {
+ color: var(--accent-bright);
+ background: var(--accent-bg);
+ padding: 1px 6px;
+ border-radius: 4px;
+ font-size: 11px;
}
.commit-msg {
- font-size: $font-size-xs;
- color: $text-tertiary;
- margin-left: $space-2;
+ font-size: 11.5px;
+ color: var(--text-faint);
+ margin-left: $space-1;
}
}
}
-// Git Connect Form
+// Git Connect Form (GitConnectForm.jsx — WP detail Git tab)
.git-connect-form {
max-width: 600px;
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ padding: $space-5;
h4 {
margin: 0 0 $space-2;
+ font-size: 14.5px;
+ font-weight: $font-weight-semibold;
+ color: var(--text);
}
.hint {
- color: $text-tertiary;
+ color: var(--text-faint);
+ font-size: 12.5px;
margin-bottom: $space-4;
}
}
.git-connected-card {
- background: $bg-card;
- border: 1px solid $border-subtle;
- border-radius: $radius-lg;
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
padding: $space-5;
max-width: 600px;
}
@@ -692,27 +1550,36 @@
.git-connected-header {
display: flex;
align-items: flex-start;
- gap: $space-4;
+ gap: $space-3;
margin-bottom: $space-4;
> svg {
- color: $color-success;
+ width: 34px;
+ height: 34px;
+ padding: 8px;
+ border-radius: 9px;
+ background: var(--green-bg);
+ color: var(--green);
flex-shrink: 0;
}
h4 {
margin: 0 0 $space-1;
- font-size: $font-size-base;
+ font-size: 14.5px;
+ font-weight: $font-weight-semibold;
+ color: var(--text);
}
}
.git-repo-url {
- font-size: $font-size-sm;
- font-family: $font-family-mono;
- color: $text-secondary;
+ font-family: var(--mono);
+ font-size: 12.5px;
+ color: var(--accent-bright);
+ text-decoration: none;
+ overflow-wrap: anywhere;
&:hover {
- color: $color-primary;
+ text-decoration: underline;
}
}
@@ -721,7 +1588,8 @@
grid-template-columns: repeat(2, 1fr);
gap: $space-3;
padding: $space-4;
- background: $bg-tertiary;
+ background: var(--surface-2);
+ border: 1px solid var(--border-soft);
border-radius: $radius-md;
margin-bottom: $space-4;
}
@@ -729,17 +1597,21 @@
.git-meta-item {
.meta-label {
display: block;
- font-size: $font-size-xs;
- color: $text-tertiary;
- margin-bottom: 2px;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ letter-spacing: 0.05em;
+ text-transform: uppercase;
+ color: var(--text-faint);
+ margin-bottom: 3px;
}
.meta-value {
- font-size: $font-size-sm;
- color: $text-primary;
+ font-size: 13px;
+ color: var(--text);
&.mono {
- font-family: $font-family-mono;
+ font-family: var(--mono);
+ font-size: 12px;
}
}
}
@@ -854,7 +1726,7 @@
border-top: 1px solid $border-subtle;
}
-// Quick Actions
+// Quick Actions (WP detail Overview — exclusive to this page)
.quick-actions-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
@@ -865,21 +1737,37 @@
display: flex;
align-items: center;
justify-content: center;
- gap: $space-2;
- padding: $space-3;
- background: $bg-tertiary;
- border: 1px solid $border-subtle;
- border-radius: $radius-md;
- color: $text-secondary;
- font-size: $font-size-sm;
+ gap: 7px;
+ padding: 10px $space-2;
+ background: var(--surface-2);
+ border: 1px solid var(--border-soft);
+ border-radius: 8px;
+ color: var(--text-dim);
+ font-size: 12.5px;
font-weight: $font-weight-medium;
text-decoration: none;
- transition: all 0.15s ease;
+ cursor: pointer;
+ transition: background 0.14s, border-color 0.14s, color 0.14s;
- &:hover {
- background: $bg-hover;
- border-color: $border-hover;
- color: $text-primary;
+ svg {
+ color: var(--text-faint);
+ flex-shrink: 0;
+ transition: color 0.14s;
+ }
+
+ &:hover:not(:disabled) {
+ background: var(--accent-bg-soft);
+ border-color: var(--accent-dim);
+ color: var(--text);
+
+ svg {
+ color: var(--accent-bright);
+ }
+ }
+
+ &:disabled {
+ opacity: 0.55;
+ cursor: default;
}
}