From 5bf108f1f8216a0e93f4d328db50063dccb82cbf Mon Sep 17 00:00:00 2001 From: xmz7891 Date: Wed, 7 Oct 2026 10:48:28 +0800 Subject: [PATCH] =?UTF-8?q?=EF=BB=BF=E4=BF=AE=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=A1=B6=E6=A0=8F=E8=A2=AB=E5=88=87=E6=8E=89=EF=BC=88=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E7=9C=8B=E4=B8=8D=E8=A7=81=E3=80=81=E5=BE=BD=E7=AB=A0?= =?UTF-8?q?=E5=8E=8B=E5=9C=A8=E5=AD=97=E4=B8=8A=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用户截图圈出顶栏:主标题「ykxmz 中转站」被切掉看不见, 「运行中」徽章压在副标题上。 根因: .top-in 用了固定 height:62px。 但顶栏内容比 62px 高: 左边品牌是「标题 + 副标题」两行 右边是「版本信息 + 累计请求」两行 flex 容器固定高度装不下,内容就被往上顶出去了 —— 于是标题被切在容器外,徽章挤到文字上。 修法: * height:62px 改成 padding:13px 0 + min-height:36px (内容多高就是多高,别再写死) * 给 logo / brand / state 都加 flex:none,别被压缩 * 标题副标题加 white-space:nowrap,避免换行错位 * 右上的版本信息允许收缩(min-width:0) * 窄屏(<640px)时状态徽章换行,不跟标题挤 实测:1200px 和 700px 两档宽度下顶栏都正常, 标题、副标题、徽章、右侧信息全部各就各位。 --- _build/_c14.txt | 23 ++ _build/admin_header_test.html | 481 ++++++++++++++++++++++++++++++++++ _build/admin_new.html | 12 +- relay/admin.py | 32 ++- 4 files changed, 535 insertions(+), 13 deletions(-) create mode 100644 _build/_c14.txt create mode 100644 _build/admin_header_test.html diff --git a/_build/_c14.txt b/_build/_c14.txt new file mode 100644 index 0000000..2c250db --- /dev/null +++ b/_build/_c14.txt @@ -0,0 +1,23 @@ +修管理页顶栏被切掉(标题看不见、徽章压在字上) + +用户截图圈出顶栏:主标题「ykxmz 中转站」被切掉看不见, +「运行中」徽章压在副标题上。 + +根因: + .top-in 用了固定 height:62px。 + 但顶栏内容比 62px 高: + 左边品牌是「标题 + 副标题」两行 + 右边是「版本信息 + 累计请求」两行 + flex 容器固定高度装不下,内容就被往上顶出去了 —— + 于是标题被切在容器外,徽章挤到文字上。 + +修法: + * height:62px 改成 padding:13px 0 + min-height:36px + (内容多高就是多高,别再写死) + * 给 logo / brand / state 都加 flex:none,别被压缩 + * 标题副标题加 white-space:nowrap,避免换行错位 + * 右上的版本信息允许收缩(min-width:0) + * 窄屏(<640px)时状态徽章换行,不跟标题挤 + +实测:1200px 和 700px 两档宽度下顶栏都正常, +标题、副标题、徽章、右侧信息全部各就各位。 diff --git a/_build/admin_header_test.html b/_build/admin_header_test.html new file mode 100644 index 0000000..b1d10d2 --- /dev/null +++ b/_build/admin_header_test.html @@ -0,0 +1,481 @@ + + + + + +ykxmz 中转站 + + + +
+ +
+ ykxmz 中转站 + 跨网络中转 · 管理后台 +
+ 运行中 +
+
版本 1.7.1 · 已运行 9 小时 10 分 · 内存 22 MB
+
累计请求 154 · 退出登录
+
+
+ +
+ +
+

公网地址 —— 手表「中转设置」里填这个

+
+
https://relay.xxmxxs.top
+ +
+
手表和电脑不在同一个网络时,两边都通过这个地址中转。
+
+ +
+
0
登记设备
+
0
在线
+
0
手表会话
+
0
配对码占用
+
+ +
+

设备

+
+ + + +
+
+ +
+ + + + + + + + + +
设备配对码状态空闲待发 表/机流量 入/出
还没有电脑连上来

在教室那台电脑上双击 ykxmz.exe 设好 6 位配对码,手表上输这 6 位数字就能连上。

+
+ +
+
+

网络体检

+
看看这台机器是走局域网还是走隧道。
+
还没测过。
+
+
+
+

下载区

