Improve webui style and add api docs

This commit is contained in:
2026-05-24 22:18:41 +02:00
parent 6851922a9e
commit a78a708757
8 changed files with 1144 additions and 415 deletions
+443 -293
View File
@@ -1,16 +1,17 @@
:root {
color-scheme: dark;
--bg: #0f1723;
--panel: #17212b;
--panel-alt: #101922;
--line: #253241;
--soft: #8ea2b5;
--text: #edf3f9;
--accent: #53a7ff;
--accent-strong: #2f8cff;
--bg-color: #050505;
--panel: #0c0c0c;
--panel-alt: #080808;
--text-color: #e0e0e0;
--accent: #ffffff;
--dim: #6f6f6f;
--line: #2a2a2a;
--danger: #ff6b6b;
--bubble: #182533;
--bubble-self: #1f3a4d;
--ok: #7ee787;
--warn: #f0c674;
--info: #8ab4f8;
--font-mono: "Courier New", Courier, monospace;
}
* {
@@ -19,14 +20,23 @@
body {
margin: 0;
font-family: Inter, Arial, sans-serif;
background: var(--bg);
color: var(--text);
background: var(--bg-color);
color: var(--text-color);
font-family: var(--font-mono);
font-size: 16px;
line-height: 1.55;
}
a {
color: inherit;
text-decoration: none;
border-bottom: 1px solid var(--dim);
}
a:hover,
button:hover {
background: var(--text-color);
color: var(--bg-color);
}
code,
@@ -42,42 +52,154 @@ button {
display: grid;
}
.app-shell {
grid-template-columns: 320px minmax(0, 1fr);
.app-shell,
.viewer-shell {
grid-template-columns: 300px minmax(0, 1fr);
}
.sidebar,
.viewer-sidebar {
background: var(--panel-alt);
border-right: 1px solid var(--line);
padding: 24px;
border-right: 1px dashed var(--line);
padding: 28px 24px;
}
.content,
.viewer-main {
padding: 24px;
padding: 28px;
max-width: 1320px;
width: 100%;
}
.brand-block h1,
.viewer-sidebar-head h1,
.viewer-header h2,
.panel-header h2,
.dialog-header h2 {
margin: 0;
color: var(--accent);
font-size: 1.45rem;
text-transform: uppercase;
letter-spacing: 0;
}
.eyebrow,
.section-title {
color: var(--dim);
font-size: 0.78rem;
text-transform: uppercase;
}
.eyebrow::before,
.section-title::before {
content: "./";
}
.muted {
color: var(--dim);
}
.small {
font-size: 0.82rem;
}
.nav-links,
.jobs-list,
.continuous-form,
.viewer-channel-list {
display: grid;
gap: 10px;
}
.nav-links {
margin: 28px 0;
}
.nav-link,
.button,
input,
.content-tab,
.viewer-channel-item {
border: 1px solid var(--line);
background: var(--panel);
color: var(--text-color);
}
.nav-link,
.button,
.content-tab {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 42px;
padding: 9px 13px;
cursor: pointer;
}
.nav-link.active,
.button.primary,
.content-tab.active {
border-color: var(--accent);
color: var(--accent);
box-shadow: inset 3px 0 0 var(--accent);
}
.button.danger {
color: var(--danger);
}
.button.button-small {
min-height: 34px;
padding: 6px 10px;
font-size: 0.82rem;
}
.button:disabled {
cursor: not-allowed;
opacity: 0.45;
}
.status-card,
.panel,
.stat-panel,
.job-card,
.message-card,
.settings-dialog {
background: var(--panel);
border: 1px dashed var(--line);
}
.status-card,
.panel,
.job-card,
.message-card {
padding: 16px;
}
.status-card {
margin-top: 16px;
}
.status-card .button {
width: 100%;
margin-top: 8px;
}
.status-badge {
display: inline-flex;
padding: 4px 8px;
border: 1px solid var(--line);
color: var(--ok);
text-transform: uppercase;
}
.content-tabs {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 16px;
}
.content-tab {
border: 1px solid var(--line);
background: var(--panel);
color: var(--text);
padding: 10px 14px;
border-radius: 8px;
cursor: pointer;
}
.content-tab.active {
background: var(--accent-strong);
border-color: var(--accent-strong);
}
.tab-panel {
display: none;
}
@@ -86,90 +208,6 @@ button {
display: block;
}
.brand-block h1,
.viewer-sidebar-head h1,
.viewer-header h2,
.panel-header h2 {
margin: 0;
font-size: 24px;
}
.eyebrow {
color: var(--accent);
font-size: 12px;
text-transform: uppercase;
margin-bottom: 8px;
}
.muted {
color: var(--soft);
}
.small {
font-size: 12px;
}
.nav-links {
display: grid;
gap: 8px;
margin: 24px 0;
}
.nav-link,
.button {
border: 1px solid var(--line);
background: var(--panel);
color: var(--text);
padding: 10px 14px;
border-radius: 8px;
cursor: pointer;
}
.nav-link.active,
.button.primary {
background: var(--accent-strong);
border-color: var(--accent-strong);
}
.button.danger {
color: #ffd0d0;
}
.button.button-small {
padding: 8px 10px;
font-size: 13px;
}
.status-card,
.panel,
.stat-panel {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 8px;
}
.status-card {
padding: 16px;
margin-top: 16px;
}
.section-title {
font-size: 12px;
text-transform: uppercase;
color: var(--soft);
margin-bottom: 12px;
}
.status-badge {
display: inline-flex;
align-items: center;
border-radius: 999px;
padding: 8px 12px;
background: #183248;
color: #a7d8ff;
margin-bottom: 10px;
}
.panel-grid {
display: grid;
gap: 16px;
@@ -177,96 +215,36 @@ button {
margin-bottom: 16px;
}
.stat-panel {
padding: 18px;
}
.stat-value {
font-size: 32px;
font-weight: 700;
}
.toggle-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.switch {
position: relative;
display: inline-flex;
width: 46px;
min-width: 46px;
height: 28px;
}
.switch input {
position: absolute;
inset: 0;
opacity: 0;
width: 100%;
height: 100%;
min-width: 0;
margin: 0;
cursor: pointer;
}
.switch-slider {
position: absolute;
inset: 0;
border-radius: 999px;
background: #0d141c;
border: 1px solid var(--line);
transition: background-color 0.2s ease, border-color 0.2s ease;
}
.switch-slider::before {
content: "";
position: absolute;
top: 3px;
left: 3px;
width: 20px;
height: 20px;
border-radius: 50%;
background: #c9d4df;
transition: transform 0.2s ease, background-color 0.2s ease;
}
.switch input:checked + .switch-slider {
background: var(--accent-strong);
border-color: var(--accent-strong);
}
.switch input:checked + .switch-slider::before {
transform: translateX(18px);
background: white;
}
.switch input:focus-visible + .switch-slider {
outline: 2px solid rgba(83, 167, 255, 0.45);
outline-offset: 2px;
}
.panel {
padding: 18px;
margin-bottom: 16px;
}
.panel-header,
.viewer-sidebar-head,
.viewer-header {
.viewer-header,
.dialog-header,
.message-meta,
.job-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
margin-bottom: 16px;
}
.stat-value {
margin-top: 8px;
font-size: 2rem;
font-weight: 700;
}
.stat-compact {
font-size: 1.3rem;
}
.inline-form {
display: flex;
gap: 8px;
flex-wrap: wrap;
gap: 8px;
}
.stack-form {
@@ -275,39 +253,65 @@ button {
margin-top: 12px;
}
.auth-actions {
margin-top: 12px;
}
.qr-wrap {
margin-top: 14px;
padding: 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: #0d141c;
}
.qr-wrap img {
display: block;
width: 100%;
max-width: 240px;
aspect-ratio: 1;
margin: 0 auto 10px;
border-radius: 8px;
background: white;
}
.hidden {
display: none !important;
}
input {
min-width: 160px;
padding: 10px 12px;
border-radius: 8px;
padding: 9px 11px;
outline: 0;
}
input:focus {
border-color: var(--accent);
}
.toggle-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.switch {
position: relative;
display: inline-flex;
width: 48px;
min-width: 48px;
height: 26px;
}
.switch input {
position: absolute;
inset: 0;
opacity: 0;
min-width: 0;
margin: 0;
cursor: pointer;
}
.switch-slider {
position: absolute;
inset: 0;
border: 1px solid var(--line);
background: #0d141c;
color: var(--text);
background: #101010;
}
.switch-slider::before {
content: "";
position: absolute;
top: 4px;
left: 4px;
width: 16px;
height: 16px;
background: var(--dim);
transition: transform 0.16s ease, background-color 0.16s ease;
}
.switch input:checked + .switch-slider {
border-color: var(--accent);
}
.switch input:checked + .switch-slider::before {
transform: translateX(22px);
background: var(--accent);
}
.table-wrap {
@@ -321,102 +325,187 @@ table {
th,
td {
padding: 12px 10px;
text-align: left;
border-bottom: 1px solid var(--line);
padding: 14px 10px;
vertical-align: top;
border-bottom: 1px dashed var(--line);
}
tbody tr:hover {
background: rgba(255, 255, 255, 0.02);
background: #101010;
}
.action-row {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.jobs-list {
display: grid;
gap: 12px;
}
.job-card {
border: 1px solid var(--line);
border-radius: 8px;
padding: 14px;
background: #121c25;
}
.job-head {
display: flex;
justify-content: space-between;
gap: 12px;
margin-bottom: 6px;
gap: 8px;
}
.job-status {
color: var(--dim);
font-size: 0.82rem;
text-transform: uppercase;
font-size: 12px;
color: var(--soft);
}
.job-logs {
max-height: 220px;
margin: 10px 0 0;
padding: 12px;
border-radius: 8px;
background: #0d141c;
max-height: 240px;
overflow: auto;
white-space: pre-wrap;
}
.continuous-form {
display: grid;
gap: 12px;
color: var(--dim);
}
.continuous-meta {
display: grid;
gap: 6px;
margin-top: 16px;
gap: 4px;
margin: 16px 0;
color: var(--dim);
font-size: 0.88rem;
}
.viewer-shell {
grid-template-columns: 320px minmax(0, 1fr);
.continuous-meta span {
color: var(--text-color);
}
.viewer-channel-list {
.checkbox-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 8px;
margin-top: 8px;
}
.checkbox-row {
display: flex;
align-items: center;
gap: 10px;
min-height: 38px;
padding: 8px;
border: 1px dashed var(--line);
}
.checkbox-row input {
min-width: auto;
}
.checkbox-row.disabled {
opacity: 0.45;
}
.log-viewer {
display: grid;
max-height: 420px;
overflow: auto;
border: 1px solid var(--line);
background: #030303;
}
.log-line {
display: grid;
grid-template-columns: 86px 112px 74px minmax(0, 1fr);
gap: 10px;
padding: 5px 9px;
border-bottom: 1px solid #151515;
font-size: 0.88rem;
}
.log-line:hover {
background: #101010;
}
.log-time,
.log-age,
.log-level {
color: var(--dim);
}
.log-message {
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.log-line.info .log-level,
.log-line.info .log-message {
color: var(--info);
}
.log-line.success .log-level,
.log-line.success .log-message {
color: var(--ok);
}
.log-line.warn .log-level,
.log-line.warn .log-message {
color: var(--warn);
}
.log-line.error .log-level,
.log-line.error .log-message {
color: var(--danger);
}
.settings-dialog {
width: min(720px, calc(100vw - 32px));
color: var(--text-color);
padding: 0;
}
.settings-dialog::backdrop {
background: rgba(0, 0, 0, 0.72);
}
.dialog-shell {
padding: 18px;
}
.settings-section {
margin-top: 18px;
padding-top: 16px;
border-top: 1px dashed var(--line);
}
.qr-wrap {
margin-top: 14px;
padding: 12px;
border: 1px dashed var(--line);
}
.qr-wrap img {
display: block;
width: 100%;
max-width: 240px;
aspect-ratio: 1;
margin: 0 auto 10px;
background: white;
}
.hidden {
display: none !important;
}
.viewer-channel-item {
display: grid;
gap: 4px;
width: 100%;
text-align: left;
padding: 12px;
border-radius: 8px;
border: 1px solid var(--line);
background: var(--panel);
color: var(--text);
text-align: left;
cursor: pointer;
}
.viewer-channel-item.active {
border-color: var(--accent);
background: #193246;
box-shadow: inset 3px 0 0 var(--accent);
}
.viewer-channel-name {
font-weight: 600;
.viewer-channel-name,
.message-author {
color: var(--accent);
font-weight: 700;
}
.viewer-channel-meta {
font-size: 12px;
color: var(--soft);
.viewer-channel-meta,
.message-date {
color: var(--dim);
font-size: 0.82rem;
}
.messages-list {
@@ -426,23 +515,7 @@ tbody tr:hover {
}
.message-card {
max-width: 760px;
border: 1px solid var(--line);
border-radius: 12px;
padding: 14px;
background: var(--bubble);
}
.message-meta {
display: flex;
justify-content: space-between;
gap: 12px;
margin-bottom: 10px;
}
.message-author {
color: #8fd3ff;
font-weight: 600;
max-width: 820px;
}
.message-reply:empty,
@@ -454,7 +527,6 @@ tbody tr:hover {
.message-text {
white-space: pre-wrap;
line-height: 1.45;
}
.message-media {
@@ -463,16 +535,64 @@ tbody tr:hover {
.message-media img,
.message-media video {
max-width: 100%;
border-radius: 10px;
border: 1px solid var(--line);
display: block;
max-width: 100%;
border: 1px solid var(--line);
}
.message-footer {
margin-top: 10px;
}
.api-docs {
display: grid;
gap: 16px;
}
.api-path {
margin: 0 0 12px;
color: var(--accent);
font-size: 1rem;
overflow-wrap: anywhere;
}
.api-methods {
display: grid;
gap: 12px;
}
.api-method {
border-top: 1px dashed var(--line);
padding-top: 12px;
}
.api-method:first-child {
border-top: 0;
padding-top: 0;
}
.api-method-head {
display: flex;
align-items: center;
gap: 10px;
}
.api-verb {
min-width: 58px;
padding: 2px 6px;
border: 1px solid var(--line);
color: var(--ok);
text-align: center;
}
.api-summary {
font-weight: 700;
}
.api-body {
max-height: none;
}
@media (max-width: 1100px) {
.app-shell,
.viewer-shell {
@@ -482,10 +602,40 @@ tbody tr:hover {
.sidebar,
.viewer-sidebar {
border-right: 0;
border-bottom: 1px solid var(--line);
border-bottom: 1px dashed var(--line);
}
.panel-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 720px) {
.content,
.viewer-main,
.sidebar,
.viewer-sidebar {
padding: 18px;
}
.panel-header,
.viewer-header,
.dialog-header {
display: grid;
}
.inline-form,
.inline-form input,
.inline-form .button {
width: 100%;
}
.log-line {
grid-template-columns: 76px 1fr;
}
.log-age,
.log-level {
display: none;
}
}