Simplify admin operator UI

This commit is contained in:
StasonJatham committed 2026-05-21 22:26:14 +02:00
1 parent 0fc220b90b
commit 30aef1fee8
7 files changed
+393 -105

No files matched your search

+208 -8
View File
@@ -1091,6 +1091,131 @@ select:focus-visible {
ADMIN_CSS = """
.admin-console {
padding: 32px 0 18px;
background: var(--rp-canvas);
}
.admin-page-title {
display: flex;
align-items: end;
justify-content: space-between;
gap: 20px;
}
.admin-page-title h1 {
font-size: 30px;
}
.admin-total-strip,
.admin-metric-strip {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.admin-total-strip span,
.admin-metric-strip span {
display: inline-flex;
align-items: center;
gap: 7px;
min-height: 34px;
padding: 6px 12px;
border: 1px solid var(--rp-line);
border-radius: 999px;
background: var(--rp-surface);
color: var(--rp-muted);
font-size: 13px;
white-space: nowrap;
}
.admin-total-strip strong,
.admin-metric-strip strong {
color: var(--rp-ink);
font-size: 14px;
font-weight: 600;
}
.admin-block {
padding: 18px 0;
}
.admin-block + .admin-block {
border-top: 1px solid var(--rp-soft-line);
}
.admin-section-heading {
display: flex;
align-items: end;
justify-content: space-between;
gap: 20px;
margin-bottom: 10px;
}
.admin-notice {
margin: 10px 0 0;
border-radius: 14px;
}
.admin-cleanup-bar {
display: grid;
grid-template-columns: minmax(150px, 0.8fr) minmax(0, 2.3fr) auto;
align-items: center;
gap: 16px;
padding: 14px 0;
border-bottom: 1px solid var(--rp-soft-line);
}
.admin-cleanup-title {
display: grid;
gap: 2px;
min-width: 0;
}
.admin-cleanup-title h2 {
font-size: 22px;
}
.admin-cleanup-title span {
color: var(--rp-muted);
font-size: 13px;
}
.admin-cleanup-times {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 12px;
margin: 0;
}
.admin-cleanup-times div {
min-width: 0;
}
.admin-cleanup-times dt {
margin: 0;
color: var(--rp-muted);
font-size: 12px;
font-weight: 600;
}
.admin-cleanup-times dd {
margin: 0;
overflow: hidden;
color: var(--rp-ink);
font-size: 13px;
text-overflow: ellipsis;
white-space: nowrap;
}
.admin-cleanup-bar form {
justify-self: end;
}
.admin-metric-strip {
margin-top: 12px;
}
.metric-card {
display: grid;
gap: 6px;
@@ -1113,7 +1238,7 @@ ADMIN_CSS = """
}
.admin-table-scroll {
max-height: 560px;
max-height: 480px;
overflow: auto;
background: var(--rp-surface);
border-color: var(--rp-line) !important;
@@ -1161,8 +1286,9 @@ ADMIN_CSS = """
table {
width: 100%;
min-width: 900px;
border-collapse: collapse;
font-size: 14px;
font-size: 13px;
font-variant-numeric: tabular-nums;
color: var(--rp-ink);
}
@@ -1178,15 +1304,13 @@ table {
th,
td {
border-bottom: 1px solid var(--rp-soft-line);
padding: 14px 10px;
padding: 10px 9px;
text-align: left;
white-space: nowrap;
vertical-align: middle;
}
td {
max-width: 38rem;
overflow: hidden;
text-overflow: ellipsis;
overflow-wrap: anywhere;
}
.status-table {
@@ -1209,6 +1333,51 @@ th {
font-size: 12px;
font-weight: 600;
background: var(--rp-surface-alt);
white-space: nowrap;
}
.cell-hostname {
width: 16rem;
max-width: 16rem;
}
.cell-ip {
width: 10rem;
max-width: 12rem;
}
.cell-time {
width: 13rem;
max-width: 13rem;
}
.cell-status,
.cell-count,
.cell-delete {
width: 1%;
white-space: nowrap;
}
.cell-detail {
min-width: 18rem;
max-width: 28rem;
}
.cell-actions {
width: 13rem;
}
.admin-action-group {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.admin-action-group .btn,
.cell-delete .btn {
min-height: 34px;
padding-inline: 12px;
white-space: nowrap;
}
.empty {
@@ -1218,6 +1387,37 @@ th {
}
@media (max-width: 860px) {
.admin-console {
padding-top: 24px;
}
.admin-page-title,
.admin-section-heading {
align-items: start;
flex-direction: column;
gap: 12px;
}
.admin-cleanup-bar {
grid-template-columns: 1fr;
align-items: start;
gap: 12px;
}
.admin-cleanup-times {
grid-template-columns: repeat(2, minmax(0, 1fr));
width: 100%;
}
.admin-cleanup-bar form {
justify-self: stretch;
width: 100%;
}
.admin-cleanup-bar button {
width: 100%;
}
.admin-table-shell .form-control {
max-width: none;
}
@@ -1233,7 +1433,7 @@ th {
th,
td {
padding: 12px 9px;
padding: 10px 8px;
}
}
""".strip()