+
官网下载按钮指向这里的文件。
+
还没有上传任何安装包。把文件放到中转的 downloads 目录即可。
+
+
+ +
+ 隐私说明 —— 数据来自 /v1/health,只显示配对码和流量数字, + 看不到任何传输内容。中转只转发字节,不解析、不存储会话内容。 +
+
+ +
+ + \ No newline at end of file diff --git a/_build/admin_new.html b/_build/admin_new.html index 7a47125..f93ed52 100644 --- a/_build/admin_new.html +++ b/_build/admin_new.html @@ -187,8 +187,8 @@ button.sm{padding:6px 12px;font-size:12px} 运行中
-
版本 1.7.1 · 已运行 4 分 · 内存 23 MB
-
累计请求 51 · 退出登录
+
版本 1.7.1 · 已运行 21 分 · 内存 22 MB
+
累计请求 154 · 退出登录
@@ -204,10 +204,10 @@ button.sm{padding:6px 12px;font-size:12px}
-
11
登记设备
-
5
在线
+
0
登记设备
+
0
在线
0
手表会话
-
11
配对码占用
+
0
配对码占用
@@ -229,7 +229,7 @@ button.sm{padding:6px 12px;font-size:12px} 空闲待发 表/机流量 入/出 -
DESKTOP-RN5I625
DESKTOP-RN5I625-d1c920f2c726
352290离线247s0 / 00 B / 0 B
DESKTOP-RN5I625
DESKTOP-RN5I625-02934838d2cc
189202离线238s0 / 00 B / 0 B
DESKTOP-RN5I625
DESKTOP-RN5I625-273302b03a68
892554离线128s0 / 00 B / 0 B
DESKTOP-RN5I625
DESKTOP-RN5I625-f4821a442083
065136离线114s0 / 00 B / 0 B
DESKTOP-RN5I625
DESKTOP-RN5I625-63b81c627415
825679离线107s0 / 00 B / 0 B
DESKTOP-RN5I625
DESKTOP-RN5I625-1fbccb1dc1ce
789113离线98s0 / 00 B / 0 B
DESKTOP-RN5I625
DESKTOP-RN5I625-b8a7a5967369
550940在线83s0 / 00 B / 0 B
DESKTOP-RN5I625
DESKTOP-RN5I625-909eb2913b0d
482913在线68s0 / 00 B / 0 B
DESKTOP-RN5I625
DESKTOP-RN5I625-62ce8c0e081f
517284在线52s0 / 00 B / 0 B
DESKTOP-RN5I625
DESKTOP-RN5I625-3fa515cd4ce0
246813在线23s0 / 00 B / 0 B
DESKTOP-RN5I625
DESKTOP-RN5I625-3b8ccd5fb569
675224在线12s0 / 00 B / 0 B +
还没有电脑连上来

在教室那台电脑上双击 ykxmz.exe 设好 6 位配对码,手表上输这 6 位数字就能连上。

diff --git a/relay/admin.py b/relay/admin.py index e7cb89d..9449d71 100644 --- a/relay/admin.py +++ b/relay/admin.py @@ -55,25 +55,43 @@ a{color:inherit} /* ---------- 吸顶顶栏 ---------- */ .top{position:sticky;top:0;z-index:40;background:rgba(255,255,255,.88); backdrop-filter:saturate(180%%) blur(12px);border-bottom:1px solid var(--border)} -.top-in{display:flex;align-items:center;gap:12px;height:62px} +/* + * ⚠ 别用固定 height。 + * 原来写的是 .top-in{height:62px},但里面品牌是「标题 + 副标题」两行、 + * 右边还有两行版本信息 —— 实际内容比 62px 高, + * flex 就把内容往上顶出去了:**标题被切掉、运行中徽章压在字上** + * (用户截图里就是这样)。 + * 改成 padding 撑开,内容多高就是多高。 + */ +.top-in{display:flex;align-items:center;gap:12px; + padding-top:13px;padding-bottom:13px;min-height:36px} .logo{width:32px;height:32px;border-radius:9px;flex:none; background:linear-gradient(140deg,#2563eb,#1d4ed8); display:flex;align-items:center;justify-content:center; color:#fff;font-weight:700;font-size:12px;letter-spacing:-.3px} -.brand b{display:block;font-size:15px;font-weight:650;letter-spacing:-.2px} -.brand span{display:block;color:var(--faint);font-size:11px} -.state{margin-left:14px;display:inline-flex;align-items:center;gap:6px; +.brand{flex:none;min-width:0} +.brand b{display:block;font-size:15px;font-weight:650;letter-spacing:-.2px; + line-height:1.35;white-space:nowrap} +.brand span{display:block;color:var(--faint);font-size:11px; + line-height:1.4;white-space:nowrap} +.state{margin-left:8px;flex:none;display:inline-flex;align-items:center;gap:6px; padding:3px 10px;border-radius:999px;background:#f0fdf4; - color:#15803d;font-size:11px;font-weight:600} + color:#15803d;font-size:11px;font-weight:600;white-space:nowrap} .state i{width:6px;height:6px;border-radius:50%%;background:#22c55e; - display:block} + display:block;flex:none} .top-right{margin-left:auto;text-align:right;font-size:11px; - color:var(--faint);line-height:1.7} + color:var(--faint);line-height:1.65;min-width:0} .top-right b{color:var(--muted);font-weight:500} .logout{color:var(--muted);text-decoration:none; border-bottom:1px dashed var(--border);transition:.15s} .logout:hover{color:var(--danger);border-bottom-color:var(--danger)} +/* 窄屏:状态徽章换行,别和标题挤 */ +@media(max-width:640px){ + .top-in{flex-wrap:wrap;gap:8px} + .state{margin-left:auto} +} + /* ---------- 公网地址(最重要,给最大权重)---------- */ .hero{padding:30px 0 26px} .hero h2{font-size:13px;font-weight:600;color:var(--muted);