精修 WebUI 第六轮:交互精致度

- 配置搜索加 ⌘K / Ctrl+K 快捷键聚焦 + ESC 清空/失焦;右侧带 kbd 提示徽章(输入或聚焦时自动隐藏;移动端不显示);自动按平台显示 ⌘ 或 Ctrl
- 按钮 .isBusy 状态加旋转 spinner(隐藏图标),禁用 pointer-events
- 即将开奖预约(剩余 ≤60s)加 isImminent 类:warning 边框 + 微脉动 + value pill 反白;已到时间加 isDue(danger 边框 + 反白)
- brand logo 重做:圆角方形容器 + 内嵌播放三角 + 装饰圆点,更具品牌识别度
- 侧边导航 active 指示条改为 sideNav::before 浮动滑块,CSS var 控制 Y/H,切换 tab 时 220ms 滑动;resize/字体加载完成自动重算位置;横向布局自动隐藏
- cache-bust v8 → v9
This commit is contained in:
Codex committed 2026-05-21 09:29:38 +08:00
1 parent 96cba09c49
commit 07700c24d9
3 files changed
+217 -26

No files matched your search

+144 -18
View File
@@ -266,8 +266,8 @@ svg {
}
.brandMark svg {
width: 18px;
height: 18px;
width: 22px;
height: 22px;
}
.title {
@@ -358,7 +358,46 @@ svg {
.btn.isBusy {
cursor: progress;
opacity: 0.7;
opacity: 0.85;
pointer-events: none;
position: relative;
}
.btn.isBusy .btnIcon {
visibility: hidden;
}
.btn.isBusy::before {
position: absolute;
left: 12px;
top: 50%;
width: 14px;
height: 14px;
margin-top: -7px;
content: "";
border-radius: 50%;
border: 2px solid currentColor;
border-top-color: transparent;
opacity: 0.85;
animation: btnSpin 720ms linear infinite;
}
.btn.isBusy:not(:has(.btnIcon))::before {
position: relative;
left: 0;
top: 0;
margin: 0 6px 0 0;
display: inline-block;
}
@keyframes btnSpin {
to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
.btn.isBusy::before {
animation-duration: 2s;
}
}
.btn:focus-visible,
@@ -808,7 +847,7 @@ svg {
.workspaceSearch input {
width: 100%;
min-height: 32px;
padding: 0 30px 0 30px;
padding: 0 64px 0 30px;
border: 1px solid var(--border-strong);
border-radius: var(--radius-md);
color: var(--text);
@@ -867,6 +906,38 @@ svg {
background: var(--surface-muted);
}
.workspaceSearchKbd {
position: absolute;
right: 30px;
top: 50%;
transform: translateY(-50%);
display: inline-flex;
align-items: center;
gap: 3px;
height: 18px;
padding: 0 5px;
border: 1px solid var(--border-strong);
border-radius: 4px;
background: var(--surface);
color: var(--muted);
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
font-size: 10px;
letter-spacing: 0.04em;
pointer-events: none;
transition: opacity var(--motion-fast);
}
.workspaceSearch:focus-within .workspaceSearchKbd,
.workspaceSearch input:not(:placeholder-shown) ~ .workspaceSearchKbd {
opacity: 0;
}
@media (max-width: 640px) {
.workspaceSearchKbd {
display: none;
}
}
.row.isSearchHidden,
.sectionTitle.isSearchHidden {
display: none !important;
@@ -895,6 +966,38 @@ svg {
box-shadow: 0 1px 0 var(--hairline) inset;
}
/* Floating active indicator: a thin vertical bar that slides between tabs.
Position is driven by --tab-indicator-y / --tab-indicator-h CSS vars
updated from JS whenever the active tab changes. */
.sideNav {
position: relative;
--tab-indicator-y: 6px;
--tab-indicator-h: 14px;
--tab-indicator-opacity: 0;
}
.sideNav::before {
position: absolute;
left: 4px;
top: var(--tab-indicator-y);
width: 2px;
height: var(--tab-indicator-h);
content: "";
border-radius: 2px;
background: var(--primary);
opacity: var(--tab-indicator-opacity);
transition: top 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
height 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
opacity var(--motion-fast);
pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
.sideNav::before {
transition: opacity var(--motion-fast);
}
}
.tabBtn {
position: relative;
display: flex;
@@ -917,18 +1020,8 @@ svg {
}
.tabBtn::before {
position: absolute;
left: 4px;
top: 50%;
width: 2px;
height: 14px;
margin-top: -7px;
content: "";
border-radius: 2px;
background: var(--primary);
opacity: 0;
transform: scaleY(0.4);
transition: opacity var(--motion-fast), transform var(--motion-fast);
/* Disabled: sideNav now owns the floating active indicator. */
display: none;
}
.tabBtn:hover {
@@ -943,8 +1036,7 @@ svg {
}
.tabBtn.active::before {
opacity: 1;
transform: scaleY(1);
display: none;
}
.tabIcon {
@@ -1602,6 +1694,40 @@ select.input {
box-shadow: var(--shadow-soft);
}
.reservationItem.isImminent {
border-color: var(--warning);
background: color-mix(in oklab, var(--warning-soft) 60%, var(--surface));
animation: imminentPulse 1.6s ease-in-out infinite;
}
.reservationItem.isImminent .reservationValue {
border-color: var(--warning);
background: var(--warning);
color: var(--on-primary);
}
.reservationItem.isDue {
border-color: var(--danger);
background: color-mix(in oklab, var(--danger-soft) 50%, var(--surface));
}
.reservationItem.isDue .reservationValue {
border-color: var(--danger);
background: var(--danger);
color: var(--on-primary);
}
@keyframes imminentPulse {
0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--warning) 35%, transparent); }
50% { box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) {
.reservationItem.isImminent {
animation: none;
}
}
.reservationHeader {
display: flex;
align-items: center;