mirror of
https://gitee.com/xmz7891/ykxmz.git
synced 2026-10-19 13:00:44 +00:00
网页改成白色简洁 + 修官网两个 bug
配色 - 官网 / 登录页 / 管理页从 GitHub 深色风改成白色简洁 (用户的设计理念:所有东西都要白色简洁) - 白底上把浅灰文字换成深色,链接蓝也调深一档保证对比度 修 bug - 管理入口的链接拼接写坏了,页面上显示成 href= + ADMIN_PATH +, 点了打不开管理页 - .lead 用的是深色主题的浅灰,白底上几乎看不见 其他 - 清掉提交信息里的 BOM(PowerShell 的 Set-Content 加的)
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
1.7.1:修白屏 + 配对 + 官网管理页分家
|
||||||
|
|
||||||
|
手表端
|
||||||
|
- 修「连上后一片白屏」:initTabs() 从来没被调用过,
|
||||||
|
导致 tabDefs 为 null、selectTab 直接 return,
|
||||||
|
标签栏里只剩一个孤立的滑动指示器
|
||||||
|
- 应用名改成 ykxmz
|
||||||
|
|
||||||
|
被控端
|
||||||
|
- 修「设备已关闭新设备配对」:配对码本身就是密钥,
|
||||||
|
拿着正确的码就该放行。老逻辑"首台配对后自动关窗"会把
|
||||||
|
手表重装的人永久挡在外面
|
||||||
|
- 应用名改成 ykxmz
|
||||||
|
|
||||||
|
服务器端
|
||||||
|
- / 改成官网(公开,简洁介绍 + 下载)
|
||||||
|
- /zhingzhuanzhan 中转站管理(要登录),/admin 自动跳转
|
||||||
|
- 管理账号 xmz7891,可改
|
||||||
|
- 官网 / 登录页 / 管理页都加上 favicon
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
网页改成白色简洁 + 修官网两个 bug
|
||||||
|
|
||||||
|
配色
|
||||||
|
- 官网 / 登录页 / 管理页从 GitHub 深色风改成白色简洁
|
||||||
|
(用户的设计理念:所有东西都要白色简洁)
|
||||||
|
- 白底上把浅灰文字换成深色,链接蓝也调深一档保证对比度
|
||||||
|
|
||||||
|
修 bug
|
||||||
|
- 管理入口的链接拼接写坏了,页面上显示成 href= + ADMIN_PATH +,
|
||||||
|
点了打不开管理页
|
||||||
|
- .lead 用的是深色主题的浅灰,白底上几乎看不见
|
||||||
|
|
||||||
|
其他
|
||||||
|
- 清掉提交信息里的 BOM(PowerShell 的 Set-Content 加的)
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
ykxmz 1.5.0:手表端 TLS 证书兼容 + 三端分开打包 + 下载区
|
||||||
|
|
||||||
|
手表端
|
||||||
|
- 内置 GTS Root R4 / GlobalSign Root CA
|
||||||
|
修 SSLHandshakeException: Chain validation failed
|
||||||
|
- 连接错误翻译成人话:证书 / 时间 / 解析 / 超时分别给提示
|
||||||
|
- 经中转连上后用服务器报的地址刷新已配对记录
|
||||||
|
- 版本号 1.3.0 -> 1.5.0(AndroidManifest 之前漏改了)
|
||||||
|
|
||||||
|
服务器端
|
||||||
|
- 支持 chunked 请求体,修每 16 秒一次的连接错乱与大面积 502
|
||||||
|
- 网络调优 net-tune.sh(开机自动应用)
|
||||||
|
- 新增下载区,管理页加下载卡片
|
||||||
|
- 隧道改 HTTP/2 + 双连接
|
||||||
|
|
||||||
|
打包方式变更
|
||||||
|
- 从一个合并 zip 改成三个独立产物:
|
||||||
|
ykxmz-agent-*.zip 被控端
|
||||||
|
ykxmz-server-*.zip 服务器端
|
||||||
|
ykxmz-watch-*.apk 控制端
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
r'''修官网上残留的两个问题。
|
||||||
|
|
||||||
|
1. 管理入口的链接拼接写坏了
|
||||||
|
生成的源码里是:
|
||||||
|
· <a href="""" + ADMIN_PATH + """">管理入口</a>
|
||||||
|
结果是页面上真的显示成 href= + ADMIN_PATH +,
|
||||||
|
点了打不开管理页。改成直接写字面路径。
|
||||||
|
|
||||||
|
2. .lead{color:#c9d1d9} 是给深色底配的浅灰,
|
||||||
|
白底上几乎看不见。换成深色。
|
||||||
|
'''
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import ast
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
ROOT = Path(r"C:\Users\shu\Desktop\deepseekagent\LanRemote")
|
||||||
|
sys.path.insert(0, str(ROOT / "_build"))
|
||||||
|
|
||||||
|
from devssh import run, upload # noqa: E402
|
||||||
|
|
||||||
|
RELAY = ROOT / "relay" / "relay.py"
|
||||||
|
|
||||||
|
FIXES = [
|
||||||
|
# 管理入口链接
|
||||||
|
(''' · <a href="""" + ADMIN_PATH + """">管理入口</a>''',
|
||||||
|
''' · <a href="/zhingzhuanzhan">管理入口</a>'''),
|
||||||
|
# 白底上看不见的浅灰
|
||||||
|
("color:#c9d1d9", "color:#1f2328"),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
text = RELAY.read_text(encoding="utf-8")
|
||||||
|
changed = []
|
||||||
|
|
||||||
|
for old, new in FIXES:
|
||||||
|
if new in text:
|
||||||
|
continue
|
||||||
|
if old in text:
|
||||||
|
text = text.replace(old, new)
|
||||||
|
changed.append(old[:50])
|
||||||
|
|
||||||
|
if changed:
|
||||||
|
RELAY.write_text(text, encoding="utf-8", newline="\n")
|
||||||
|
for c in changed:
|
||||||
|
print(f" 修好: {c}")
|
||||||
|
else:
|
||||||
|
print(" 没有要修的")
|
||||||
|
|
||||||
|
ast.parse(text)
|
||||||
|
print(" 语法 OK")
|
||||||
|
|
||||||
|
# 复核
|
||||||
|
print()
|
||||||
|
print(" 复核:")
|
||||||
|
has_link = 'href="/zhingzhuanzhan"' in text
|
||||||
|
no_light = "#c9d1d9" not in text
|
||||||
|
print(" 管理入口链接写字面量: " + ("✓" if has_link else "✗"))
|
||||||
|
print(" 没有残留的 #c9d1d9: " + ("✓" if no_light else "✗"))
|
||||||
|
|
||||||
|
print()
|
||||||
|
print(" 部署…")
|
||||||
|
upload(str(RELAY), "/root/lanremote-relay/relay.py", 0o755)
|
||||||
|
run("systemctl restart lanremote-relay", timeout=90)
|
||||||
|
_c, out, _e = run("sleep 5; bash /root/check_web.sh 2>&1", timeout=200)
|
||||||
|
print(out[-1000:])
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
r'''清掉提交信息开头的 BOM。
|
||||||
|
|
||||||
|
现象:Gitee 上提交记录显示 "1.7.1:修白屏...",
|
||||||
|
开头那个看不见的字符就是 BOM ——
|
||||||
|
PowerShell 的 Set-Content -Encoding UTF8 会加上它。
|
||||||
|
|
||||||
|
这个脚本给 git filter-branch --msg-filter 用。
|
||||||
|
'''
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
raw = sys.stdin.buffer.read()
|
||||||
|
# 直接按字节去掉开头的 BOM,别先解码
|
||||||
|
if raw.startswith(b"\xef\xbb\xbf"):
|
||||||
|
raw = raw[3:]
|
||||||
|
# 正文里也可能混进 BOM,一并清掉
|
||||||
|
raw = raw.replace(b"\xef\xbb\xbf", b"")
|
||||||
|
sys.stdout.buffer.write(raw)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
r'''把三个网页从深色改成白色简洁(用户的设计理念)。
|
||||||
|
|
||||||
|
用户:"所有东西都要白色简洁,这是我的设计理念"
|
||||||
|
|
||||||
|
当前配色(GitHub 深色风):
|
||||||
|
#0d1117 页面底色
|
||||||
|
#161b22 面板
|
||||||
|
#1c2128 面板2
|
||||||
|
#30363d 边框
|
||||||
|
#e6edf3 主文字
|
||||||
|
#8b949e 次要文字
|
||||||
|
#6e7681 更淡的文字
|
||||||
|
|
||||||
|
改成白色简洁(GitHub 浅色风):
|
||||||
|
#ffffff 页面底色
|
||||||
|
#ffffff 面板
|
||||||
|
#f6f8fa 面板2
|
||||||
|
#d0d7de 边框
|
||||||
|
#1f2328 主文字
|
||||||
|
#656d76 次要文字
|
||||||
|
#8b949e 更淡的文字
|
||||||
|
|
||||||
|
注意:只改 CSS 里的颜色值,不动别的逻辑。
|
||||||
|
有些颜色(蓝/绿/红)在浅色底上对比度也够,保留。
|
||||||
|
'''
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import ast
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
RELAY = Path(r"C:\Users\shu\Desktop\deepseekagent\LanRemote\relay" r"\relay.py")
|
||||||
|
|
||||||
|
# 深 -> 浅。用带 # 的完整形式,避免误伤。
|
||||||
|
MAP = [
|
||||||
|
("#0d1117", "#ffffff"), # 页面底色
|
||||||
|
("#161b22", "#ffffff"), # 面板
|
||||||
|
("#1c2128", "#f6f8fa"), # 面板2(略灰,用来区分层次)
|
||||||
|
("#21262d", "#eaeef2"), # 分隔线
|
||||||
|
("#30363d", "#d0d7de"), # 边框
|
||||||
|
("#e6edf3", "#1f2328"), # 主文字
|
||||||
|
("#8b949e", "#656d76"), # 次要文字
|
||||||
|
("#6e7681", "#8b949e"), # 更淡的文字
|
||||||
|
# 深色底上的高亮色,浅色底要换深一档才有对比度
|
||||||
|
("#79c0ff", "#0969da"), # 链接蓝
|
||||||
|
("#58a6ff", "#0969da"),
|
||||||
|
("#2f81f7", "#0969da"),
|
||||||
|
("#3fb950", "#1a7f37"), # 绿
|
||||||
|
("#d29922", "#9a6700"), # 黄
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
text = RELAY.read_text(encoding="utf-8")
|
||||||
|
original = text
|
||||||
|
counts = {}
|
||||||
|
|
||||||
|
for dark, light in MAP:
|
||||||
|
n = text.count(dark)
|
||||||
|
if n:
|
||||||
|
text = text.replace(dark, light)
|
||||||
|
counts[dark] = n
|
||||||
|
|
||||||
|
if text == original:
|
||||||
|
print(" 颜色已经是浅色,没要改的")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
RELAY.write_text(text, encoding="utf-8", newline="\n")
|
||||||
|
print(" 换掉的颜色:")
|
||||||
|
for dark, n in counts.items():
|
||||||
|
light = dict(MAP)[dark]
|
||||||
|
print(f" {dark} -> {light} ({n} 处)")
|
||||||
|
|
||||||
|
try:
|
||||||
|
ast.parse(text)
|
||||||
|
print()
|
||||||
|
print(" relay.py 语法 OK")
|
||||||
|
except SyntaxError as exc:
|
||||||
|
print(f" [失败] 语法错误: 行 {exc.lineno}: {exc.msg}")
|
||||||
|
return 1
|
||||||
|
|
||||||
|
# 复核:不该再有深色底
|
||||||
|
left = [d for d, _ in MAP if d in text]
|
||||||
|
print(f" 残留的深色值: {left if left else '无 ✓'}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
+36
-36
@@ -835,32 +835,32 @@ def _site_page() -> str:
|
|||||||
<style>
|
<style>
|
||||||
*{box-sizing:border-box}
|
*{box-sizing:border-box}
|
||||||
body{margin:0;font-family:-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;
|
body{margin:0;font-family:-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;
|
||||||
background:#0d1117;color:#e6edf3;line-height:1.7}
|
background:#ffffff;color:#1f2328;line-height:1.7}
|
||||||
.wrap{max-width:780px;margin:0 auto;padding:56px 20px 80px}
|
.wrap{max-width:780px;margin:0 auto;padding:56px 20px 80px}
|
||||||
h1{font-size:34px;margin:0 0 10px;letter-spacing:-.5px}
|
h1{font-size:34px;margin:0 0 10px;letter-spacing:-.5px}
|
||||||
.sub{color:#8b949e;font-size:17px;margin-bottom:10px}
|
.sub{color:#656d76;font-size:17px;margin-bottom:10px}
|
||||||
.ver{display:inline-block;background:#1f6feb22;color:#79c0ff;
|
.ver{display:inline-block;background:#1f6feb22;color:#0969da;
|
||||||
border:1px solid #1f6feb55;border-radius:20px;
|
border:1px solid #1f6feb55;border-radius:20px;
|
||||||
padding:2px 12px;font-size:13px;margin-bottom:34px}
|
padding:2px 12px;font-size:13px;margin-bottom:34px}
|
||||||
.lead{font-size:16px;color:#c9d1d9;margin:0 0 14px}
|
.lead{font-size:16px;color:#c9d1d9;margin:0 0 14px}
|
||||||
ul{color:#8b949e;padding-left:22px;margin:0 0 40px}
|
ul{color:#656d76;padding-left:22px;margin:0 0 40px}
|
||||||
li{margin:4px 0}
|
li{margin:4px 0}
|
||||||
.cards{display:grid;gap:14px;grid-template-columns:1fr}
|
.cards{display:grid;gap:14px;grid-template-columns:1fr}
|
||||||
@media(min-width:640px){.cards{grid-template-columns:1fr 1fr 1fr}}
|
@media(min-width:640px){.cards{grid-template-columns:1fr 1fr 1fr}}
|
||||||
.card{background:#161b22;border:1px solid #30363d;border-radius:12px;
|
.card{background:#ffffff;border:1px solid #d0d7de;border-radius:12px;
|
||||||
padding:18px 16px;display:flex;flex-direction:column}
|
padding:18px 16px;display:flex;flex-direction:column}
|
||||||
.card .t{font-weight:600;font-size:15px;margin-bottom:6px}
|
.card .t{font-weight:600;font-size:15px;margin-bottom:6px}
|
||||||
.card .d{color:#8b949e;font-size:13px;flex:1;margin-bottom:14px}
|
.card .d{color:#656d76;font-size:13px;flex:1;margin-bottom:14px}
|
||||||
.btn{display:block;text-align:center;background:#238636;color:#fff;
|
.btn{display:block;text-align:center;background:#238636;color:#fff;
|
||||||
text-decoration:none;padding:9px 14px;border-radius:8px;
|
text-decoration:none;padding:9px 14px;border-radius:8px;
|
||||||
font-weight:600;font-size:14px}
|
font-weight:600;font-size:14px}
|
||||||
.btn:hover{background:#2ea043}
|
.btn:hover{background:#2ea043}
|
||||||
.soon{color:#6e7681;font-size:13px;text-align:center;padding:9px 0}
|
.soon{color:#8b949e;font-size:13px;text-align:center;padding:9px 0}
|
||||||
.s{color:#6e7681;font-size:11px;margin-top:8px;
|
.s{color:#8b949e;font-size:11px;margin-top:8px;
|
||||||
word-break:break-all;text-align:center}
|
word-break:break-all;text-align:center}
|
||||||
.foot{margin-top:46px;padding-top:20px;border-top:1px solid #21262d;
|
.foot{margin-top:46px;padding-top:20px;border-top:1px solid #eaeef2;
|
||||||
color:#6e7681;font-size:13px}
|
color:#8b949e;font-size:13px}
|
||||||
.foot a{color:#79c0ff;text-decoration:none}
|
.foot a{color:#0969da;text-decoration:none}
|
||||||
</style></head><body><div class=wrap>
|
</style></head><body><div class=wrap>
|
||||||
|
|
||||||
<h1>ykxmz</h1>
|
<h1>ykxmz</h1>
|
||||||
@@ -880,7 +880,7 @@ li{margin:4px 0}
|
|||||||
<div class=foot>
|
<div class=foot>
|
||||||
源码在 <a href="https://gitee.com/xmz7891/ykxmz" target=_blank rel=noopener>Gitee</a>
|
源码在 <a href="https://gitee.com/xmz7891/ykxmz" target=_blank rel=noopener>Gitee</a>
|
||||||
· 历史版本在 <a href="https://gitee.com/xmz7891/ykxmz/releases" target=_blank rel=noopener>发行版</a>
|
· 历史版本在 <a href="https://gitee.com/xmz7891/ykxmz/releases" target=_blank rel=noopener>发行版</a>
|
||||||
· <a href="""" + ADMIN_PATH + """">管理入口</a>
|
· <a href="/zhingzhuanzhan">管理入口</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div></body></html>"""
|
</div></body></html>"""
|
||||||
@@ -896,20 +896,20 @@ def _login_page(message: str = "") -> bytes:
|
|||||||
<title>中转服务器 · 登录</title>
|
<title>中转服务器 · 登录</title>
|
||||||
<style>
|
<style>
|
||||||
body{font:14px/1.6 -apple-system,'Microsoft YaHei',sans-serif;
|
body{font:14px/1.6 -apple-system,'Microsoft YaHei',sans-serif;
|
||||||
background:#0f1117;color:#e6edf3;display:flex;align-items:center;
|
background:#0f1117;color:#1f2328;display:flex;align-items:center;
|
||||||
justify-content:center;height:100vh;margin:0}
|
justify-content:center;height:100vh;margin:0}
|
||||||
.box{background:#161b22;border:1px solid #30363d;border-radius:12px;
|
.box{background:#ffffff;border:1px solid #d0d7de;border-radius:12px;
|
||||||
padding:28px 32px;width:320px}
|
padding:28px 32px;width:320px}
|
||||||
h1{font-size:17px;margin:0 0 4px}
|
h1{font-size:17px;margin:0 0 4px}
|
||||||
.sub{color:#8b949e;font-size:12px;margin-bottom:18px}
|
.sub{color:#656d76;font-size:12px;margin-bottom:18px}
|
||||||
input{width:100%;box-sizing:border-box;background:#0d1117;color:#e6edf3;
|
input{width:100%;box-sizing:border-box;background:#ffffff;color:#1f2328;
|
||||||
border:1px solid #30363d;border-radius:7px;padding:9px 11px;font-size:15px}
|
border:1px solid #d0d7de;border-radius:7px;padding:9px 11px;font-size:15px}
|
||||||
input:focus{outline:none;border-color:#1f6feb}
|
input:focus{outline:none;border-color:#1f6feb}
|
||||||
button{width:100%;margin-top:14px;background:#1f6feb;color:#fff;border:0;
|
button{width:100%;margin-top:14px;background:#1f6feb;color:#fff;border:0;
|
||||||
border-radius:7px;padding:10px;font-size:14px;cursor:pointer}
|
border-radius:7px;padding:10px;font-size:14px;cursor:pointer}
|
||||||
button:hover{background:#388bfd}
|
button:hover{background:#388bfd}
|
||||||
.bad{color:#f85149;font-size:12px;margin:10px 0 0}
|
.bad{color:#f85149;font-size:12px;margin:10px 0 0}
|
||||||
.foot{color:#6e7681;font-size:11px;margin-top:16px;text-align:center}
|
.foot{color:#8b949e;font-size:11px;margin-top:16px;text-align:center}
|
||||||
</style>
|
</style>
|
||||||
<div class=box>
|
<div class=box>
|
||||||
<h1>中转服务器</h1>
|
<h1>中转服务器</h1>
|
||||||
@@ -1579,9 +1579,9 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
<style>
|
<style>
|
||||||
*{{box-sizing:border-box}}
|
*{{box-sizing:border-box}}
|
||||||
:root{{
|
:root{{
|
||||||
--bg:#0d1117; --panel:#161b22; --panel2:#1c2128; --border:#30363d;
|
--bg:#ffffff; --panel:#ffffff; --panel2:#f6f8fa; --border:#d0d7de;
|
||||||
--fg:#e6edf3; --dim:#8b949e; --muted:#6e7681;
|
--fg:#1f2328; --dim:#656d76; --muted:#8b949e;
|
||||||
--accent:#2f81f7; --ok:#3fb950; --danger:#f85149; --warn:#d29922;
|
--accent:#0969da; --ok:#1a7f37; --danger:#f85149; --warn:#9a6700;
|
||||||
}}
|
}}
|
||||||
html,body{{max-width:100%;overflow-x:hidden}}
|
html,body{{max-width:100%;overflow-x:hidden}}
|
||||||
body{{margin:0;padding:0;background:var(--bg);color:var(--fg);
|
body{{margin:0;padding:0;background:var(--bg);color:var(--fg);
|
||||||
@@ -1594,7 +1594,7 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
padding-bottom:16px;border-bottom:1px solid var(--border);
|
padding-bottom:16px;border-bottom:1px solid var(--border);
|
||||||
margin-bottom:20px;flex-wrap:wrap}}
|
margin-bottom:20px;flex-wrap:wrap}}
|
||||||
.logo{{width:38px;height:38px;border-radius:10px;flex:none;
|
.logo{{width:38px;height:38px;border-radius:10px;flex:none;
|
||||||
background:linear-gradient(140deg,#2f81f7,#1f6feb);
|
background:linear-gradient(140deg,#0969da,#1f6feb);
|
||||||
display:flex;align-items:center;justify-content:center;
|
display:flex;align-items:center;justify-content:center;
|
||||||
font-weight:700;font-size:15px;color:#fff;letter-spacing:-.5px}}
|
font-weight:700;font-size:15px;color:#fff;letter-spacing:-.5px}}
|
||||||
.brand h1{{margin:0;font-size:17px;font-weight:600;letter-spacing:.2px}}
|
.brand h1{{margin:0;font-size:17px;font-weight:600;letter-spacing:.2px}}
|
||||||
@@ -1615,7 +1615,7 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
/* ---------- 公网地址 ---------- */
|
/* ---------- 公网地址 ---------- */
|
||||||
.urlrow{{display:flex;align-items:center;gap:10px;flex-wrap:wrap}}
|
.urlrow{{display:flex;align-items:center;gap:10px;flex-wrap:wrap}}
|
||||||
.url{{flex:1;min-width:220px;font:600 15px/1.5 ui-monospace,Consolas,
|
.url{{flex:1;min-width:220px;font:600 15px/1.5 ui-monospace,Consolas,
|
||||||
'Courier New',monospace;color:#79c0ff;word-break:break-all;
|
'Courier New',monospace;color:#0969da;word-break:break-all;
|
||||||
background:#0b1220;border:1px solid #1f6feb44;border-radius:8px;
|
background:#0b1220;border:1px solid #1f6feb44;border-radius:8px;
|
||||||
padding:10px 12px}}
|
padding:10px 12px}}
|
||||||
.url.empty{{color:var(--muted);font-weight:400;font-style:normal}}
|
.url.empty{{color:var(--muted);font-weight:400;font-style:normal}}
|
||||||
@@ -1661,7 +1661,7 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
table{{width:100%;max-width:100%;border-collapse:collapse;
|
table{{width:100%;max-width:100%;border-collapse:collapse;
|
||||||
table-layout:fixed}}
|
table-layout:fixed}}
|
||||||
th,td{{padding:11px 14px;text-align:left;font-size:13px;
|
th,td{{padding:11px 14px;text-align:left;font-size:13px;
|
||||||
border-bottom:1px solid #21262d;vertical-align:middle;
|
border-bottom:1px solid #eaeef2;vertical-align:middle;
|
||||||
overflow-wrap:anywhere;min-width:0}}
|
overflow-wrap:anywhere;min-width:0}}
|
||||||
th{{background:var(--panel2);color:var(--dim);font-weight:500;
|
th{{background:var(--panel2);color:var(--dim);font-weight:500;
|
||||||
font-size:12px;white-space:nowrap}}
|
font-size:12px;white-space:nowrap}}
|
||||||
@@ -1677,16 +1677,16 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
.val{{min-width:0;overflow-wrap:anywhere;word-break:break-word}}
|
.val{{min-width:0;overflow-wrap:anywhere;word-break:break-word}}
|
||||||
td.empty{{text-align:center;padding:44px 20px;color:var(--dim)}}
|
td.empty{{text-align:center;padding:44px 20px;color:var(--dim)}}
|
||||||
td.empty .big{{font-size:15px;color:var(--fg);margin-bottom:6px;font-weight:500}}
|
td.empty .big{{font-size:15px;color:var(--fg);margin-bottom:6px;font-weight:500}}
|
||||||
code{{background:#21262d;padding:2px 8px;border-radius:6px;
|
code{{background:#eaeef2;padding:2px 8px;border-radius:6px;
|
||||||
letter-spacing:1.5px;font-family:ui-monospace,Consolas,monospace;
|
letter-spacing:1.5px;font-family:ui-monospace,Consolas,monospace;
|
||||||
font-size:13px;color:#79c0ff}}
|
font-size:13px;color:#0969da}}
|
||||||
.dot{{display:inline-block;width:7px;height:7px;border-radius:50%;
|
.dot{{display:inline-block;width:7px;height:7px;border-radius:50%;
|
||||||
margin-right:7px;vertical-align:middle;background:#484f58}}
|
margin-right:7px;vertical-align:middle;background:#484f58}}
|
||||||
.dot.on{{background:var(--ok);box-shadow:0 0 0 3px #3fb95022}}
|
.dot.on{{background:var(--ok);box-shadow:0 0 0 3px #1a7f3722}}
|
||||||
.badge{{font-size:11px;padding:2px 8px;border-radius:20px;
|
.badge{{font-size:11px;padding:2px 8px;border-radius:20px;
|
||||||
border:1px solid transparent;white-space:nowrap}}
|
border:1px solid transparent;white-space:nowrap}}
|
||||||
.badge.on{{color:var(--ok);background:#3fb9501a;border-color:#3fb95040}}
|
.badge.on{{color:var(--ok);background:#1a7f371a;border-color:#1a7f3740}}
|
||||||
.badge.off{{color:var(--muted);background:#6e76811a;border-color:#6e768140}}
|
.badge.off{{color:var(--muted);background:#8b949e1a;border-color:#8b949e40}}
|
||||||
.pickcell{{width:38px;text-align:center;padding-right:0}}
|
.pickcell{{width:38px;text-align:center;padding-right:0}}
|
||||||
input[type=checkbox]{{width:15px;height:15px;cursor:pointer;
|
input[type=checkbox]{{width:15px;height:15px;cursor:pointer;
|
||||||
accent-color:var(--accent);vertical-align:middle}}
|
accent-color:var(--accent);vertical-align:middle}}
|
||||||
@@ -1742,7 +1742,7 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
padding:0;min-width:0}}
|
padding:0;min-width:0}}
|
||||||
td.pickcell::before{{content:'';display:none}}
|
td.pickcell::before{{content:'';display:none}}
|
||||||
td.ops{{justify-content:flex-end;padding-top:10px;margin-top:4px;
|
td.ops{{justify-content:flex-end;padding-top:10px;margin-top:4px;
|
||||||
border-top:1px solid #21262d}}
|
border-top:1px solid #eaeef2}}
|
||||||
td.ops::before{{content:'';display:none}}
|
td.ops::before{{content:'';display:none}}
|
||||||
td.empty{{display:block;text-align:center}}
|
td.empty{{display:block;text-align:center}}
|
||||||
td.empty::before{{content:'';display:none}}
|
td.empty::before{{content:'';display:none}}
|
||||||
@@ -1971,13 +1971,13 @@ if (netBtn) netBtn.onclick = async () => {{
|
|||||||
const rows = [];
|
const rows = [];
|
||||||
if (j.tunnelMetrics) {{
|
if (j.tunnelMetrics) {{
|
||||||
const conns = j.tunnelConnections || 0;
|
const conns = j.tunnelConnections || 0;
|
||||||
const color = conns >= 2 ? '#3fb950'
|
const color = conns >= 2 ? '#1a7f37'
|
||||||
: (conns === 1 ? '#d29922' : '#f85149');
|
: (conns === 1 ? '#9a6700' : '#f85149');
|
||||||
rows.push('隧道连接数:<b style="color:' + color + '">' + conns
|
rows.push('隧道连接数:<b style="color:' + color + '">' + conns
|
||||||
+ '</b>' + (conns === 0 ? '(断了,看门狗会重启)' : ''));
|
+ '</b>' + (conns === 0 ? '(断了,看门狗会重启)' : ''));
|
||||||
rows.push('隧道累计请求:' + (j.tunnelRequests || 0));
|
rows.push('隧道累计请求:' + (j.tunnelRequests || 0));
|
||||||
}} else {{
|
}} else {{
|
||||||
rows.push('<span style="color:#d29922">读不到隧道指标'
|
rows.push('<span style="color:#9a6700">读不到隧道指标'
|
||||||
+ (j.tunnelError ? '(' + j.tunnelError + ')' : '') + '</span>');
|
+ (j.tunnelError ? '(' + j.tunnelError + ')' : '') + '</span>');
|
||||||
}}
|
}}
|
||||||
rows.push('登记设备:' + j.devices + '(在线 ' + j.online + ')');
|
rows.push('登记设备:' + j.devices + '(在线 ' + j.online + ')');
|
||||||
@@ -2017,7 +2017,7 @@ if (netBtn) netBtn.onclick = async () => {{
|
|||||||
const j = await r.json();
|
const j = await r.json();
|
||||||
const files = (j && j.files) || [];
|
const files = (j && j.files) || [];
|
||||||
if (!files.length) {{
|
if (!files.length) {{
|
||||||
body.innerHTML = '<span style="color:#8b949e">服务器上还没有成品。</span>';
|
body.innerHTML = '<span style="color:#656d76">服务器上还没有成品。</span>';
|
||||||
return;
|
return;
|
||||||
}}
|
}}
|
||||||
// 优先挑被控端整包;没有就挑第一个 zip;再没有就第一个
|
// 优先挑被控端整包;没有就挑第一个 zip;再没有就第一个
|
||||||
@@ -2031,10 +2031,10 @@ if (netBtn) netBtn.onclick = async () => {{
|
|||||||
+ 'background:#238636;color:#fff;text-decoration:none;'
|
+ 'background:#238636;color:#fff;text-decoration:none;'
|
||||||
+ 'font-weight:600;font-size:15px">'
|
+ 'font-weight:600;font-size:15px">'
|
||||||
+ '⬇ 下载 ' + pick.name + '</a>'
|
+ '⬇ 下载 ' + pick.name + '</a>'
|
||||||
+ '<div style="color:#6e7681;font-size:12px;margin-top:8px">'
|
+ '<div style="color:#8b949e;font-size:12px;margin-top:8px">'
|
||||||
+ mb + ' MB · 也可以去 '
|
+ mb + ' MB · 也可以去 '
|
||||||
+ '<a href="https://gitee.com/xmz7891/ykxmz/releases" target="_blank" '
|
+ '<a href="https://gitee.com/xmz7891/ykxmz/releases" target="_blank" '
|
||||||
+ 'rel="noopener" style="color:#79c0ff">Gitee 历史版本</a>'
|
+ 'rel="noopener" style="color:#0969da">Gitee 历史版本</a>'
|
||||||
+ '</div>';
|
+ '</div>';
|
||||||
}} catch (e) {{
|
}} catch (e) {{
|
||||||
body.innerHTML = '<span style="color:#f85149">读不到:' + e + '</span>';
|
body.innerHTML = '<span style="color:#f85149">读不到:' + e + '</span>';
|
||||||
|
|||||||
Reference in New Issue
Block a user