refactor webui dashboard layout
This commit is contained in:
1 parent
5a51c951a2
commit
eea0c48a44
12 files changed
+3266
-869
No files matched your search
@@ -1185,384 +1185,3 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
background: var(--success);
|
||||
box-shadow: 0 0 0 2px color-mix(in oklab, var(--success) 16%, transparent);
|
||||
}
|
||||
|
||||
/* ==================== Tooltip (data-tooltip) ==================== */
|
||||
[data-tooltip] {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
[data-tooltip]::before,
|
||||
[data-tooltip]::after {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: calc(100% + 8px);
|
||||
transform: translateX(-50%) translateY(2px);
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 120ms ease, transform 120ms ease;
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
[data-tooltip]::before {
|
||||
content: attr(data-tooltip);
|
||||
padding: 6px 10px;
|
||||
border: 1px solid color-mix(in oklab, var(--primary) 35%, var(--border));
|
||||
border-radius: var(--radius-sm);
|
||||
background: color-mix(in oklab, var(--surface) 90%, transparent);
|
||||
color: var(--text-strong);
|
||||
font-family: "IBM Plex Mono", ui-monospace, monospace;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: none;
|
||||
white-space: nowrap;
|
||||
box-shadow:
|
||||
0 0 0 1px color-mix(in oklab, var(--primary) 20%, transparent),
|
||||
0 4px 14px -2px color-mix(in oklab, var(--primary) 40%, transparent);
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
:root[data-theme="dark"] [data-tooltip]::before {
|
||||
box-shadow:
|
||||
0 0 0 1px color-mix(in oklab, var(--primary) 28%, transparent),
|
||||
0 4px 14px -2px color-mix(in oklab, var(--primary) 50%, transparent);
|
||||
}
|
||||
|
||||
[data-tooltip]::after {
|
||||
content: "";
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
bottom: calc(100% + 4px);
|
||||
border: 1px solid color-mix(in oklab, var(--primary) 35%, var(--border));
|
||||
border-top: 0;
|
||||
border-left: 0;
|
||||
background: color-mix(in oklab, var(--surface) 90%, transparent);
|
||||
transform: translateX(-50%) rotate(45deg);
|
||||
}
|
||||
|
||||
[data-tooltip]:hover::before,
|
||||
[data-tooltip]:hover::after,
|
||||
[data-tooltip]:focus-visible::before,
|
||||
[data-tooltip]:focus-visible::after {
|
||||
opacity: 1;
|
||||
transform: translateX(-50%) translateY(0);
|
||||
}
|
||||
|
||||
[data-tooltip]:hover::after,
|
||||
[data-tooltip]:focus-visible::after {
|
||||
transform: translateX(-50%) rotate(45deg);
|
||||
}
|
||||
|
||||
/* Position bottom (below the trigger) */
|
||||
[data-tooltip][data-tooltip-pos="bottom"]::before,
|
||||
[data-tooltip][data-tooltip-pos="bottom"]::after {
|
||||
bottom: auto;
|
||||
top: calc(100% + 8px);
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-pos="bottom"]::after {
|
||||
top: calc(100% + 4px);
|
||||
border: 1px solid var(--border);
|
||||
border-bottom: 0;
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
[data-tooltip]::before,
|
||||
[data-tooltip]::after { display: none; }
|
||||
}
|
||||
|
||||
|
||||
/* ==================== Shortcuts help overlay ==================== */
|
||||
.shortcutsOverlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 90;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 24px;
|
||||
background: color-mix(in oklab, var(--bg) 70%, transparent);
|
||||
backdrop-filter: blur(6px);
|
||||
opacity: 0;
|
||||
transition: opacity 160ms ease;
|
||||
}
|
||||
|
||||
.shortcutsOverlay.isVisible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.shortcutsCard {
|
||||
position: relative;
|
||||
width: min(420px, 100%);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--surface);
|
||||
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
overflow: hidden;
|
||||
transform: translateY(8px) scale(0.98);
|
||||
transition: transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
|
||||
}
|
||||
|
||||
.shortcutsCard::before {
|
||||
position: absolute;
|
||||
inset: 0 0 auto 0;
|
||||
height: 1px;
|
||||
content: "";
|
||||
pointer-events: none;
|
||||
background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--primary) 70%, transparent), color-mix(in oklab, var(--secondary) 70%, transparent), transparent);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
:root[data-theme="dark"] .shortcutsCard {
|
||||
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.shortcutsOverlay.isVisible .shortcutsCard {
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
|
||||
.shortcutsHeader {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 14px 10px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: var(--surface-soft);
|
||||
}
|
||||
|
||||
.shortcutsTitle {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: var(--text-strong);
|
||||
letter-spacing: var(--tracking-tight);
|
||||
}
|
||||
|
||||
.shortcutsClose {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--muted);
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
transition: color var(--motion-fast), background var(--motion-fast);
|
||||
}
|
||||
|
||||
.shortcutsClose:hover {
|
||||
color: var(--primary);
|
||||
background: color-mix(in oklab, var(--primary-soft) 60%, transparent);
|
||||
box-shadow: 0 0 10px -2px color-mix(in oklab, var(--primary) 45%, transparent);
|
||||
}
|
||||
|
||||
.shortcutsList {
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.shortcutsRow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 8px 10px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: var(--text-sm);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.shortcutsRow:hover {
|
||||
background: var(--surface-soft);
|
||||
}
|
||||
|
||||
.shortcutsDesc {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.shortcutsKeys {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.shortcutsKeys kbd {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 22px;
|
||||
height: 22px;
|
||||
padding: 0 6px;
|
||||
border: 1px solid var(--border-strong);
|
||||
border-bottom-width: 2px;
|
||||
border-radius: 5px;
|
||||
background: var(--surface);
|
||||
color: var(--text-strong);
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
|
||||
font-size: 13px;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.shortcutsPlus {
|
||||
color: var(--muted-soft);
|
||||
font-size: 12px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.shortcutsOverlay,
|
||||
.shortcutsCard {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==================== Toast ==================== */
|
||||
.toastContainer {
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
max-width: min(420px, calc(100vw - 40px));
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.toast {
|
||||
display: grid;
|
||||
grid-template-columns: 22px 1fr auto;
|
||||
align-items: start;
|
||||
gap: 10px;
|
||||
padding: 12px 12px 12px 16px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--surface);
|
||||
color: var(--text);
|
||||
font-size: var(--text-sm);
|
||||
line-height: var(--leading-snug);
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
|
||||
pointer-events: auto;
|
||||
animation: toastIn 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:root[data-theme="dark"] .toast {
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.toast::before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 3px;
|
||||
content: "";
|
||||
background: linear-gradient(180deg, var(--muted-soft), color-mix(in oklab, var(--muted-soft) 40%, transparent));
|
||||
}
|
||||
|
||||
.toast-success {
|
||||
border-color: color-mix(in oklab, var(--success) 30%, var(--border));
|
||||
}
|
||||
.toast-success::before { background: linear-gradient(180deg, var(--success), color-mix(in oklab, var(--success) 30%, transparent)); }
|
||||
.toast-success .toastIcon {
|
||||
color: var(--success);
|
||||
background: color-mix(in oklab, var(--success) 12%, transparent);
|
||||
box-shadow: 0 0 10px -2px color-mix(in oklab, var(--success) 60%, transparent);
|
||||
}
|
||||
|
||||
.toast-error {
|
||||
border-color: color-mix(in oklab, var(--danger) 30%, var(--border));
|
||||
}
|
||||
.toast-error::before { background: linear-gradient(180deg, var(--danger), color-mix(in oklab, var(--danger) 30%, transparent)); }
|
||||
.toast-error .toastIcon {
|
||||
color: var(--danger);
|
||||
background: color-mix(in oklab, var(--danger) 12%, transparent);
|
||||
box-shadow: 0 0 10px -2px color-mix(in oklab, var(--danger) 60%, transparent);
|
||||
}
|
||||
|
||||
.toast-warn {
|
||||
border-color: color-mix(in oklab, var(--warning) 30%, var(--border));
|
||||
}
|
||||
.toast-warn::before { background: linear-gradient(180deg, var(--warning), color-mix(in oklab, var(--warning) 30%, transparent)); }
|
||||
.toast-warn .toastIcon {
|
||||
color: var(--warning);
|
||||
background: color-mix(in oklab, var(--warning) 12%, transparent);
|
||||
box-shadow: 0 0 10px -2px color-mix(in oklab, var(--warning) 60%, transparent);
|
||||
}
|
||||
|
||||
.toast-info::before { background: linear-gradient(180deg, var(--primary), var(--secondary)); }
|
||||
.toast-info .toastIcon {
|
||||
color: var(--primary);
|
||||
background: color-mix(in oklab, var(--primary) 14%, transparent);
|
||||
box-shadow: 0 0 10px -2px color-mix(in oklab, var(--primary) 60%, transparent);
|
||||
}
|
||||
|
||||
.toastIcon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
margin-top: 0;
|
||||
border-radius: 50%;
|
||||
flex: 0 0 22px;
|
||||
}
|
||||
|
||||
.toastIcon svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.toastBody {
|
||||
min-width: 0;
|
||||
color: var(--text);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.toastClose {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
margin: -2px -2px 0 4px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--muted-soft);
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
transition: background var(--motion-fast), color var(--motion-fast);
|
||||
}
|
||||
|
||||
.toastClose:hover {
|
||||
color: var(--primary);
|
||||
background: color-mix(in oklab, var(--primary-soft) 60%, transparent);
|
||||
box-shadow: 0 0 10px -2px color-mix(in oklab, var(--primary) 45%, transparent);
|
||||
}
|
||||
|
||||
.toast.isLeaving {
|
||||
animation: toastOut 220ms ease forwards;
|
||||
}
|
||||
|
||||
@keyframes toastIn {
|
||||
from { opacity: 0; transform: translateY(8px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@keyframes toastOut {
|
||||
to { opacity: 0; transform: translateY(-4px); }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.toast,
|
||||
.toast.isLeaving {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user