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 infra overlays (logs dock, SSH terminal, container logs)

Juan Denis7b1e9849ab90
diff --git a/frontend/src/components/LogsDrawer.jsx b/frontend/src/components/LogsDrawer.jsx
index 9ae9f3b6..432f0260 100644
--- a/frontend/src/components/LogsDrawer.jsx
+++ b/frontend/src/components/LogsDrawer.jsx
@@ -38,7 +38,7 @@ const LogsDrawer = () => {
const initial = data.logs.split('\n').filter(Boolean);
setLines(initial.slice(-MAX_LINES));
}
- } catch {}
+ } catch { /* initial snapshot is best-effort; live stream still attaches */ }
}
loadInitial();
@@ -103,11 +103,16 @@ const LogsDrawer = () => {
if (drawerState === 'closed' || !service) return null;
const lastLine = lines.length > 0 ? lines[lines.length - 1] : 'Waiting for logs...';
+ const sourceLabel = service.logPath
+ || (service.containerId ? `docker · ${String(service.containerId).slice(0, 12)}` : null)
+ || service.appType
+ || 'live stream';
if (drawerState === 'collapsed') {
return (
<div className="logs-drawer logs-drawer--collapsed" onClick={expandDrawer}>
<div className="logs-drawer__collapsed-bar">
+ <span className="logs-drawer__live-dot" />
<span className="logs-drawer__service-name">{service.name}</span>
<span className="logs-drawer__last-line">{lastLine}</span>
<div className="logs-drawer__collapsed-actions">
@@ -135,11 +140,21 @@ const LogsDrawer = () => {
{/* Header */}
<div className="logs-drawer__header">
<div className="logs-drawer__header-left">
- <span className="logs-drawer__live-dot" />
- <span className="logs-drawer__service-name">{service.name}</span>
- <span className="logs-drawer__line-count">{lines.length} lines</span>
+ <span className="logs-drawer__ico">
+ <svg viewBox="0 0 24 24" width="14" height="14" stroke="currentColor" fill="none" strokeWidth="2">
+ <polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/>
+ </svg>
+ </span>
+ <div className="logs-drawer__titles">
+ <span className="logs-drawer__service-name">{service.name}</span>
+ <span className="logs-drawer__source">{sourceLabel}</span>
+ </div>
</div>
<div className="logs-drawer__header-right">
+ <span className="logs-drawer__live">
+ <span className="logs-drawer__live-dot" />
+ {lines.length} lines
+ </span>
<label className="logs-drawer__toggle">
<Switch checked={autoScroll} onCheckedChange={setAutoScroll} />
<span>Auto-scroll</span>
diff --git a/frontend/src/components/RemoteTerminal.jsx b/frontend/src/components/RemoteTerminal.jsx
index 9351cd5a..1cc97f9f 100644
--- a/frontend/src/components/RemoteTerminal.jsx
+++ b/frontend/src/components/RemoteTerminal.jsx
@@ -31,28 +31,30 @@ export default function RemoteTerminal({ serverId, onClose }) {
cursorBlink: true,
fontSize: 14,
fontFamily: 'Menlo, Monaco, "Courier New", monospace',
+ // Redesign palette (xterm needs literal hex — keep in sync with
+ // the .terminal-content well in _logs-drawer.scss).
theme: {
- background: '#1e1e1e',
- foreground: '#d4d4d4',
- cursor: '#ffffff',
- cursorAccent: '#1e1e1e',
- selection: 'rgba(255, 255, 255, 0.3)',
- black: '#000000',
- red: '#cd3131',
- green: '#0dbc79',
- yellow: '#e5e510',
- blue: '#2472c8',
- magenta: '#bc3fbc',
- cyan: '#11a8cd',
- white: '#e5e5e5',
- brightBlack: '#666666',
- brightRed: '#f14c4c',
- brightGreen: '#23d18b',
- brightYellow: '#f5f543',
- brightBlue: '#3b8eea',
- brightMagenta: '#d670d6',
- brightCyan: '#29b8db',
- brightWhite: '#ffffff'
+ background: '#0a0b0e',
+ foreground: '#c4cdda',
+ cursor: '#8b93ff',
+ cursorAccent: '#0a0b0e',
+ selectionBackground: 'rgba(109, 124, 255, 0.35)',
+ black: '#1c2029',
+ red: '#fb6f6f',
+ green: '#3ddc97',
+ yellow: '#f5b945',
+ blue: '#6d7cff',
+ magenta: '#b07bf5',
+ cyan: '#49c7f0',
+ white: '#c4cdda',
+ brightBlack: '#646b7a',
+ brightRed: '#ff9292',
+ brightGreen: '#6ae8b2',
+ brightYellow: '#ffd075',
+ brightBlue: '#8b93ff',
+ brightMagenta: '#c79bf8',
+ brightCyan: '#74d9f5',
+ brightWhite: '#e9ebf0'
},
allowProposedApi: true
});
@@ -216,10 +218,17 @@ export default function RemoteTerminal({ serverId, onClose }) {
return (
<div className="remote-terminal-container">
<div className="terminal-header">
- <div className="terminal-title">
- <span className={`terminal-status ${connected ? 'connected' : 'disconnected'}`} />
- <span>{shellName || 'Terminal'}</span>
- {sessionId && <span className="session-id">({sessionId})</span>}
+ <span className="terminal-ico">
+ <svg viewBox="0 0 24 24" width="14" height="14" stroke="currentColor" fill="none" strokeWidth="2">
+ <polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/>
+ </svg>
+ </span>
+ <div className="terminal-titles">
+ <div className="terminal-title">
+ <span className={`terminal-status ${connected ? 'connected' : 'disconnected'}`} />
+ <span>{shellName || 'Terminal'}</span>
+ </div>
+ {sessionId && <span className="session-id">{sessionId}</span>}
</div>
<div className="terminal-actions">
<button
@@ -227,7 +236,9 @@ export default function RemoteTerminal({ serverId, onClose }) {
onClick={handleClose}
title="Close terminal"
>
- &times;
+ <svg viewBox="0 0 24 24" width="14" height="14" stroke="currentColor" fill="none" strokeWidth="2">
+ <line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>
+ </svg>
</button>
</div>
</div>
@@ -237,92 +248,10 @@ export default function RemoteTerminal({ serverId, onClose }) {
onClick={handleClick}
/>
{error && (
- <div className="alert alert-danger">
+ <div className="terminal-alert">
{error}
</div>
)}
- <style>{`
- .remote-terminal-container {
- display: flex;
- flex-direction: column;
- height: 100%;
- background: #1e1e1e;
- border-radius: 6px;
- overflow: hidden;
- }
-
- .terminal-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 8px 12px;
- background: #252526;
- border-bottom: 1px solid #3c3c3c;
- }
-
- .terminal-title {
- display: flex;
- align-items: center;
- gap: 8px;
- color: #cccccc;
- font-size: 13px;
- }
-
- .terminal-status {
- width: 8px;
- height: 8px;
- border-radius: 50%;
- background: #666;
- }
-
- .terminal-status.connected {
- background: #0dbc79;
- }
-
- .terminal-status.disconnected {
- background: #cd3131;
- }
-
- .session-id {
- color: #666;
- font-size: 11px;
- }
-
- .terminal-actions {
- display: flex;
- gap: 4px;
- }
-
- .terminal-close-btn {
- background: none;
- border: none;
- color: #cccccc;
- font-size: 18px;
- cursor: pointer;
- padding: 2px 6px;
- border-radius: 4px;
- }
-
- .terminal-close-btn:hover {
- background: #3c3c3c;
- }
-
- .terminal-content {
- flex: 1;
- padding: 8px;
- }
-
- .terminal-content .xterm {
- height: 100%;
- }
-
- .terminal-error {
- padding: 8px 12px;
- background: #5a1d1d;
- color: #f48771;
- font-size: 13px;
- }
- `}</style>
</div>
);
}
diff --git a/frontend/src/components/wordpress/ContainerLogs.jsx b/frontend/src/components/wordpress/ContainerLogs.jsx
index 7554b464..694973fb 100644
--- a/frontend/src/components/wordpress/ContainerLogs.jsx
+++ b/frontend/src/components/wordpress/ContainerLogs.jsx
@@ -57,8 +57,13 @@ const ContainerLogs = ({ projectId, envId, onClose }) => {
<div className="container-logs-panel">
<div className="container-logs-header">
<div className="container-logs-title">
- <Terminal size={16} />
- <span>Container Logs</span>
+ <span className="container-logs-ico">
+ <Terminal size={15} />
+ </span>
+ <div className="container-logs-titles">
+ <span>Container Logs</span>
+ <span className="container-logs-sub">env-{envId} · {service}</span>
+ </div>
</div>
<div className="container-logs-controls">
<Select value={service} onValueChange={setService}>
diff --git a/frontend/src/styles/components/_logs-drawer.scss b/frontend/src/styles/components/_logs-drawer.scss
index d1d2d39f..2b2dc16a 100644
--- a/frontend/src/styles/components/_logs-drawer.scss
+++ b/frontend/src/styles/components/_logs-drawer.scss
@@ -1,30 +1,46 @@
// ============================================
-// PERSISTENT LOGS DRAWER
+// INFRA OVERLAYS (redesign map §4 #21)
+// Bottom-dock logs drawer + SSH remote-terminal overlay.
+// The logs drawer STAYS a bottom dock (open product decision §6.3).
// ============================================
+@keyframes sk-overlay-blink {
+ 0%, 100% { opacity: 1; }
+ 50% { opacity: 0.3; }
+}
+
+// --------------------------------------------
+// PERSISTENT LOGS DRAWER (bottom dock)
+// --------------------------------------------
.logs-drawer {
position: fixed;
bottom: 0;
left: $sidebar-width;
right: 0;
z-index: $z-fixed;
- background: $bg-card;
- border-top: 1px solid $border-subtle;
+ background: var(--surface);
+ border-top: 1px solid var(--border-strong);
display: flex;
flex-direction: column;
+ // Sidebar is off-canvas on mobile — dock spans the full width.
+ @media (max-width: $breakpoint-md) {
+ left: 0;
+ }
+
&--collapsed {
height: 36px;
cursor: pointer;
transition: background $transition-fast;
&:hover {
- background: $bg-hover;
+ background: var(--surface-hover);
}
}
&--expanded {
- box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
+ // Up-facing variant of --shadow-lg (token shadows cast downward).
+ box-shadow: 0 -16px 48px -12px rgba(0, 0, 0, 0.5);
}
// Resize drag handle
@@ -37,7 +53,7 @@
&:hover,
&:active {
- background: $accent-primary;
+ background: var(--accent);
}
}
@@ -48,6 +64,7 @@
gap: $space-3;
padding: 0 $space-4;
height: 36px;
+ min-width: 0;
overflow: hidden;
}
@@ -61,49 +78,87 @@
display: flex;
align-items: center;
justify-content: space-between;
+ gap: $space-3;
padding: $space-2 $space-4;
- border-bottom: 1px solid $border-subtle;
+ border-bottom: 1px solid var(--border-soft);
flex-shrink: 0;
}
- &__header-left,
- &__header-right {
+ &__header-left {
display: flex;
align-items: center;
gap: $space-3;
+ min-width: 0;
}
- &__live-dot {
- width: 8px;
- height: 8px;
- border-radius: $radius-full;
- background: $success;
- animation: live-pulse 2s infinite;
+ &__header-right {
+ display: flex;
+ align-items: center;
+ gap: $space-2;
flex-shrink: 0;
+ }
- @keyframes live-pulse {
- 0%, 100% { opacity: 1; }
- 50% { opacity: 0.4; }
- }
+ // Icon tile (drawer-head idiom)
+ &__ico {
+ width: 28px;
+ height: 28px;
+ border-radius: 8px;
+ display: grid;
+ place-items: center;
+ background: var(--cyan-bg);
+ color: var(--cyan);
+ flex-shrink: 0;
+ }
+
+ &__titles {
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
}
&__service-name {
+ font-size: 13px;
font-weight: $font-weight-semibold;
- font-size: $font-size-sm;
- color: $text-primary;
+ color: var(--text);
white-space: nowrap;
}
- &__line-count {
- font-size: $font-size-xs;
- color: $text-tertiary;
+ // Mono sub — the log source (path / container)
+ &__source {
+ font-family: var(--mono);
+ font-size: 10.5px;
+ color: var(--text-faint);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ // Live indicator + line count (mono, demo log-foot idiom)
+ &__live {
+ display: inline-flex;
+ align-items: center;
+ gap: 7px;
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
+ white-space: nowrap;
+ }
+
+ &__live-dot {
+ width: 7px;
+ height: 7px;
+ border-radius: 50%;
+ background: var(--green);
+ box-shadow: 0 0 7px var(--green);
+ animation: sk-overlay-blink 1.4s infinite;
+ flex-shrink: 0;
}
&__last-line {
flex: 1;
- font-family: $font-mono;
- font-size: $font-size-xs;
- color: $text-tertiary;
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -112,45 +167,177 @@
&__toggle {
display: flex;
align-items: center;
- gap: $space-1;
- font-size: $font-size-xs;
- color: $text-tertiary;
+ gap: 7px;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
cursor: pointer;
user-select: none;
-
- input {
- accent-color: $accent-primary-raw;
- }
}
- // Log content area
+ // Log content area — code well
&__content {
flex: 1;
overflow-y: auto;
padding: $space-2 $space-4;
- font-family: $font-mono;
- font-size: $font-size-xs;
- line-height: 1.6;
- background: $bg-body;
+ font-family: var(--mono);
+ font-size: $font-size-sm;
+ line-height: 1.7;
+ background: var(--bg-code);
+ scrollbar-width: thin;
}
&__empty {
- color: $text-tertiary;
+ font-family: var(--mono);
+ color: var(--text-faint);
padding: $space-4;
text-align: center;
}
&__line {
- color: $text-secondary;
+ color: var(--text-dim);
white-space: pre-wrap;
word-break: break-all;
&--error {
- color: $danger;
+ color: var(--red);
}
&--warn {
- color: $warning;
+ color: var(--amber);
}
}
}
+
+// --------------------------------------------
+// REMOTE TERMINAL (SSH overlay — xterm host)
+// All rules scoped under the container so the generic class names
+// (.terminal-header/.terminal-title/…) can never leak.
+// --------------------------------------------
+.remote-terminal-container {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ background: var(--surface);
+ border: 1px solid var(--border-strong);
+ border-radius: var(--radius);
+ box-shadow: var(--shadow-lg);
+ overflow: hidden;
+
+ .terminal-header {
+ display: flex;
+ align-items: center;
+ gap: $space-3;
+ padding: $space-2 $space-3;
+ background: var(--surface);
+ border-bottom: 1px solid var(--border-soft);
+ flex-shrink: 0;
+ }
+
+ // Icon tile (demo SSH drawer: green terminal tile)
+ .terminal-ico {
+ width: 28px;
+ height: 28px;
+ border-radius: 8px;
+ display: grid;
+ place-items: center;
+ background: var(--green-bg);
+ color: var(--green);
+ flex-shrink: 0;
+ }
+
+ .terminal-titles {
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
+ flex: 1;
+ }
+
+ .terminal-title {
+ display: flex;
+ align-items: center;
+ gap: $space-2;
+ font-size: 13px;
+ font-weight: $font-weight-semibold;
+ color: var(--text);
+ white-space: nowrap;
+ }
+
+ .terminal-status {
+ width: 7px;
+ height: 7px;
+ border-radius: 50%;
+ background: var(--text-ghost);
+ flex-shrink: 0;
+
+ &.connected {
+ background: var(--green);
+ box-shadow: 0 0 7px var(--green);
+ animation: sk-overlay-blink 1.4s infinite;
+ }
+
+ &.disconnected {
+ background: var(--red);
+ }
+ }
+
+ .session-id {
+ font-family: var(--mono);
+ font-size: 10.5px;
+ color: var(--text-faint);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ .terminal-actions {
+ display: flex;
+ align-items: center;
+ gap: $space-1;
+ flex-shrink: 0;
+ }
+
+ .terminal-close-btn {
+ width: 28px;
+ height: 28px;
+ display: grid;
+ place-items: center;
+ background: transparent;
+ border: none;
+ border-radius: $radius-md;
+ color: var(--text-faint);
+ cursor: pointer;
+ transition: background $transition-fast, color $transition-fast;
+
+ &:hover {
+ background: var(--surface-2);
+ color: var(--text);
+ }
+ }
+
+ // The xterm well is intentionally near-black in BOTH themes — it must
+ // match the literal `background` in RemoteTerminal's xterm theme object
+ // (xterm requires literal hex, so it can't follow var(--bg-code)).
+ .terminal-content {
+ flex: 1;
+ min-height: 0;
+ padding: $space-2 $space-3;
+ background: #0a0b0e;
+
+ .xterm {
+ height: 100%;
+ }
+ }
+
+ .terminal-alert {
+ padding: $space-2 $space-3;
+ border-top: 1px solid var(--border-soft);
+ background: var(--red-bg);
+ color: var(--red);
+ font-family: var(--mono);
+ font-size: $font-size-sm;
+ }
+}
diff --git a/frontend/src/styles/pages/_wordpress-pipeline.scss b/frontend/src/styles/pages/_wordpress-pipeline.scss
index 266995ef..98c2541d 100644
--- a/frontend/src/styles/pages/_wordpress-pipeline.scss
+++ b/frontend/src/styles/pages/_wordpress-pipeline.scss
@@ -1062,8 +1062,9 @@
max-width: 100%;
height: 400px;
z-index: 200;
- box-shadow: -4px -4px 24px rgba(0, 0, 0, 0.3);
- border-radius: $radius-lg $radius-lg 0 0;
+ // Up-facing variant of --shadow-lg (token shadows cast downward).
+ box-shadow: 0 -16px 48px -12px rgba(0, 0, 0, 0.5);
+ border-radius: var(--radius-lg) var(--radius-lg) 0 0;
overflow: hidden;
@media (max-width: $breakpoint-md) {
@@ -1075,66 +1076,105 @@
display: flex;
flex-direction: column;
height: 100%;
- background: $bg-body;
- border: 1px solid $border-subtle;
- border-radius: $radius-lg $radius-lg 0 0;
+ background: var(--surface);
+ border: 1px solid var(--border-strong);
+ border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.container-logs-header {
display: flex;
align-items: center;
justify-content: space-between;
- padding: $space-3 $space-4;
- border-bottom: 1px solid $border-subtle;
- background: $bg-elevated;
+ gap: $space-3;
+ padding: $space-2 $space-3;
+ border-bottom: 1px solid var(--border-soft);
+ background: var(--surface);
}
.container-logs-title {
display: flex;
align-items: center;
- gap: $space-2;
- font-size: $font-size-sm;
+ gap: $space-3;
+ min-width: 0;
+ color: var(--text);
+}
+
+.container-logs-ico {
+ width: 28px;
+ height: 28px;
+ border-radius: 8px;
+ display: grid;
+ place-items: center;
+ background: var(--cyan-bg);
+ color: var(--cyan);
+ flex-shrink: 0;
+}
+
+.container-logs-titles {
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
+ font-size: 13px;
font-weight: $font-weight-semibold;
- color: $text-primary;
+}
+
+.container-logs-sub {
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-normal;
+ color: var(--text-faint);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.container-logs-controls {
display: flex;
align-items: center;
gap: $space-2;
+ flex-shrink: 0;
}
.logs-service-select,
.logs-lines-select {
- padding: 4px 8px;
- font-size: $font-size-xs;
- border: 1px solid $border-subtle;
- border-radius: $radius-sm;
- background: $bg-card;
- color: $text-primary;
+ padding: 4px $space-2;
+ font-family: var(--mono);
+ font-size: 11.5px;
+ border: 1px solid var(--border);
+ border-radius: $radius-md;
+ background: var(--surface-2);
+ color: var(--text-dim);
+ transition: border-color $transition-fast, color $transition-fast;
+
+ &:hover {
+ border-color: var(--border-strong);
+ color: var(--text);
+ }
}
.container-logs-body {
flex: 1;
overflow-y: auto;
- background: $bg-body;
+ background: var(--bg-code);
+ scrollbar-width: thin;
}
.logs-loading,
.logs-empty {
padding: $space-6;
text-align: center;
- color: $text-tertiary;
+ color: var(--text-faint);
+ font-family: var(--mono);
font-size: $font-size-sm;
}
.logs-content {
margin: 0;
- padding: $space-3;
- font-family: $font-family-mono;
+ padding: $space-3 $space-4;
+ font-family: var(--mono);
font-size: 12px;
- line-height: 1.6;
- color: $text-secondary;
+ line-height: 1.7;
+ color: var(--text-dim);
white-space: pre-wrap;
word-break: break-all;
}