v2.5.0: redesign local admin and repair stats

This commit is contained in:
Виталий Литвинов
2026-04-24 22:30:09 +03:00
parent 008143a617
commit d9e4831e44
10 changed files with 1521 additions and 391 deletions

View File

@@ -1,22 +1,50 @@
:root {
color-scheme: light;
--bg: #f5f7fb;
--bg: #f4f7fb;
--panel: #ffffff;
--panel-2: #f9fbff;
--text: #172033;
--muted: #647087;
--line: #dfe6f1;
--panel-soft: #f8fafd;
--panel-strong: #eef3fa;
--text: #111827;
--muted: #667085;
--line: #dde5ef;
--blue: #2563eb;
--green: #0f9f6e;
--amber: #c77700;
--red: #d92d20;
--ink: #0d172a;
--shadow: 0 18px 55px rgba(16, 24, 40, 0.08);
--violet: #7c3aed;
--sidebar: #111827;
--sidebar-text: #dbe5f2;
--sidebar-muted: #8fa1b8;
--button: #121926;
--button-text: #ffffff;
--shadow: 0 18px 50px rgba(15, 23, 42, .08);
}
:root[data-theme="dark"] {
color-scheme: dark;
--bg: #070b12;
--panel: #0f1724;
--panel-soft: #111c2d;
--panel-strong: #172235;
--text: #e7edf7;
--muted: #98a7bd;
--line: #263348;
--blue: #60a5fa;
--green: #34d399;
--amber: #fbbf24;
--red: #f87171;
--violet: #a78bfa;
--sidebar: #050810;
--sidebar-text: #eef4ff;
--sidebar-muted: #8d9bb1;
--button: #e7edf7;
--button-text: #0b1220;
--shadow: 0 18px 55px rgba(0, 0, 0, .34);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { min-width: 320px; }
body {
margin: 0;
@@ -26,44 +54,58 @@ body {
font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select {
font: inherit;
}
button, input, select { font: inherit; }
button {
min-height: 40px;
border: 0;
border-radius: 8px;
padding: 10px 14px;
background: var(--ink);
color: #fff;
background: var(--button);
color: var(--button-text);
cursor: pointer;
transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
transition: transform .16s ease, box-shadow .16s ease, background .16s ease, opacity .16s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 12px 25px rgba(16, 24, 40, .16); }
button:disabled { opacity: .55; cursor: wait; transform: none; box-shadow: none; }
button.ghost { background: #e8eef8; color: var(--ink); }
button.danger { background: #fee4e2; color: #b42318; }
button.soft { background: #eef4ff; color: #1d4ed8; }
button:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(15, 23, 42, .16); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
button.ghost { background: var(--panel-strong); color: var(--text); }
button.soft { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }
button.danger { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
button.attention { background: var(--amber); color: #111827; }
input, select {
min-height: 42px;
min-width: 0;
border: 1px solid var(--line);
border-radius: 8px;
background: #fff;
background: var(--panel);
color: var(--text);
padding: 0 12px;
outline: none;
}
input:focus, select:focus {
border-color: #8bb4ff;
box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
border-color: var(--blue);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent);
}
.shell {
h1, h2, p { margin: 0; }
h1 {
font-size: clamp(24px, 3vw, 34px);
line-height: 1.12;
letter-spacing: 0;
}
h2 {
font-size: clamp(18px, 2vw, 22px);
line-height: 1.2;
}
.app-shell {
display: grid;
grid-template-columns: 248px minmax(0, 1fr);
grid-template-columns: 260px minmax(0, 1fr);
min-height: 100vh;
}
@@ -71,21 +113,25 @@ input:focus, select:focus {
position: sticky;
top: 0;
height: 100vh;
display: flex;
flex-direction: column;
gap: 26px;
padding: 24px 18px;
background: #0f172a;
color: #e5edf8;
background: var(--sidebar);
color: var(--sidebar-text);
}
.brand {
display: flex;
gap: 12px;
align-items: center;
margin-bottom: 30px;
gap: 12px;
min-width: 0;
}
.brand-mark, .mark {
.brand-mark {
display: grid;
place-items: center;
flex: 0 0 42px;
width: 42px;
height: 42px;
border-radius: 8px;
@@ -96,66 +142,143 @@ input:focus, select:focus {
.brand span {
display: block;
color: #93a4bc;
color: var(--sidebar-muted);
font-size: 12px;
}
nav {
.nav-tabs {
display: grid;
gap: 6px;
}
nav a {
color: #b8c5d8;
text-decoration: none;
border-radius: 8px;
padding: 10px 12px;
transition: background .18s ease, color .18s ease;
.nav-item {
width: 100%;
justify-content: flex-start;
text-align: left;
background: transparent;
color: var(--sidebar-muted);
box-shadow: none;
}
nav a:hover, nav a.active {
background: rgba(255,255,255,.08);
color: #fff;
.nav-item:hover,
.nav-item.active {
background: rgba(255, 255, 255, .08);
color: var(--sidebar-text);
box-shadow: none;
}
main {
width: min(1400px, 100%);
padding: 26px;
.sidebar-foot {
margin-top: auto;
display: grid;
gap: 4px;
color: var(--sidebar-muted);
font-size: 12px;
}
.topbar, .section-head {
.workspace {
min-width: 0;
}
.topbar {
position: sticky;
top: 0;
z-index: 5;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 22px 28px;
border-bottom: 1px solid var(--line);
background: color-mix(in srgb, var(--bg) 86%, transparent);
backdrop-filter: blur(16px);
}
.topbar {
margin-bottom: 24px;
.title-block {
min-width: 0;
}
h1, h2, p {
margin: 0;
.title-block small {
color: var(--muted);
}
h1 {
font-size: 30px;
line-height: 1.15;
.top-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 10px;
flex-wrap: wrap;
}
h2 {
font-size: 20px;
.icon-btn {
width: 42px;
padding: 0;
}
.mobile-only {
display: none;
}
.pill,
.status-pill {
display: inline-flex;
align-items: center;
min-height: 32px;
border-radius: 8px;
padding: 6px 10px;
background: var(--panel-strong);
color: var(--text);
font-weight: 700;
font-size: 12px;
}
.content {
width: min(1480px, 100%);
padding: 28px;
}
.page-panel {
display: none;
}
.page-panel.active {
display: grid;
gap: 18px;
}
.eyebrow {
color: var(--muted);
font-size: 12px;
text-transform: uppercase;
font-weight: 700;
font-weight: 800;
}
.section {
margin-bottom: 24px;
.panel,
.metric-card {
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel);
box-shadow: var(--shadow);
}
.panel {
padding: 18px;
min-width: 0;
}
.panel-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
margin-bottom: 16px;
}
.panel-actions,
.inline-form {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.metric-grid {
@@ -164,109 +287,219 @@ h2 {
gap: 14px;
}
.metric-card, .chart-wrap, .table-wrap, .activity, .backup-list, .logs {
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel);
box-shadow: var(--shadow);
}
.metric-card {
min-height: 124px;
position: relative;
min-height: 126px;
padding: 18px;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.metric-card span, .metric-card small {
.metric-card::before {
content: "";
position: absolute;
inset: 0 auto 0 0;
width: 4px;
background: var(--blue);
}
.metric-card.accent-green::before { background: var(--green); }
.metric-card.accent-violet::before { background: var(--violet); }
.metric-card.accent-amber::before { background: var(--amber); }
.metric-card span,
.metric-card small {
color: var(--muted);
}
.metric-card strong {
font-size: 28px;
line-height: 1.1;
min-width: 0;
overflow-wrap: anywhere;
font-size: clamp(24px, 3vw, 32px);
line-height: 1.05;
}
.grid-two {
display: grid;
grid-template-columns: minmax(0, 1.5fr) minmax(320px, .9fr);
gap: 18px;
}
.service-grid {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
grid-template-columns: repeat(5, minmax(150px, 1fr));
gap: 12px;
margin-top: 14px;
}
.service {
display: grid;
gap: 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-2);
background: var(--panel-soft);
padding: 14px;
}
.status {
.service strong {
display: block;
margin-bottom: 6px;
}
.service span {
display: inline-flex;
align-items: center;
gap: 8px;
color: var(--muted);
}
.dot {
.service i {
width: 9px;
height: 9px;
border-radius: 50%;
background: var(--muted);
}
.running .dot { background: var(--green); }
.failed .dot, .not_installed .dot { background: var(--red); }
.inactive .dot, .stopped .dot { background: var(--amber); }
.status-running i { background: var(--green); }
.status-failed i { background: var(--red); }
.status-inactive i,
.status-stopped i,
.status-activating i,
.status-deactivating i { background: var(--amber); }
.status-not_installed i { background: var(--muted); }
.split {
.runtime-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 360px;
gap: 14px;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.chart-wrap {
margin-top: 14px;
padding: 16px;
}
.activity {
padding: 16px;
overflow: hidden;
}
pre {
white-space: pre-wrap;
word-break: break-word;
}
#runtimeBox, .logs {
max-height: 340px;
overflow: auto;
color: #344054;
background: #f7f9fc;
.runtime-grid article,
.traffic-summary article {
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
padding: 12px;
}
.inline-form {
display: flex;
align-items: center;
.runtime-grid span,
.traffic-summary span,
.settings-list span {
display: block;
color: var(--muted);
font-size: 12px;
}
.runtime-grid strong,
.traffic-summary strong {
display: block;
margin-top: 3px;
overflow-wrap: anywhere;
font-size: 18px;
}
.issue-list {
margin-top: 12px;
display: grid;
gap: 8px;
}
.issue {
display: flex;
justify-content: space-between;
gap: 12px;
border-radius: 8px;
background: color-mix(in srgb, var(--amber) 12%, transparent);
color: var(--text);
padding: 10px 12px;
}
.traffic-summary {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
margin-bottom: 14px;
}
.health-ok { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.health-error { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); }
.health-stale,
.health-stopped { background: color-mix(in srgb, var(--amber) 20%, transparent); color: var(--amber); }
.health-not_installed { background: var(--panel-strong); color: var(--muted); }
.traffic-chart {
width: 100%;
min-height: 320px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
overflow: hidden;
}
.traffic-chart svg {
display: block;
width: 100%;
height: auto;
min-height: 300px;
}
.traffic-chart .grid line {
stroke: var(--line);
stroke-width: 1;
}
.traffic-chart .line {
fill: none;
stroke-width: 3;
stroke-linecap: round;
stroke-linejoin: round;
}
.traffic-chart .proxy-line { stroke: var(--blue); }
.traffic-chart .site-line { stroke: var(--green); }
.traffic-chart .proxy-area {
fill: color-mix(in srgb, var(--blue) 10%, transparent);
}
.traffic-chart .axis,
.traffic-chart .legend {
fill: var(--muted);
font: 13px system-ui, sans-serif;
}
.empty-chart,
.empty {
min-height: 160px;
display: grid;
place-items: center;
align-content: center;
gap: 6px;
color: var(--muted);
text-align: center;
padding: 18px;
}
.empty-chart strong {
color: var(--text);
}
.table-wrap {
margin-top: 14px;
overflow-x: auto;
border: 1px solid var(--line);
border-radius: 8px;
}
table {
width: 100%;
min-width: 720px;
border-collapse: collapse;
background: var(--panel);
}
th, td {
th,
td {
padding: 14px 16px;
text-align: left;
border-bottom: 1px solid var(--line);
@@ -279,68 +512,85 @@ th {
text-transform: uppercase;
}
tr:last-child td {
border-bottom: 0;
}
td code {
display: inline-block;
max-width: 280px;
max-width: 320px;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
}
td small {
color: var(--muted);
}
.actions {
display: flex;
justify-content: flex-end;
gap: 8px;
}
.backup-list {
margin-top: 14px;
padding: 8px;
}
.backup-item {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 12px;
padding: 12px;
border-radius: 8px;
}
.backup-item + .backup-item {
border-top: 1px solid var(--line);
}
.backup-item span {
display: block;
.empty-cell {
color: var(--muted);
font-size: 12px;
text-align: center;
}
#events {
.backup-list,
.events-list,
.settings-list {
display: grid;
gap: 10px;
}
.event {
padding: 10px 0;
border-bottom: 1px solid var(--line);
.backup-item,
.event,
.settings-list > div {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
padding: 12px;
}
.backup-item span,
.event small {
display: block;
color: var(--muted);
font-size: 12px;
overflow-wrap: anywhere;
}
.logs {
min-height: 460px;
max-height: calc(100vh - 260px);
overflow: auto;
margin: 0;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
color: var(--text);
padding: 14px;
white-space: pre-wrap;
word-break: break-word;
}
.toast {
position: fixed;
right: 22px;
bottom: 22px;
z-index: 20;
min-width: 240px;
max-width: 420px;
max-width: min(420px, calc(100vw - 32px));
padding: 13px 14px;
border-radius: 8px;
background: #0f172a;
color: white;
background: var(--button);
color: var(--button-text);
opacity: 0;
transform: translateY(10px);
pointer-events: none;
@@ -352,31 +602,170 @@ td code {
transform: translateY(0);
}
.hidden {
display: none;
}
@media (max-width: 1040px) {
.shell { grid-template-columns: 1fr; }
.sidebar {
position: static;
height: auto;
display: flex;
align-items: center;
justify-content: space-between;
@media (max-width: 1280px) {
.service-grid {
grid-template-columns: repeat(3, minmax(150px, 1fr));
}
.metric-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-two {
grid-template-columns: 1fr;
}
nav { display: flex; flex-wrap: wrap; }
.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
main { padding: 18px; }
.sidebar { padding: 18px; align-items: flex-start; flex-direction: column; }
.metric-grid, .service-grid { grid-template-columns: 1fr; }
.topbar, .section-head { align-items: flex-start; flex-direction: column; }
.inline-form { width: 100%; flex-wrap: wrap; }
.inline-form input, .inline-form select { flex: 1 1 180px; }
.inline-form button { flex: 0 0 auto; }
@media (max-width: 980px) {
.app-shell {
grid-template-columns: 1fr;
}
.mobile-only {
display: inline-grid;
}
.sidebar {
position: fixed;
inset: 0 auto 0 0;
z-index: 10;
width: min(300px, calc(100vw - 54px));
transform: translateX(-105%);
transition: transform .2s ease;
}
.sidebar.open {
transform: translateX(0);
}
}
@media (max-width: 720px) {
.topbar {
align-items: flex-start;
padding: 16px;
}
.top-actions {
width: 100%;
justify-content: flex-start;
}
.content {
padding: 16px;
}
.panel {
padding: 14px;
}
.panel-head {
align-items: flex-start;
flex-direction: column;
}
.metric-grid,
.service-grid,
.runtime-grid,
.traffic-summary {
grid-template-columns: 1fr;
}
.inline-form,
.panel-actions {
width: 100%;
}
.inline-form input,
.inline-form select,
.inline-form button,
.panel-actions button,
.panel-actions .status-pill {
width: 100%;
}
.table-wrap {
overflow: visible;
border: 0;
}
table,
thead,
tbody,
tr,
th,
td {
display: block;
min-width: 0;
}
thead {
display: none;
}
tr {
margin-bottom: 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel);
overflow: hidden;
}
td {
display: grid;
grid-template-columns: 120px minmax(0, 1fr);
gap: 12px;
border-bottom: 1px solid var(--line);
}
td::before {
content: attr(data-label);
color: var(--muted);
font-size: 12px;
font-weight: 800;
text-transform: uppercase;
}
td.empty-cell {
display: block;
}
td.empty-cell::before {
display: none;
}
td code {
max-width: 100%;
white-space: nowrap;
}
.actions {
justify-content: stretch;
flex-wrap: wrap;
}
.actions button {
flex: 1 1 140px;
}
.backup-item,
.event,
.settings-list > div {
grid-template-columns: 1fr;
}
}
@media (max-width: 460px) {
.topbar {
display: grid;
grid-template-columns: auto 1fr;
}
.top-actions {
grid-column: 1 / -1;
}
td {
grid-template-columns: 1fr;
gap: 4px;
}
}