feat: node info, build info and acrylic web theme

Squash of recent dev work: return_session login, backend switcher, line
detail timeline, overview strips, node platform/country/ISP info with flags
and icons, build info (version, tag, time) behind site.show_build, and the
acrylic display theme.
This commit is contained in:
justme committed 2026-10-06 21:24:25 +08:00
1 parent 10634bdd80
commit 14b0de3544
95 files changed
+5524 -528

No files matched your search

+773 -6
View File
@@ -239,6 +239,7 @@
}
.agent-card {
position: relative;
display: flex;
flex-direction: column;
gap: 12px;
@@ -276,14 +277,28 @@
.line-link {
display: flex;
align-items: center;
gap: 8px;
flex-direction: column;
align-items: stretch;
gap: 6px;
min-width: 0;
padding: 6px 10px;
border-radius: var(--r-control);
background: var(--app-card-inset);
color: var(--app-ink);
}
.line-link > .muted {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.line-link > .scores {
flex-wrap: wrap;
margin-left: auto;
}
.line-link:hover {
text-decoration: none;
background: var(--app-card-hover);
@@ -398,15 +413,42 @@
background: var(--app-ok);
}
.line-link > * {
white-space: nowrap;
}
.range-picker {
display: flex;
flex-direction: column;
}
.day-pick {
position: relative;
display: inline-flex;
align-items: center;
height: 36px;
padding: 0 16px;
border: 0;
border-radius: var(--r-control);
background: var(--app-card-inset);
color: var(--app-ink);
font: inherit;
font-weight: 600;
cursor: pointer;
}
.day-pick:hover {
background: var(--app-card-hover);
}
.day-pick input {
position: absolute;
left: 0;
bottom: 0;
width: 1px;
height: 1px;
padding: 0;
border: 0;
opacity: 0;
pointer-events: none;
}
/* ── 对比:每个 Probe 的最佳线路 + 矩阵 ── */
.winners {
margin-top: 24px;
@@ -460,3 +502,728 @@
.cell svg {
color: var(--app-ok);
}
/* ── 线路详情:指标平铺成一格一格 ── */
.tiles {
display: grid;
gap: 12px;
grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.tiles > .stat,
.tiles > .tile {
padding: 14px 16px;
border-radius: var(--r-card);
background: var(--app-card);
}
.tiles > .tile {
display: flex;
flex-direction: column;
gap: 8px;
grid-column: 1 / -1;
}
.tiles > .tile .k {
font-size: 12px;
color: var(--app-ink-faint);
}
.tiles .stat .v {
font-size: 22px;
}
.tiles > .tile .scores {
justify-content: flex-start;
}
/* ── 一天的缩略图和可拖动的选区 ── */
.minimap {
--pick: var(--chart-1);
margin-top: 12px;
}
.minimap .track {
position: relative;
height: 60px;
margin-bottom: 18px;
border-radius: var(--r-control);
/* 没有数据的地方:灰色斜纹 */
background: repeating-linear-gradient(135deg, var(--app-card-inset) 0 5px, var(--app-card-hover) 5px 10px);
cursor: crosshair;
touch-action: none;
user-select: none;
}
.minimap svg {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border-radius: var(--r-control);
overflow: hidden;
}
.minimap svg path {
fill: var(--app-bad);
opacity: 0.55;
}
.minimap svg rect.has {
fill: var(--app-card);
}
.minimap .sel {
position: absolute;
top: 0;
bottom: 0;
border: 2px solid var(--pick);
border-radius: var(--r-control);
background: color-mix(in srgb, var(--pick) 16%, transparent);
cursor: grab;
}
.minimap .sel .h {
position: absolute;
top: 12px;
bottom: 12px;
width: 6px;
border-radius: 3px;
background: var(--pick);
cursor: ew-resize;
}
.minimap .sel .h.l {
left: -4px;
}
.minimap .sel .h.r {
right: -4px;
}
.minimap .ticks {
position: absolute;
left: 0;
right: 0;
top: 100%;
height: 18px;
}
.minimap .tick {
position: absolute;
top: 0;
min-width: 16px;
height: 18px;
padding: 7px 2px 0;
border: 0;
border-radius: 4px;
background: transparent;
color: var(--app-ink-faint);
font: inherit;
font-size: 11px;
line-height: 1;
cursor: pointer;
transform: translateX(-50%);
}
/* 刻度线:每小时一根,标了钟点的更长 */
.minimap .tick::before {
content: '';
position: absolute;
left: 50%;
top: 0;
width: 1px;
height: 4px;
background: var(--app-ink-faint);
opacity: 0.6;
}
.minimap .tick.minor::before {
height: 3px;
opacity: 0.35;
}
.minimap .tick:not(.minor)::before {
height: 6px;
}
.minimap .tick:hover:not(:disabled) {
background: var(--app-card-hover);
color: var(--app-ink);
}
.minimap .tick:disabled {
cursor: default;
}
.minimap .tick.date {
font-weight: 600;
color: var(--app-ink-muted);
}
.minimap .guide {
position: absolute;
top: 0;
bottom: 0;
width: 1px;
background: var(--app-ink-muted);
opacity: 0.7;
pointer-events: none;
}
.minimap .guide-label {
position: absolute;
top: 4px;
padding: 2px 6px;
border-radius: 6px;
background: var(--app-ink);
color: var(--app-card);
font-size: 11px;
white-space: nowrap;
pointer-events: none;
}
.minimap .readout {
font-size: 12px;
color: var(--app-ink-muted);
}
.day-pick {
user-select: none;
}
.minimap .midnight {
position: absolute;
top: 0;
bottom: 0;
width: 1px;
background: var(--app-ink-faint);
opacity: 0.6;
pointer-events: none;
}
/* ── 线路详情的图表:按 UDP、TCP、评分分组,宽图占满一行 ── */
.chart-section {
display: flex;
flex-direction: column;
gap: 12px;
}
.chart-section h2 {
margin: 8px 4px 0;
font-size: 14px;
font-weight: 600;
color: var(--app-ink-muted);
}
.chart-section .chart-card.wide {
grid-column: 1 / -1;
}
.minimap .loading-bar {
z-index: 2;
border-radius: var(--r-control) var(--r-control) 0 0;
}
/* 点下去会动的端点:它到目标位置之间染色(扩大 = 强调色,收缩 = 灰色),端点本身也变色 */
.minimap .sweep {
position: absolute;
top: 0;
bottom: 0;
pointer-events: none;
z-index: 1;
}
.minimap .sweep.grow {
background: color-mix(in srgb, var(--chart-2) 32%, transparent);
}
.minimap .sweep.cut {
background: color-mix(in srgb, var(--app-ink) 18%, transparent);
}
.minimap .sel .h {
transition: background-color 0.12s ease;
}
.minimap .sel .h.will.grow {
background: var(--chart-2);
}
.minimap .sel .h.will.cut {
background: var(--app-ink-muted);
}
/* 顶栏里的连接状态:紧凑的一条,放在导航和主题切换之间 */
.topbar .src-status {
width: auto;
max-width: 220px;
border-radius: var(--r-pill, 999px);
padding: 6px 12px;
}
@media (max-width: 640px) {
.topbar .src-status .st {
display: none;
}
.topbar .src-status {
max-width: 120px;
}
}
.line-top {
display: flex;
align-items: center;
gap: 8px;
}
.lines-caption {
padding: 0 4px 2px;
font-size: 12px;
color: var(--app-ink-faint);
}
/* ── 总览卡片里的 UDP:一排小格(每 5 分钟一格,按丢包着色)+ 延迟小走势,尽量轻 ── */
.line-name {
font-weight: 600;
font-size: 13px;
}
.line-top .faint {
font-size: 11px;
}
.udp-strip {
position: relative;
display: flex;
flex-direction: column;
gap: 4px;
}
.udp-head {
display: flex;
align-items: baseline;
justify-content: space-between;
font-size: 11px;
}
.udp-title {
color: var(--app-ink-faint);
}
.udp-title b {
margin-left: 2px;
font-size: 13px;
font-weight: 700;
color: var(--app-ink);
}
.udp-title b.udp-rate.ok {
color: var(--app-ok);
}
.udp-title b.udp-rate.warn {
color: var(--app-warn);
}
.udp-title b.udp-rate.bad {
color: var(--app-bad);
}
.bars {
display: flex;
gap: 2px;
height: 10px;
}
.bar {
flex: 1;
min-width: 0;
border-radius: 2px;
background: var(--app-idle);
opacity: 0.35;
}
.bar.ok {
background: var(--app-ok);
opacity: 0.9;
}
.bar.warn {
background: var(--app-warn);
opacity: 1;
}
.bar.bad {
background: var(--app-bad);
opacity: 1;
}
/* UDP 和 TCP 两段之间留一点空 */
.strips {
display: flex;
flex-direction: column;
gap: 10px;
}
/* 悬停的那一格:小格描边、走势图上一条竖线和一个点,再弹一个小提示 */
.bar.on {
outline: 2px solid var(--app-ink);
outline-offset: 1px;
}
.strips {
position: relative;
}
/* 提示弹在卡片右侧:平时收在卡片边上(透明、偏左),悬停时滑出来,移开时缩回去 */
.pop {
position: absolute;
top: -4px;
left: calc(100% + 40px);
z-index: 20;
display: flex;
flex-direction: column;
gap: 8px;
width: 168px;
padding: 10px 12px;
border-radius: 12px;
background: var(--app-ink);
color: var(--app-card);
font-size: 12px;
line-height: 1.4;
white-space: nowrap;
pointer-events: none;
opacity: 0;
transform: translateX(-14px) scale(0.96);
transform-origin: left center;
transition:
opacity 0.16s ease,
transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
box-shadow: 0 6px 20px color-mix(in srgb, var(--app-shadow), transparent 68%);
}
.pop.open {
opacity: 1;
transform: none;
}
/* 指向卡片的小三角 */
.pop::before {
content: '';
position: absolute;
top: 18px;
left: -5px;
width: 10px;
height: 10px;
background: var(--app-ink);
transform: rotate(45deg);
border-radius: 2px;
}
.pop-time {
font-size: 12px;
font-weight: 700;
opacity: 0.8;
}
.pop-group {
display: grid;
grid-template-columns: 1fr;
gap: 1px;
}
.pop-name {
font-size: 10px;
letter-spacing: 0.08em;
opacity: 0.6;
}
.pop em {
font-style: normal;
font-weight: 700;
margin-left: 4px;
}
.pop em.warn {
color: var(--app-warn-container);
}
.pop em.bad {
color: var(--app-bad-container);
}
/* 右边放不下(窄屏、卡片贴着右边)时,提示改成盖在卡片上方 */
@media (max-width: 900px) {
.pop {
left: auto;
right: 0;
top: -8px;
transform: translateY(8px) scale(0.96);
transform-origin: right bottom;
}
.pop::before {
display: none;
}
}
.site-foot {
max-width: 900px;
margin: 48px auto 24px;
padding: 0 16px;
font-size: 11px;
text-align: center;
color: var(--app-ink-faint);
}
.site-foot a {
color: inherit;
text-decoration: underline;
}
/* Agent 卡片:国旗开头,名字下面是「运营商 / 系统」两行(左边名字右边内容,和下面的流量、网速一个风格) */
/* 亚克力:整张卡片半透明 + 背景模糊,细亮边,大一点的投影;标题栏是稍深的一条,底下垫放大模糊的国旗 */
/* 背景图固定在最底下,自己模糊一点(边缘放大一点,免得模糊后露出白边);上面盖一层页面底色,亮色盖得浅一点,暗色盖得深 */
body::before {
content: '';
position: fixed;
inset: -24px;
z-index: -1;
background-image:
linear-gradient(color-mix(in srgb, var(--app-bg) var(--bg-veil), transparent), color-mix(in srgb, var(--app-bg) var(--bg-veil), transparent)),
url('./assets/bg.jpg');
background-size: cover;
background-position: center;
filter: blur(var(--bg-blur));
pointer-events: none;
}
:root {
--bg-veil: 50%;
--bg-blur: 10px;
}
:root[data-theme="dark"] {
--bg-veil: 82%;
}
.agent-card {
background: color-mix(in srgb, var(--app-card) 76%, transparent);
backdrop-filter: blur(28px) saturate(1.6);
box-shadow:
inset 0 0 0 1px color-mix(in srgb, var(--app-ink) 9%, transparent),
inset 0 1px 0 color-mix(in srgb, var(--app-card) 70%, transparent),
0 14px 32px -12px color-mix(in srgb, var(--app-shadow) 45%, transparent);
}
.agent-head {
position: relative;
isolation: isolate;
margin: -20px -20px 0;
padding: 16px 20px;
border-radius: var(--r-card) var(--r-card) 0 0;
background: color-mix(in srgb, var(--app-ink) 5%, transparent);
border-bottom: 1px solid color-mix(in srgb, var(--app-ink) 8%, transparent);
}
.agent-head .flag {
flex: none;
width: 24px;
height: 18px;
border-radius: 3px;
object-fit: cover;
box-shadow: 0 0 0 1px var(--app-outline-soft);
}
.agent-head .flag.ph {
display: inline-block;
background: var(--app-card-inset);
}
.facts {
display: flex;
flex-direction: column;
gap: 4px;
font-size: 12px;
}
.fact {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.fact .k {
color: var(--app-ink-faint);
}
.fact .v {
display: inline-flex;
align-items: center;
gap: 6px;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--app-ink);
}
.fact .v .isp {
flex: none;
width: 16px;
height: 16px;
object-fit: contain;
}
.fact .v .isp rect {
fill: var(--app-ink-faint);
}
.fact .v .isp text {
fill: var(--isp-ink);
font-size: 10px;
font-weight: 700;
}
.fact .v .isp-broadnet rect {
fill: var(--isp-broadnet);
}
/* 线路行:国旗在 Probe 名字前面,运营商图标在后面 */
.line-name {
display: inline-flex;
align-items: center;
gap: 6px;
}
.line-name .flag {
flex: none;
width: 18px;
height: 13.5px;
border-radius: 2px;
object-fit: cover;
box-shadow: 0 0 0 1px var(--app-outline-soft);
}
.line-top .isp {
flex: none;
width: 16px;
height: 16px;
object-fit: contain;
}
.line-top .isp rect {
fill: var(--app-ink-faint);
}
.line-top .isp text {
fill: var(--isp-ink);
font-size: 10px;
font-weight: 700;
}
.line-top .isp-broadnet rect {
fill: var(--isp-broadnet);
}
/* 亚克力卡片里的线路块:不用实色,只叠一层淡淡的墨色和细描边,透出卡片本身 */
.agent-card .line-link {
background: color-mix(in srgb, var(--app-ink) 4%, transparent);
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-ink) 7%, transparent);
}
.agent-card .line-link:hover {
background: color-mix(in srgb, var(--app-ink) 7%, transparent);
}
/* 线路详情、对比等页面的卡片和指标块:同样的亚克力,一层压一层 */
.card:not(.agent-card),
.tiles > .stat,
.tiles > .tile {
background: color-mix(in srgb, var(--app-card) 76%, transparent);
backdrop-filter: blur(28px) saturate(1.6);
box-shadow:
inset 0 0 0 1px color-mix(in srgb, var(--app-ink) 9%, transparent),
inset 0 1px 0 color-mix(in srgb, var(--app-card) 70%, transparent),
0 14px 32px -12px color-mix(in srgb, var(--app-shadow) 45%, transparent);
}
/* 小的指标块浮得低一点:阴影收小 */
.tiles > .stat {
box-shadow:
inset 0 0 0 1px color-mix(in srgb, var(--app-ink) 8%, transparent),
inset 0 1px 0 color-mix(in srgb, var(--app-card) 70%, transparent),
0 6px 14px -8px color-mix(in srgb, var(--app-shadow) 40%, transparent);
}
.topbar {
background: color-mix(in srgb, var(--app-card) 62%, transparent);
backdrop-filter: blur(20px) saturate(1.5);
border-bottom-color: color-mix(in srgb, var(--app-ink) 7%, transparent);
box-shadow: 0 4px 14px -8px color-mix(in srgb, var(--app-shadow) 28%, transparent);
}
/* 时间轴:同样的亚克力。有数据的段是半透明的亮底,没数据的段是淡淡的斜纹,整条有细描边和投影 */
.minimap .track {
background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--app-card) 55%, var(--app-idle)) 0 5px, color-mix(in srgb, var(--app-card) 70%, var(--app-idle)) 5px 10px);
backdrop-filter: blur(20px) saturate(1.6);
box-shadow:
inset 0 0 0 1px color-mix(in srgb, var(--app-ink) 9%, transparent),
0 10px 24px -12px color-mix(in srgb, var(--app-shadow) 45%, transparent);
}
.minimap svg rect.has {
fill: color-mix(in srgb, var(--app-card) 80%, transparent);
}
/* 直接落在背景图上的字(页面标题、分组名、说明):加一圈和页面底色一样的柔光,免得被图案吃掉 */
body {
text-shadow: 0 0 8px color-mix(in srgb, var(--app-bg) 90%, transparent), 0 0 2px color-mix(in srgb, var(--app-bg) 70%, transparent);
}
.card,
.pop,
.tiles > .stat,
.tiles > .tile,
.topbar,
button,
input {
text-shadow: none;
}
/* 时间轴整条做成圆角:轨道、里面的图、选区用同一个半径 */
.minimap .track,
.minimap svg,
.minimap .sel {
border-radius: 18px;
}
/* 版本、tag:等宽的小字 */
.fact .v.mono-tag,
.probe-tag {
font-family: var(--font-mono);
font-size: 11px;
}
.probe-tag {
padding: 0 6px;
border-radius: 6px;
background: color-mix(in srgb, var(--app-ink) 6%, transparent);
color: var(--app-ink-muted);
}
.build-info {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 4px 16px;
margin-top: 4px;
font-family: var(--font-mono);
font-size: 11px;
}