精修 WebUI 第十三轮:动效、语义着色与帮助系统
- panel 切换动画:active 加 fadeIn (220ms) 替换无差别 surfaceIn,tab 切换更有反馈 - statValue 加 stateOk/stateMuted/stateError 语义着色:运行中显示 success 色(hero metric),未运行用 muted - 预约卡倒计时实时刷新:startReservationsCountdownTick 每秒 tick,更新 .reservationRemain 文字 + isImminent/isDue 类,无需等 stats 轮询 - ? 快捷键弹出帮助 overlay:列出 ⌘K/⌘S/⌘Enter/Esc/?;ESC 或点击遮罩关闭;带毛玻璃 + scale 进出动画;输入框聚焦时不拦截 - cache-bust v15 → v16
This commit is contained in:
1 parent
3295cb3d6f
commit
a40ddc3083
3 files changed
+252
-4
No files matched your search
+162
-1
@@ -1132,7 +1132,21 @@ svg {
|
||||
border-radius: var(--radius);
|
||||
background: var(--surface);
|
||||
box-shadow: var(--shadow-soft);
|
||||
animation: surfaceIn var(--motion-slow) both;
|
||||
}
|
||||
|
||||
.panel.active {
|
||||
animation: panelFadeIn 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
|
||||
}
|
||||
|
||||
@keyframes panelFadeIn {
|
||||
from { opacity: 0; transform: translateY(4px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.panel.active {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
.panel.cardLog {
|
||||
@@ -1489,6 +1503,18 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
transition: color var(--motion-fast);
|
||||
}
|
||||
|
||||
.statValue.stateOk {
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.statValue.stateMuted {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.statValue.stateError {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.statValue.hasCopy {
|
||||
position: relative;
|
||||
padding-right: 28px;
|
||||
@@ -2371,6 +2397,141 @@ details[open] > summary.sectionTitle::before {
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
/* ==================== 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 {
|
||||
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);
|
||||
}
|
||||
|
||||
: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: 13px;
|
||||
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(--text);
|
||||
background: var(--surface-muted);
|
||||
}
|
||||
|
||||
.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: 11px;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.shortcutsPlus {
|
||||
color: var(--muted-soft);
|
||||
font-size: 10px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.shortcutsOverlay,
|
||||
.shortcutsCard {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==================== App footer ==================== */
|
||||
.appFooter {
|
||||
display: flex;
|
||||
|
||||
Reference in new issue
Block a user