精修 WebUI 第八轮:可复制 + 全屏 + 表格细节
- statValue 一键复制:PID 和 TraceId hover 显示复制按钮,点击调用 navigator.clipboard,带 toast 反馈与 fallback (textarea + execCommand) - setTextIfExists 改为只更新文本节点,保留子元素(如 .copyBtn 不被覆盖) - 截图区右上角加全屏按钮(hover 显示):调用 requestFullscreen,失败则新窗口打开;左下角浮层显示截图时间戳,毛玻璃背景 - 表格行:默认 ellipsis 截断,hover 时展开为多行换行 - cache-bust v10 → v11
This commit is contained in:
1 parent
857b33f413
commit
d1f153b373
3 files changed
+187
-6
No files matched your search
@@ -1396,6 +1396,44 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
transition: color var(--motion-fast);
|
||||
}
|
||||
|
||||
.statValue.hasCopy {
|
||||
position: relative;
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.copyBtn {
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
border: 1px solid transparent;
|
||||
border-radius: var(--radius-sm);
|
||||
background: transparent;
|
||||
color: var(--muted-soft);
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
transition: opacity var(--motion-fast), color var(--motion-fast),
|
||||
background var(--motion-fast), border-color var(--motion-fast);
|
||||
}
|
||||
|
||||
.statValue.hasCopy:hover .copyBtn,
|
||||
.statValue.hasCopy:focus-within .copyBtn,
|
||||
.copyBtn:focus-visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.copyBtn:hover {
|
||||
color: var(--text);
|
||||
border-color: var(--border);
|
||||
background: var(--surface-muted);
|
||||
}
|
||||
|
||||
.statValue.isFlash {
|
||||
animation: statFlash 700ms ease-out;
|
||||
}
|
||||
@@ -1543,6 +1581,17 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
|
||||
.tableRow:not(.tableHead) > div:not(:last-child) {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tableRow:not(.tableHead) > div:not(:last-child):hover {
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.tableRow:not(.tableHead):hover {
|
||||
background: var(--surface-soft);
|
||||
}
|
||||
@@ -1659,6 +1708,57 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
transition: opacity var(--motion-slow);
|
||||
}
|
||||
|
||||
.previewTs {
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
bottom: 8px;
|
||||
z-index: 2;
|
||||
padding: 3px 7px;
|
||||
border-radius: 99px;
|
||||
background: color-mix(in oklab, var(--surface) 70%, transparent);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--muted);
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
font-size: 10px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
letter-spacing: 0.02em;
|
||||
pointer-events: none;
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.previewFullscreen {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
top: 8px;
|
||||
z-index: 2;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
padding: 0;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
background: color-mix(in oklab, var(--surface) 70%, transparent);
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
backdrop-filter: blur(8px);
|
||||
transition: opacity var(--motion-fast), color var(--motion-fast),
|
||||
background var(--motion-fast), border-color var(--motion-fast);
|
||||
}
|
||||
|
||||
.preview:hover .previewFullscreen,
|
||||
.previewFullscreen:focus-visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.previewFullscreen:hover {
|
||||
color: var(--text);
|
||||
border-color: var(--hover-border);
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
.preview img[src*="screenshot.png"][data-loading="false"] {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user