@hyprnos/dsh-remote-plugin 0.0.0-stage → 0.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/README.en.md +61 -0
  2. package/README.md +60 -2
  3. package/apk/dsh-remote.apk +0 -0
  4. package/approval-summary.mjs +115 -0
  5. package/client.js +197 -0
  6. package/cordis.patch.yml +5 -0
  7. package/doctor-skill.mjs +99 -0
  8. package/doctor-target.mjs +24 -0
  9. package/file-delivery.mjs +84 -0
  10. package/gateway-stats.cjs +501 -0
  11. package/gateway.cjs +8451 -0
  12. package/index.mjs +1788 -0
  13. package/insights.mjs +111 -0
  14. package/market.mjs +86 -0
  15. package/package.json +73 -4
  16. package/peak-reminders.mjs +50 -0
  17. package/plugin-center.mjs +777 -0
  18. package/plugin-transaction.mjs +300 -0
  19. package/public/activity.js +188 -0
  20. package/public/admin.html +820 -0
  21. package/public/admin.js +1167 -0
  22. package/public/announcement-forms.js +89 -0
  23. package/public/announcements.json +464 -0
  24. package/public/app.js +8826 -0
  25. package/public/approval-records.js +301 -0
  26. package/public/approval-summary.js +78 -0
  27. package/public/build.json +5 -0
  28. package/public/cache-upgrade.js +51 -0
  29. package/public/chat-copy.js +59 -0
  30. package/public/chat-files.js +87 -0
  31. package/public/desktop/desktop.css +816 -0
  32. package/public/desktop/desktop.html +871 -0
  33. package/public/desktop/desktop.js +4548 -0
  34. package/public/desktop/i18n.js +85 -0
  35. package/public/diagnostics.js +203 -0
  36. package/public/doctor-entry.js +94 -0
  37. package/public/doctor.css +205 -0
  38. package/public/doctor.js +769 -0
  39. package/public/donate.png +0 -0
  40. package/public/e2ee-transport.js +219 -0
  41. package/public/extensions.css +109 -0
  42. package/public/extensions.js +215 -0
  43. package/public/file-inbox.css +66 -0
  44. package/public/file-inbox.js +289 -0
  45. package/public/genui.css +8 -0
  46. package/public/genui.js +254 -0
  47. package/public/history.js +304 -0
  48. package/public/i18n.js +57 -0
  49. package/public/icon.svg +12 -0
  50. package/public/image-cache.js +141 -0
  51. package/public/image-preview.js +290 -0
  52. package/public/index.html +1568 -0
  53. package/public/insights.css +28 -0
  54. package/public/insights.js +290 -0
  55. package/public/jsqr.min.js +10104 -0
  56. package/public/lan-discovery.js +94 -0
  57. package/public/link-check.js +109 -0
  58. package/public/manifest.webmanifest +16 -0
  59. package/public/md.js +333 -0
  60. package/public/morphicons-init.js +41 -0
  61. package/public/motion.js +557 -0
  62. package/public/network.js +100 -0
  63. package/public/onboarding.css +36 -0
  64. package/public/onboarding.js +253 -0
  65. package/public/operations.js +141 -0
  66. package/public/permission-presets.js +159 -0
  67. package/public/plugin-center.css +120 -0
  68. package/public/plugin-center.js +666 -0
  69. package/public/plugin-icon.svg +5 -0
  70. package/public/plugin.html +68 -0
  71. package/public/plugin.js +211 -0
  72. package/public/qrcode.min.js +2297 -0
  73. package/public/relay-autopair.js +251 -0
  74. package/public/relay-devices.js +80 -0
  75. package/public/relay-settings.css +24 -0
  76. package/public/relay-settings.js +194 -0
  77. package/public/remote-state.js +27 -0
  78. package/public/remote-ui.css +148 -0
  79. package/public/remote-ui.js +243 -0
  80. package/public/session-deck.css +79 -0
  81. package/public/session-deck.js +180 -0
  82. package/public/session-presets.js +47 -0
  83. package/public/setup.css +18 -0
  84. package/public/setup.js +213 -0
  85. package/public/sha256.js +119 -0
  86. package/public/skills.css +81 -0
  87. package/public/skills.js +202 -0
  88. package/public/skins/blue-fish/DESIGN.md +24 -0
  89. package/public/skins/blue-fish/face.png +0 -0
  90. package/public/skins/blue-fish/icon-blush.png +0 -0
  91. package/public/skins/blue-fish/icon-sleep.png +0 -0
  92. package/public/skins/blue-fish/icon-smile.png +0 -0
  93. package/public/skins/blue-fish/icon-star.png +0 -0
  94. package/public/skins/blue-fish/icon-wink.png +0 -0
  95. package/public/skins/blue-fish/icon.png +0 -0
  96. package/public/skins/blue-fish/mascot.png +0 -0
  97. package/public/skins/blue-fish/pattern.png +0 -0
  98. package/public/skins/blue-fish/preview.html +12 -0
  99. package/public/skins/blue-fish/skin.css +122 -0
  100. package/public/skins/blue-fish/sparkles.svg +18 -0
  101. package/public/skins/bocchi/DESIGN.md +99 -0
  102. package/public/skins/bocchi/face.png +0 -0
  103. package/public/skins/bocchi/grain.png +0 -0
  104. package/public/skins/bocchi/icon-blush.png +0 -0
  105. package/public/skins/bocchi/icon-sleep.png +0 -0
  106. package/public/skins/bocchi/icon-smile.png +0 -0
  107. package/public/skins/bocchi/icon-star.png +0 -0
  108. package/public/skins/bocchi/icon-wink.png +0 -0
  109. package/public/skins/bocchi/icon.png +0 -0
  110. package/public/skins/bocchi/pattern-soft.png +0 -0
  111. package/public/skins/bocchi/pattern.png +0 -0
  112. package/public/skins/bocchi/preview.html +55 -0
  113. package/public/skins/bocchi/skin.css +233 -0
  114. package/public/skins/bocchi/stage-bg.png +0 -0
  115. package/public/skins/bocchi/stage-soft.png +0 -0
  116. package/public/skins/bocchi/stand.png +0 -0
  117. package/public/skins/bocchi/sticker-guitar.png +0 -0
  118. package/public/skins/kessoku/DESIGN.md +38 -0
  119. package/public/skins/kessoku/grain.png +0 -0
  120. package/public/skins/kessoku/skin.css +212 -0
  121. package/public/skins/kita/SOURCES.json +51 -0
  122. package/public/skins/kita/face.png +0 -0
  123. package/public/skins/kita/icon-live.png +0 -0
  124. package/public/skins/kita/icon-reddress.png +0 -0
  125. package/public/skins/kita/icon-seifuku.png +0 -0
  126. package/public/skins/kita/pattern.png +0 -0
  127. package/public/skins/kita/preview.html +56 -0
  128. package/public/skins/kita/skin.css +26 -0
  129. package/public/skins/kita/stand.png +0 -0
  130. package/public/skins/kita/sticker-live.png +0 -0
  131. package/public/skins/nijika/SOURCES.json +51 -0
  132. package/public/skins/nijika/face.png +0 -0
  133. package/public/skins/nijika/icon-live.png +0 -0
  134. package/public/skins/nijika/icon-reddress.png +0 -0
  135. package/public/skins/nijika/icon-seifuku.png +0 -0
  136. package/public/skins/nijika/pattern.png +0 -0
  137. package/public/skins/nijika/preview.html +56 -0
  138. package/public/skins/nijika/skin.css +25 -0
  139. package/public/skins/nijika/stand.png +0 -0
  140. package/public/skins/nijika/sticker-live.png +0 -0
  141. package/public/skins/penguin/DESIGN.md +33 -0
  142. package/public/skins/penguin/SOURCES.json +22 -0
  143. package/public/skins/penguin/aic-blueprint.svg +24 -0
  144. package/public/skins/penguin/endfield-triangles.svg +4 -0
  145. package/public/skins/penguin/face.png +0 -0
  146. package/public/skins/penguin/icon-blush.png +0 -0
  147. package/public/skins/penguin/icon-dizzy.png +0 -0
  148. package/public/skins/penguin/icon-laugh.png +0 -0
  149. package/public/skins/penguin/icon-sleep.png +0 -0
  150. package/public/skins/penguin/icon-smile.png +0 -0
  151. package/public/skins/penguin/icon-star.png +0 -0
  152. package/public/skins/penguin/icon-wink.png +0 -0
  153. package/public/skins/penguin/icon.png +0 -0
  154. package/public/skins/penguin/mascot.png +0 -0
  155. package/public/skins/penguin/pattern-night.png +0 -0
  156. package/public/skins/penguin/pattern.png +0 -0
  157. package/public/skins/penguin/preview.html +12 -0
  158. package/public/skins/penguin/skin.css +212 -0
  159. package/public/skins/ryo/SOURCES.json +51 -0
  160. package/public/skins/ryo/face.png +0 -0
  161. package/public/skins/ryo/icon-live.png +0 -0
  162. package/public/skins/ryo/icon-reddress.png +0 -0
  163. package/public/skins/ryo/icon-seifuku.png +0 -0
  164. package/public/skins/ryo/pattern.png +0 -0
  165. package/public/skins/ryo/preview.html +56 -0
  166. package/public/skins/ryo/skin.css +25 -0
  167. package/public/skins/ryo/stand.png +0 -0
  168. package/public/skins/ryo/sticker-live.png +0 -0
  169. package/public/sponsor-entry.js +21 -0
  170. package/public/styles.css +1526 -0
  171. package/public/subagents.css +61 -0
  172. package/public/subagents.js +275 -0
  173. package/public/task-board.js +109 -0
  174. package/public/teams.js +98 -0
  175. package/public/theme-picker.css +58 -0
  176. package/public/theme-vars.css +1044 -0
  177. package/public/theme.js +166 -0
  178. package/public/transcribe-core.js +74 -0
  179. package/public/turn-results.js +121 -0
  180. package/public/update.json +49 -0
  181. package/public/vendor/gsap/NOTICE.md +10 -0
  182. package/public/vendor/gsap/gsap.min.js +11 -0
  183. package/public/vendor/morphicons/LICENSE +21 -0
  184. package/public/vendor/morphicons/README.md +10 -0
  185. package/public/vendor/morphicons/controller-CXZuwJ_M.js +152 -0
  186. package/public/vendor/morphicons/dom.js +206 -0
  187. package/public/vendor/morphicons/element.js +261 -0
  188. package/public/vendor/morphicons/normalize-CYnN3Npw.js +540 -0
  189. package/public/vendor/morphicons/spring-CFHloqPP.js +623 -0
  190. package/public/version.json +3 -0
  191. package/public/voice-input.js +1151 -0
  192. package/public/workflow.css +365 -0
  193. package/public/workflow.js +419 -0
  194. package/session-file.mjs +39 -0
  195. package/skills/dsh-remote-doctor/SKILL.md +186 -0
  196. package/skills/dsh-remote-doctor/references/wiki/README.md +40 -0
  197. package/skills/dsh-remote-doctor/references/wiki/ai-guide.md +61 -0
  198. package/skills/dsh-remote-doctor/references/wiki/connection.md +76 -0
  199. package/skills/dsh-remote-doctor/references/wiki/errors.md +26 -0
  200. package/skills/dsh-remote-doctor/references/wiki/evidence.md +44 -0
  201. package/skills/dsh-remote-doctor/references/wiki/files.md +31 -0
  202. package/skills/dsh-remote-doctor/references/wiki/maintenance.md +30 -0
  203. package/skills/dsh-remote-doctor/references/wiki/notifications.md +33 -0
  204. package/skills/dsh-remote-doctor/references/wiki/operations.md +32 -0
  205. package/skills/dsh-remote-doctor/references/wiki/plugins.md +90 -0
  206. package/skills/dsh-remote-doctor/references/wiki/sessions.md +45 -0
  207. package/skills/dsh-remote-doctor/references/wiki/sources.md +27 -0
  208. package/skills.mjs +53 -0
  209. package/speech-whisper.mjs +705 -0
  210. package/task-board.mjs +57 -0
  211. package/teams.mjs +58 -0
@@ -0,0 +1,820 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta name="dsh-remote-build" content="f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
7
+ <meta name="theme-color" content="#0D1117">
8
+ <title>DSH Remote · 管理</title>
9
+ <script>/* 首帧前应用皮肤 */ (function(){try{var t=localStorage.getItem('dshTheme');if(t!=='default'&&t!=='dark'&&t!=='light'&&t!=='neutral'&&t!=='mono'&&t!=='fish'&&t!=='penguin'&&t!=='penguin-night'&&t!=='bocchi'&&t!=='nijika'&&t!=='ryo'&&t!=='kita'){t='fish'}}catch(e){t='fish'}document.documentElement.setAttribute('data-theme',t)})()</script>
10
+ <link rel="stylesheet" href="../styles.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
11
+ <link rel="stylesheet" href="../relay-settings.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
12
+ <link rel="stylesheet" href="../insights.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
13
+ <link rel="stylesheet" href="../setup.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
14
+ <link rel="stylesheet" href="../doctor.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
15
+ <link rel="stylesheet" href="../skins/blue-fish/skin.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
16
+ <link rel="stylesheet" href="../skins/penguin/skin.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
17
+ <link rel="stylesheet" href="../skins/bocchi/skin.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
18
+ <link rel="stylesheet" href="../skins/kessoku/skin.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
19
+ <link rel="stylesheet" href="../skins/nijika/skin.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
20
+ <link rel="stylesheet" href="../skins/ryo/skin.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
21
+ <link rel="stylesheet" href="../skins/kita/skin.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
22
+ <style>
23
+ .admin-wrap { max-width: 1180px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px 40px; }
24
+ .admin-title {
25
+ position: sticky; top: 0; z-index: 40;
26
+ display: flex; align-items: center; justify-content: space-between; gap: 8px;
27
+ margin-bottom: 14px; padding: 10px 0;
28
+ background: var(--dsr-bg); /* 实色背景: 滚动时内容不穿透, 不用毛玻璃(小米/MIUI WebView 图层丢花屏) */
29
+ backdrop-filter: none;
30
+ }
31
+ .admin-title h1 { font-size: 20px; margin: 0; white-space: nowrap; }
32
+ .login-card { background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: var(--dsr-radius); padding: 16px; display: flex; gap: 8px; }
33
+ .login-card input { flex: 1; background: var(--dsr-bg); color: var(--dsr-text); border: 1px solid var(--dsr-line); border-radius: 10px; padding: 10px 12px; font: inherit; outline: none; }
34
+ .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-bottom: 14px; }
35
+ .stat-card { background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: var(--dsr-radius); padding: 12px 14px; }
36
+ .stat-card .v { font-size: 20px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
37
+ .stat-card .k { font-size: 11px; color: var(--dsr-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
38
+ .stat-card.ok .v { color: var(--dsr-success); } .stat-card.warn .v { color: var(--dsr-warning); }
39
+ .stats-dash { margin-bottom: 14px; }
40
+ .stats-dash .stat-grid { margin-bottom: 8px; }
41
+ .stats-chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding: 12px 14px 10px; background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: var(--dsr-radius); overflow-x: auto; overflow-y: hidden; }
42
+ .stats-legend { display: flex; gap: 12px; font-size: 11px; color: var(--dsr-muted); margin: 6px 2px 0; }
43
+ .stats-legend .lg { display: inline-flex; align-items: center; gap: 4px; }
44
+ .stats-legend .sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
45
+ .stats-legend .sw.peak { background: var(--dsr-accent-strong); }
46
+ .stats-legend .sw.off { background: var(--dsr-accent-2); }
47
+ .bucket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; margin-top: 6px; }
48
+ .bucket-grid .b { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11px; min-width: 0; }
49
+ .bucket-grid .b .n { color: var(--dsr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
50
+ .bucket-grid .b .t { font-weight: 600; white-space: nowrap; }
51
+ .stats-bar { flex: 1; min-width: 38px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; }
52
+ .stats-bar .bars { width: 100%; max-width: 46px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 6px 6px 0 0; overflow: hidden; background: var(--dsr-accent-soft); }
53
+ .stats-bar .seg { width: 100%; }
54
+ .stats-bar .seg.peak { background: var(--dsr-accent-strong); }
55
+ .stats-bar .seg.off { background: var(--dsr-accent-2); }
56
+ .stats-bar .lbl { font-size: 10px; color: var(--dsr-muted); white-space: nowrap; }
57
+ .stats-bar .val { font-size: 10px; color: var(--dsr-text); white-space: nowrap; }
58
+ .stats-empty { color: var(--dsr-muted); text-align: center; padding: 20px 0; font-size: 12px; }
59
+ .stats-note { color: var(--dsr-muted); font-size: 11px; line-height: 1.6; margin-top: 8px; }
60
+ .table-wrap { background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: var(--dsr-radius); overflow-x: auto; }
61
+ table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 0; }
62
+ th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--dsr-line); vertical-align: top; }
63
+ th { font-size: 11px; color: var(--dsr-muted); letter-spacing: .5px; white-space: nowrap; }
64
+ tr:last-child td { border-bottom: none; }
65
+ .badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--dsr-line); color: var(--dsr-muted); white-space: nowrap; }
66
+ .badge.app { color: var(--dsr-accent-strong); border-color: var(--dsr-accent-line); background: var(--dsr-accent-soft); }
67
+ .badge.admin { color: var(--dsr-accent-2); border-color: var(--dsr-accent-2-line); background: var(--dsr-accent-2-soft); }
68
+ .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dsr-line); margin-right: 5px; }
69
+ .dot.on { background: var(--dsr-success); box-shadow: 0 0 6px var(--dsr-success-line); }
70
+ .dot.off { background: var(--dsr-warning); }
71
+ .mono { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
72
+ .nowrap { white-space: nowrap; }
73
+ .ua { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsr-muted); }
74
+ /* 宽屏: 固定列宽让表格铺满容器, 名称列吸收剩余宽度, 消除临界横向滚动条 */
75
+ @media (min-width: 1000px) {
76
+ table { table-layout: fixed; }
77
+ th:nth-child(1) { width: 80px; }
78
+ th:nth-child(2) { width: 180px; }
79
+ th:nth-child(3) { width: 88px; }
80
+ th:nth-child(4) { width: 120px; }
81
+ th:nth-child(5) { width: 84px; }
82
+ th:nth-child(6) { width: 56px; }
83
+ th:nth-child(7) { width: 110px; }
84
+ th:nth-child(8) { width: 280px; }
85
+ th:nth-child(9) { width: 72px; }
86
+ td:nth-child(2) { white-space: nowrap; }
87
+ td:nth-child(2) b { display: inline-block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
88
+ tbody tr:hover { background: var(--dsr-accent-soft); }
89
+ }
90
+ .token-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 10px 0 14px; }
91
+ .token-row code { flex: none; width: 100%; background: var(--dsr-bg); border: 1px solid var(--dsr-line); border-radius: 8px; padding: 8px 10px; font-size: 12px; white-space: nowrap; overflow-x: auto; }
92
+ .token-actions { display: flex; gap: 8px; flex-wrap: wrap; }
93
+ .token-actions .mini-btn { flex: 1 1 auto; text-align: center; padding: 6px 8px; font-size: 12.5px; }
94
+ .device-key-card { margin: 0 0 14px; }
95
+ .device-key-toggle { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 13px; border:1px solid var(--dsr-line); border-radius:16px; background:var(--dsr-panel); }
96
+ .device-key-toggle-copy { min-width:0; }
97
+ .device-key-toggle-title { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:750; }
98
+ .device-key-toggle-desc { margin-top:3px; color:var(--dsr-muted); font-size:11px; line-height:1.45; }
99
+ .device-key-toggle-actions { display:flex; align-items:center; gap:8px; flex:none; }
100
+ .device-key-switch { position:relative; width:42px; height:24px; flex:none; }
101
+ .device-key-switch input { position:absolute; opacity:0; pointer-events:none; }
102
+ .device-key-switch span { position:absolute; inset:0; border:1px solid var(--dsr-line); border-radius:999px; background:var(--dsr-bg-2); cursor:pointer; transition:background-color .18s ease,border-color .18s ease; }
103
+ .device-key-switch span::after { content:''; position:absolute; width:18px; height:18px; left:2px; top:2px; border-radius:50%; background:var(--dsr-muted); transition:transform .18s ease,background-color .18s ease; }
104
+ .device-key-switch input:checked + span { border-color:var(--dsr-accent-line); background:var(--dsr-accent-soft); }
105
+ .device-key-switch input:checked + span::after { transform:translateX(18px); background:var(--dsr-accent-strong); }
106
+ .device-key-switch input:focus-visible + span { outline:2px solid var(--dsr-accent-strong); outline-offset:2px; }
107
+ .device-key-panel { margin-top:10px; border:1px solid var(--dsr-line); border-radius:16px; overflow:hidden; background:var(--dsr-panel); }
108
+ .device-key-grid { display:grid; grid-template-columns:minmax(120px,.8fr) minmax(110px,.65fr) minmax(190px,1.4fr) auto; gap:10px; align-items:center; padding:10px 12px; }
109
+ .device-key-grid + .device-key-grid { border-top:1px solid var(--dsr-line); }
110
+ .device-key-grid.head { color:var(--dsr-muted); background:var(--dsr-bg-2); font-size:11px; font-weight:750; }
111
+ .device-key-grid code { display:block; min-width:0; overflow-x:auto; white-space:nowrap; padding:7px 9px; border:1px solid var(--dsr-line); border-radius:8px; background:var(--dsr-bg); font-size:11px; }
112
+ .device-key-note { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
113
+ .device-key-note button { margin-left:5px; padding:1px 6px; }
114
+ .device-key-actions { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
115
+ .device-key-actions .mini-btn { padding:5px 7px; font-size:11px; }
116
+ .device-key-ip { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:11px; white-space:nowrap; }
117
+ .device-key-empty { padding:16px; color:var(--dsr-muted); font-size:12px; text-align:center; }
118
+ .gateway-port-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 12px; background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: var(--dsr-radius); }
119
+ .gateway-port-row label { font-size: 12px; color: var(--dsr-muted); flex: none; }
120
+ .gateway-port-row input { width: 92px; background: var(--dsr-bg); color: var(--dsr-text); border: 1px solid var(--dsr-line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; outline: none; }
121
+ .gateway-port-row .muted { font-size: 12px; }
122
+ .gateway-port-row .mini-btn { margin-left: auto; }
123
+ .host-ip-card { margin: 0 0 14px; padding: 18px; background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: var(--dsr-radius); }
124
+ .host-ip-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
125
+ .host-ip-title { font-size: 16px; font-weight: 750; }
126
+ .host-ip-head .muted { margin-top: 4px; font-size: 12px; }
127
+ .host-ip-badge { flex: none; padding: 5px 9px; border: 1px solid var(--dsr-accent-line); border-radius: 999px; color: var(--dsr-accent-strong); background: var(--dsr-accent-soft); font-size: 11px; font-weight: 700; }
128
+ .host-ip-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
129
+ .host-ip-remove { margin-left: 8px; padding: 3px 7px; }
130
+ .host-ip-desc { margin: 12px 0; color: var(--dsr-muted); font-size: 12px; line-height: 1.55; }
131
+ .host-ip-table-wrap { overflow: hidden; border: 1px solid var(--dsr-line); border-radius: 13px; }
132
+ .host-ip-table { width: 100%; border-collapse: collapse; }
133
+ .host-ip-table th, .host-ip-table td { padding: 10px 12px; border-bottom: 1px solid var(--dsr-divider); text-align: left; font-size: 12px; }
134
+ .host-ip-table th { color: var(--dsr-muted); background: var(--dsr-bg-2); font-size: 11px; font-weight: 750; }
135
+ .host-ip-table tr:last-child td { border-bottom: none; }
136
+ .host-ip-toggle { width: 74px; }
137
+ .host-ip-value { font-size: 13px !important; }
138
+ .host-ip-use { color: var(--dsr-muted); }
139
+ .host-ip-switch { position: relative; display: inline-block; width: 38px; height: 22px; vertical-align: middle; }
140
+ .host-ip-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
141
+ .host-ip-switch span { position: absolute; inset: 0; border: 1px solid var(--dsr-line); border-radius: 999px; background: var(--dsr-bg-2); cursor: pointer; transition: background-color .18s ease, border-color .18s ease; }
142
+ .host-ip-switch span::after { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: var(--dsr-muted); transition: transform .18s ease, background-color .18s ease; }
143
+ .host-ip-switch input:checked + span { border-color: var(--dsr-accent-line); background: var(--dsr-accent-soft); }
144
+ .host-ip-switch input:checked + span::after { transform: translateX(16px); background: var(--dsr-accent-strong); }
145
+ .host-ip-switch input:focus-visible + span { outline: 2px solid var(--dsr-accent-strong); outline-offset: 2px; }
146
+ .host-ip-empty { padding: 18px; color: var(--dsr-muted); text-align: center; font-size: 12px; }
147
+ .conn-badge { white-space: nowrap; }
148
+ #btn-close-drawer { white-space: nowrap; }
149
+ @media (max-width: 720px) {
150
+ .admin-title h1 { font-size: 16px; }
151
+ .admin-title .right { gap: 6px; }
152
+ #btn-close-drawer span { display: none; }
153
+ #btn-close-drawer { padding: 5px 9px; }
154
+ #btn-console span { display: none; }
155
+ #btn-console { padding: 5px 9px; }
156
+ .conn-badge { padding: 3px 7px; }
157
+ }
158
+ @media (max-width: 760px) {
159
+ .table-wrap { overflow: visible; background: transparent; border: none; }
160
+ .table-wrap table { min-width: 0; }
161
+ .table-wrap thead { display: none; }
162
+ .table-wrap tbody { display: flex; flex-direction: column; gap: 8px; }
163
+ .table-wrap tr { display: block; background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: 12px; padding: 10px 12px; }
164
+ .table-wrap tr:last-child td { border-bottom: none; }
165
+ .table-wrap td { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--dsr-divider); }
166
+ .table-wrap td:last-child { border-bottom: none; }
167
+ .table-wrap td[data-label]::before { content: attr(data-label); min-width: 64px; font-size: 11px; color: var(--dsr-muted); flex: none; }
168
+ .table-wrap td.ua { display: none; }
169
+ .table-wrap td.act { justify-content: flex-end; }
170
+ .table-wrap td .mini-btn { margin-left: auto; }
171
+ }
172
+ .pair-box { background: var(--dsr-panel); border: 1px solid var(--dsr-line); border-radius: var(--dsr-radius); padding: 14px; margin-bottom: 14px; text-align: center; }
173
+ .pair-box .pair-title { font-weight: 600; margin-bottom: 8px; }
174
+ .pair-qr { display: inline-block; background: #fff; border-radius: 8px; padding: 6px; line-height: 0; }
175
+ .pair-qr svg { display: block; width: 180px; height: 180px; }
176
+ .pair-box .muted { margin-top: 8px; font-size: 12px; }
177
+ .empty { text-align: center; color: var(--dsr-muted); padding: 30px 0; }
178
+ .empty-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
179
+ a.mini-btn { text-decoration: none; display: inline-flex; align-items: center; }
180
+ .gh-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--dsr-text); }
181
+ .gh-btn svg { width: 16px; height: 16px; fill: currentColor; }
182
+ .admin-title .left { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
183
+ .admin-title .right { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; justify-content: flex-end; }
184
+ /* 顶栏按钮统一高度/基线: GitHub / 反馈 / 主题 / 语言 / 连接徽章 */
185
+ .tb-btn {
186
+ height: 36px; box-sizing: border-box; max-width: 100%;
187
+ display: inline-flex; align-items: center; justify-content: center;
188
+ padding: 0 12px; line-height: 1; vertical-align: middle;
189
+ flex-shrink: 0; white-space: nowrap;
190
+ }
191
+ .tb-btn svg { flex-shrink: 0; }
192
+ .conn-badge.tb-btn { border-radius: 999px; font-size: 12px; }
193
+ .fb-wrap { position: relative; flex-shrink: 0; }
194
+ .fb-btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
195
+ .fb-btn svg { width: 17px; height: 17px; }
196
+ .fb-menu {
197
+ position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
198
+ width: 248px; background: var(--dsr-bg-2); border: 1px solid var(--dsr-line); border-radius: 14px;
199
+ box-shadow: 0 12px 34px var(--dsr-shadow); padding: 6px;
200
+ display: flex; flex-direction: column; gap: 2px;
201
+ }
202
+ .fb-item {
203
+ min-height: 44px; display: flex; align-items: center; gap: 10px;
204
+ padding: 7px 8px; border-radius: 10px; border: none; background: transparent; color: var(--dsr-text);
205
+ font: inherit; font-size: 13px; text-align: left; cursor: pointer; text-decoration: none;
206
+ }
207
+ .fb-item:hover, .fb-item:focus-visible { background: var(--dsr-bg); }
208
+ .fb-item.primary { background: var(--dsr-accent-soft); border: 1px solid var(--dsr-accent-line); }
209
+ .fb-ico {
210
+ width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
211
+ display: grid; place-items: center; background: var(--dsr-panel); border: 1px solid var(--dsr-line); color: var(--dsr-accent-strong);
212
+ }
213
+ .fb-item.primary .fb-ico { background: var(--dsr-accent-strong); border-color: var(--dsr-accent-strong); color: var(--dsr-on-accent); }
214
+ .fb-ico svg { width: 16px; height: 16px; fill: currentColor; }
215
+ .fb-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
216
+ .fb-name { font-weight: 600; }
217
+ .fb-desc { font-size: 11px; color: var(--dsr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
218
+ /* 窄屏压缩顶栏: 图标化文字按钮, 保证全部按钮完整可见 */
219
+ @media (max-width: 900px) {
220
+ .gh-label, .t-label { display: none; }
221
+ .tb-btn { padding: 0 10px; }
222
+ .admin-title .right { gap: 6px; }
223
+ .admin-title .left { gap: 6px; }
224
+ }
225
+ @media (max-width: 720px) {
226
+ #btn-console span, #btn-close-drawer span { display: none; }
227
+ #btn-console, #btn-close-drawer { padding: 0 9px; }
228
+ .admin-title h1 { font-size: 17px; }
229
+ }
230
+ @media (max-width: 440px) {
231
+ .admin-title h1 { display: none; }
232
+ .admin-title .right { gap: 4px; }
233
+ .tb-btn { padding: 0 8px; }
234
+ }
235
+ .login-card input:focus-visible, .gateway-port-row input:focus-visible {
236
+ outline: 2px solid var(--dsr-accent);
237
+ outline-offset: 2px;
238
+ }
239
+ @media (prefers-reduced-motion: reduce) {
240
+ *, *::before, *::after {
241
+ animation-duration: .01ms !important;
242
+ animation-iteration-count: 1 !important;
243
+ transition-duration: .01ms !important;
244
+ }
245
+ }
246
+
247
+ /* 控制台面板:减少整面纯色,建立“工具台”层次 */
248
+ html, body { font-family: system-ui, -apple-system, "PingFang SC", "Noto Sans CJK SC", sans-serif; text-rendering: optimizeLegibility; }
249
+ body { background: radial-gradient(900px 520px at 92% -12%, var(--dsr-accent-soft), transparent 68%), linear-gradient(180deg, var(--dsr-bg), var(--dsr-bg-2)); }
250
+ .admin-wrap { max-width: 1320px; padding: calc(env(safe-area-inset-top, 0px) + 18px) clamp(14px, 3vw, 30px) 48px; }
251
+ .admin-title { margin-bottom: 18px; padding: 12px 14px; border: 1px solid var(--dsr-line); border-radius: 18px; background: linear-gradient(135deg, var(--dsr-panel), var(--dsr-bg-2)); box-shadow: 0 14px 36px var(--dsr-shadow); backdrop-filter: blur(16px); }
252
+ .admin-title h1 { font-size: 21px; letter-spacing: -.2px; }
253
+ .admin-title .left, .admin-title .right { gap: 7px; }
254
+ .tb-btn { border-radius: 11px; background: linear-gradient(135deg, var(--dsr-panel-2), var(--dsr-bg-2)); border-color: var(--dsr-line); transition: transform .18s ease, border-color .18s ease, background .18s ease; }
255
+ .tb-btn:hover { transform: translateY(-1px); border-color: var(--dsr-accent-line); background: var(--dsr-accent-soft); }
256
+ .tb-btn svg { width: 17px; height: 17px; }
257
+ .login-card, .stat-card, .stats-chart, .table-wrap, .gateway-port-row, .host-ip-card, .pair-box { background: linear-gradient(145deg, var(--dsr-panel), var(--dsr-bg-2)); border-color: var(--dsr-line); border-radius: 18px; box-shadow: 0 12px 30px var(--dsr-shadow); }
258
+ .login-card { padding: 18px; }
259
+ .stat-grid { gap: 12px; }
260
+ .stat-card { padding: 15px 16px; box-shadow: inset 0 1px var(--dsr-divider), 0 10px 26px var(--dsr-shadow); }
261
+ .stat-card .v { font-size: 24px; font-variant-numeric: tabular-nums; }
262
+ .stats-dash { margin-top: 4px; }
263
+ .stats-chart { height: 210px; padding: 16px 18px 12px; }
264
+ .stats-bar .bars { border-radius: 9px 9px 3px 3px; box-shadow: 0 0 16px var(--dsr-glow); }
265
+ .section-head { margin: 18px 2px 9px; font-weight: 750; letter-spacing: .2px; }
266
+ .token-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px; margin: 0 0 14px; border: 1px solid var(--dsr-line); border-radius: 18px; background: linear-gradient(145deg, var(--dsr-panel), var(--dsr-bg-2)); box-shadow: 0 10px 28px var(--dsr-shadow); }
267
+ .token-row code { width: auto; min-width: 0; padding: 10px 12px; border-radius: 11px; background: var(--dsr-bg); border-color: var(--dsr-line); }
268
+ .token-actions { justify-content: flex-end; }
269
+ .token-actions .mini-btn { flex: 0 0 auto; border-radius: 10px; }
270
+ .gateway-port-row { padding: 12px 14px; }
271
+ .table-wrap { overflow: hidden; }
272
+ th, td { border-bottom-color: var(--dsr-divider); }
273
+ tbody tr { transition: background .18s ease; }
274
+ .pair-box { padding: 18px; }
275
+ .admin-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; padding:20px; margin:0 0 16px; border:1px solid var(--dsr-accent-line); border-radius:20px; background:linear-gradient(135deg, var(--dsr-panel-2), var(--dsr-bg-2)); box-shadow:0 16px 34px var(--dsr-shadow); }
276
+ .admin-hero-copy { min-width:0; }
277
+ .admin-eyebrow { color:var(--dsr-accent-strong); font-size:10px; font-weight:800; letter-spacing:1.6px; }
278
+ .admin-hero h2 { margin:7px 0 4px; font-size:26px; line-height:1.15; letter-spacing:-.5px; }
279
+ .admin-hero p { margin:0; color:var(--dsr-muted); font-size:12px; }
280
+ .admin-hero-side { display:flex; flex-direction:column; align-items:flex-end; gap:10px; flex:none; }
281
+ .admin-hero-status { color:var(--dsr-success); font-size:12px; font-weight:700; }
282
+ .admin-hero.attention { border-color:var(--dsr-warning-line); }
283
+ .admin-hero.attention .admin-hero-status { color:var(--dsr-warning); }
284
+ .admin-hero.plugin, .admin-hero.offline { border-color:var(--dsr-line); }
285
+ .admin-hero.plugin .admin-hero-status, .admin-hero.offline .admin-hero-status { color:var(--dsr-muted); }
286
+ .admin-hero-action { min-height:36px; padding:7px 13px; border-color:var(--dsr-accent-strong); background:var(--dsr-accent-strong); color:var(--dsr-on-accent); font-weight:700; }
287
+ .admin-hero.plugin .admin-hero-action { border-color:var(--dsr-accent-strong); background:var(--dsr-accent-strong); }
288
+ .admin-hero.offline .admin-hero-action { border-color:var(--dsr-accent-line); background:var(--dsr-accent-soft); color:var(--dsr-accent-strong); }
289
+ .doctor-card { margin:0 0 16px; border:1px solid var(--dsr-line); border-radius:20px; background:linear-gradient(145deg,var(--dsr-panel),var(--dsr-bg-2)); box-shadow:0 12px 30px var(--dsr-shadow); overflow:hidden; }
290
+ .doctor-head { width:100%; display:flex; align-items:center; gap:12px; padding:14px 16px; border:0; background:transparent; color:var(--dsr-text); text-align:left; cursor:pointer; font:inherit; }
291
+ .doctor-head:focus-visible { outline:2px solid var(--dsr-accent-strong); outline-offset:-3px; }
292
+ .doctor-title { min-width:0; flex:1; }
293
+ .doctor-title strong { display:block; font-size:14px; }
294
+ .doctor-title span { display:block; margin-top:3px; color:var(--dsr-muted); font-size:11px; line-height:1.45; }
295
+ .doctor-progress { flex:none; padding:4px 9px; border:1px solid var(--dsr-accent-line); border-radius:999px; color:var(--dsr-accent-strong); background:var(--dsr-accent-soft); font-size:11px; font-weight:750; }
296
+ .doctor-chevron { flex:none; color:var(--dsr-muted); transition:transform .18s ease; }
297
+ .doctor-card.expanded .doctor-chevron { transform:rotate(180deg); }
298
+ .doctor-body { display:none; padding:0 16px 16px; }
299
+ .doctor-card.expanded .doctor-body { display:block; }
300
+ .doctor-summary { margin:0 0 10px; padding:9px 11px; border-radius:11px; color:var(--dsr-muted); background:var(--dsr-bg); font-size:12px; line-height:1.5; }
301
+ .doctor-summary.ok { color:var(--dsr-success); background:var(--dsr-success-soft); }
302
+ .doctor-steps { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
303
+ .doctor-step { display:grid; grid-template-columns:24px minmax(0,1fr) auto; gap:9px; align-items:start; padding:11px; border:1px solid var(--dsr-line); border-radius:13px; background:var(--dsr-panel-2); }
304
+ .doctor-mark { width:22px; height:22px; display:grid; place-items:center; border-radius:50%; color:var(--dsr-muted); background:var(--dsr-bg); font-size:12px; font-weight:800; }
305
+ .doctor-step.pass .doctor-mark { color:var(--dsr-success); background:var(--dsr-success-soft); }
306
+ .doctor-step.fail .doctor-mark { color:var(--dsr-error); background:var(--dsr-error-soft); }
307
+ .doctor-step.warn .doctor-mark { color:var(--dsr-warning); background:var(--dsr-warning-soft); }
308
+ .doctor-copy { min-width:0; }
309
+ .doctor-copy strong { display:block; font-size:12px; }
310
+ .doctor-copy span { display:block; margin-top:3px; color:var(--dsr-muted); font-size:11px; line-height:1.45; overflow-wrap:anywhere; }
311
+ .doctor-action { align-self:center; padding:5px 8px; font-size:11px; }
312
+ .doctor-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; color:var(--dsr-muted); font-size:11px; }
313
+ .doctor-foot-actions { display:flex; gap:7px; flex-wrap:wrap; }
314
+ #stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
315
+ #stats .stat-card:nth-child(n+5) { background:transparent; box-shadow:none; }
316
+ #stats .stat-card:nth-child(n+5) .v { font-size:20px; }
317
+ @media (max-width: 760px) {
318
+ .admin-hero { align-items:stretch; flex-direction:column; gap:14px; padding:16px; }
319
+ .admin-hero h2 { font-size:23px; }
320
+ .admin-hero-side { align-items:stretch; flex-direction:row; justify-content:space-between; }
321
+ .admin-hero-action { flex:0 0 auto; }
322
+ .doctor-steps { grid-template-columns:1fr; }
323
+ #stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
324
+ #stats .stat-card:nth-child(n+5) { background:linear-gradient(145deg, var(--dsr-panel), var(--dsr-bg-2)); box-shadow:inset 0 1px var(--dsr-divider), 0 10px 26px var(--dsr-shadow); }
325
+ }
326
+ @media (max-width: 720px) {
327
+ .token-row { display: flex; flex-direction: column; align-items: stretch; }
328
+ .token-actions { justify-content: stretch; }
329
+ .token-actions .mini-btn { flex: 1 1 auto; }
330
+ .host-ip-card { padding: 15px; }
331
+ .host-ip-table-wrap { overflow-x: auto; }
332
+ .host-ip-table { min-width: 360px; }
333
+ .device-key-toggle { align-items:flex-start; }
334
+ .device-key-toggle-actions { align-items:flex-end; flex-direction:column-reverse; }
335
+ .device-key-grid.head { display:none; }
336
+ .device-key-grid { grid-template-columns:1fr; gap:7px; padding:12px; }
337
+ .device-key-grid > *::before { content:attr(data-label); display:block; margin-bottom:3px; color:var(--dsr-muted); font:700 10px/1.3 system-ui,sans-serif; }
338
+ .device-key-actions { justify-content:stretch; }
339
+ .device-key-actions .mini-btn { flex:1 1 calc(50% - 6px); }
340
+ }
341
+ @media (max-width: 900px) {
342
+ .admin-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; }
343
+ .admin-title .left { min-width: 0; }
344
+ .admin-title .right { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; flex-wrap: wrap; overflow: visible; }
345
+ }
346
+ @media (max-width: 440px) {
347
+ .admin-title h1 { display: block; min-width: 0; overflow: visible; font-size: 18px; }
348
+ .admin-title .left { gap: 7px; }
349
+ }
350
+ </style>
351
+ <link rel="stylesheet" href="../remote-ui.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
352
+ <link rel="stylesheet" href="../theme-picker.css?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c">
353
+ </head>
354
+ <body>
355
+ <div class="admin-wrap">
356
+ <div class="admin-title">
357
+ <div class="left">
358
+ <a id="btn-console" class="mini-btn tb-btn" href="../" data-i18n-title="consoleTitle">‹ <span data-i18n="console">控制台</span></a>
359
+ <a id="btn-plugin-panel" class="mini-btn tb-btn hidden" href="../plugin.html" data-i18n-title="pluginPanel">‹ <span data-i18n="pluginPanel">状态面板</span></a>
360
+ <button id="btn-close-drawer" class="mini-btn tb-btn hidden" data-i18n-title="collapse">‹ <span data-i18n="collapse">收起面板</span></button>
361
+ <h1>DSH Remote <span data-i18n="admin">管理</span></h1>
362
+ </div>
363
+ <div class="right">
364
+ <button id="btn-ai-doctor" type="button" class="mini-btn tb-btn">AI 排查问题</button>
365
+ <a class="mini-btn gh-btn tb-btn" href="https://github.com/Blank-not-black/dsh-Remote" target="_blank" rel="noopener" title="GitHub" data-i18n-aria="repo">
366
+ <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8a8.01 8.01 0 0 0 5.47 7.59c.4.08.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg>
367
+ <span class="gh-label" data-i18n="repo">仓库</span>
368
+ </a>
369
+ <button id="btn-support" class="mini-btn tb-btn" data-donate-open data-i18n="donateTitle">赞赏支持</button>
370
+ <div class="fb-wrap">
371
+ <button id="btn-feedback" class="mini-btn fb-btn tb-btn" data-i18n-title="feedbackTitle" data-i18n-aria="feedbackTitle" aria-haspopup="menu" aria-expanded="false">
372
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a8 8 0 0 1-8 8H5l-1.5 2L4 20a8 8 0 0 1-1-4 8 8 0 0 1 18-4Z"/></svg>
373
+ </button>
374
+ <div id="fb-menu" class="fb-menu hidden" role="menu" data-i18n-aria="feedbackTitle">
375
+ <a class="fb-item primary" href="https://github.com/Blank-not-black/dsh-Remote" target="_blank" rel="noopener" role="menuitem">
376
+ <span class="fb-ico"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8a8.01 8.01 0 0 0 5.47 7.59c.4.08.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg></span>
377
+ <span class="fb-body"><span class="fb-name">GitHub</span><span class="fb-desc" data-i18n="feedback.githubDesc">反馈 bug / 提建议</span></span>
378
+ </a>
379
+ <a class="fb-item" href="https://gitee.com/Blankneverfails/dsh-Remote" target="_blank" rel="noopener" role="menuitem">
380
+ <span class="fb-ico"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="9" r="6"/><path d="M7.5 13.5 7 19a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l-.5-5.5"/><circle cx="10" cy="8.6" r=".5" fill="currentColor" stroke="none"/><circle cx="14" cy="8.6" r=".5" fill="currentColor" stroke="none"/><path d="M11 10.8c.6.5 1.4.5 2 0"/></svg></span>
381
+ <span class="fb-body"><span class="fb-name">Gitee</span><span class="fb-desc" data-i18n="feedback.giteeDesc">国内镜像,无需代理</span></span>
382
+ </a>
383
+ <a class="fb-item" href="https://space.bilibili.com/419009275/dynamic" target="_blank" rel="noopener" role="menuitem">
384
+ <span class="fb-ico"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3.5" y="6" width="17" height="11" rx="2"/><path d="M8.5 3.5v3M15.5 3.5v3"/><circle cx="9.2" cy="10.6" r=".5" fill="currentColor" stroke="none"/><circle cx="14.8" cy="10.6" r=".5" fill="currentColor" stroke="none"/><path d="M9.5 14c1.4 1 3.6 1 5 0"/></svg></span>
385
+ <span class="fb-body"><span class="fb-name">B站</span><span class="fb-desc" data-i18n="feedback.biliDesc">UP 动态页交流</span></span>
386
+ </a>
387
+ </div>
388
+ </div>
389
+ <button id="btn-theme" class="mini-btn tb-btn" title="">
390
+ <span id="theme-swatch" class="theme-swatch-dot"></span><span id="theme-label" class="t-label">默认深空</span>
391
+ </button>
392
+ <button id="btn-lang" class="mini-btn tb-btn" title="Language / 语言">EN</button>
393
+ <button id="conn-badge" class="conn-badge tb-btn off" title="网关面板"><span data-i18n="unauth">未认证</span></button>
394
+ </div>
395
+ </div>
396
+
397
+ <div id="login-view" class="login-card hidden" data-motion-view>
398
+ <input id="token-input" name="gateway-token" type="password" placeholder="输入网关访问令牌" autocomplete="off" aria-label="网关访问令牌" data-i18n-placeholder="tokenPlaceholder" data-i18n-aria="tokenPlaceholder">
399
+ <button id="btn-login" class="mini-btn" data-i18n="enter">进入</button>
400
+ </div>
401
+
402
+ <div id="main-view" class="hidden" data-motion-view>
403
+ <section id="admin-hero" class="admin-hero" aria-live="polite">
404
+ <div class="admin-hero-copy">
405
+ <div class="admin-eyebrow" data-i18n="hero.eyebrow">GATEWAY CONTROL</div>
406
+ <h2 id="admin-hero-title">正在检查网关</h2>
407
+ <p id="admin-hero-desc">读取运行状态与上游连接</p>
408
+ </div>
409
+ <div class="admin-hero-side">
410
+ <span id="admin-hero-status" class="admin-hero-status">—</span>
411
+ <button id="admin-hero-action" class="mini-btn admin-hero-action" type="button" data-i18n="hero.openDevices">查看设备</button>
412
+ </div>
413
+ </section>
414
+
415
+ <div id="admin-setup"></div>
416
+
417
+ <section id="doctor-card" class="doctor-card" aria-live="polite">
418
+ <div class="remote-ai-diagnosis">
419
+ <div><strong>AI 排查插件问题</strong><p class="muted">使用你的 DSH 和模型,新建独立会话收集只读证据。</p></div>
420
+ <button id="admin-doctor" type="button" class="remote-primary">AI 排查问题</button>
421
+ </div>
422
+ <button id="doctor-toggle" class="doctor-head" type="button" aria-expanded="false" aria-controls="doctor-body">
423
+ <span class="doctor-title"><strong data-i18n="doctor.title">连接诊断 · Doctor</strong><span id="doctor-subtitle">正在检查连接链路</span></span>
424
+ <span id="doctor-progress" class="doctor-progress">0/6</span>
425
+ <span class="doctor-chevron" aria-hidden="true">⌄</span>
426
+ </button>
427
+ <div id="doctor-body" class="doctor-body">
428
+ <div id="doctor-summary" class="doctor-summary">正在读取诊断结果…</div>
429
+ <div id="doctor-steps" class="doctor-steps"></div>
430
+ <div class="doctor-foot">
431
+ <span data-i18n="doctor.security">安全提示:只在可信局域网或 Tailscale 中开放网关端口,不要把令牌公开。</span>
432
+ <span class="doctor-foot-actions">
433
+ <button id="doctor-copy-report" class="mini-btn" type="button" data-i18n="doctor.copyReport">复制诊断</button>
434
+ <button id="doctor-refresh" class="mini-btn" type="button" data-i18n="doctor.refresh">重新检查</button>
435
+ </span>
436
+ </div>
437
+ </div>
438
+ </section>
439
+
440
+ <div class="device-key-card">
441
+ <div id="device-key-toggle" class="device-key-toggle hidden">
442
+ <div class="device-key-toggle-copy">
443
+ <div class="device-key-toggle-title" data-i18n="deviceKeys.title">独立设备密钥</div>
444
+ <div class="device-key-toggle-desc" data-i18n="deviceKeys.desc">开启后每台设备使用独立令牌,可单独轮换或退出;原共享令牌仅用于网关管理。</div>
445
+ </div>
446
+ <div class="device-key-toggle-actions">
447
+ <button id="btn-gateway" class="mini-btn hidden" data-i18n="startGateway">启动网关</button>
448
+ <button id="btn-device-key-add" class="mini-btn hidden" type="button" data-i18n="deviceKeys.add">添加设备</button>
449
+ <label class="device-key-switch" title="独立设备密钥">
450
+ <input id="device-key-enabled" type="checkbox" role="switch" aria-label="独立设备密钥">
451
+ <span aria-hidden="true"></span>
452
+ </label>
453
+ <button id="btn-logout" class="mini-btn" data-i18n="signOut">退出</button>
454
+ </div>
455
+ </div>
456
+ <div id="shared-token-row" class="token-row">
457
+ <code id="token-full">—</code>
458
+ <div class="token-actions">
459
+ <button id="btn-qr" class="mini-btn hidden" data-i18n="qrCode">二维码</button>
460
+ <button id="btn-rotate" class="mini-btn hidden" data-i18n="rotateToken">轮换令牌</button>
461
+ <button id="btn-copy" class="mini-btn" data-i18n="copyToken">复制令牌</button>
462
+ </div>
463
+ </div>
464
+ <div id="device-key-panel" class="device-key-panel hidden">
465
+ <div class="device-key-grid head">
466
+ <span data-i18n="deviceKeys.note">备注内容</span>
467
+ <span data-i18n="deviceKeys.ip">IP</span>
468
+ <span>Token</span>
469
+ <span></span>
470
+ </div>
471
+ <div id="device-key-rows"></div>
472
+ <div id="device-key-empty" class="device-key-empty hidden" data-i18n="deviceKeys.empty">暂无设备密钥</div>
473
+ </div>
474
+ </div>
475
+
476
+ <div id="gateway-port-row" class="gateway-port-row hidden">
477
+ <label for="gateway-port-input" data-i18n="gatewayPort">网关端口</label>
478
+ <input id="gateway-port-input" name="gateway-port" type="number" min="1" max="65535" inputmode="numeric" autocomplete="off" placeholder="8787">
479
+ <span id="gateway-port-current" class="muted">—</span>
480
+ <button id="btn-save-port" class="mini-btn" data-i18n="savePort">保存</button>
481
+ </div>
482
+
483
+ <section class="gateway-port-row" aria-labelledby="login-startup-title">
484
+ <div style="flex:1;min-width:200px">
485
+ <strong id="login-startup-title" data-i18n="startup.title">登录后自动运行网关</strong>
486
+ <p class="muted" data-i18n="startup.hint">Windows 登录后在后台运行网关,未打开 DSH 时也能连接中转并远程启动 DSH。电脑需保持开机联网。</p>
487
+ <p id="login-startup-status" class="muted" role="status" aria-live="polite"></p>
488
+ </div>
489
+ <button id="btn-login-startup" class="mini-btn" type="button" disabled data-i18n="startup.enable">开启自启</button>
490
+ <button id="btn-login-startup-repair" class="mini-btn hidden" type="button" data-i18n="startup.repair">修复自启</button>
491
+ <button id="btn-login-startup-refresh" class="mini-btn" type="button" data-i18n="startup.refresh">刷新状态</button>
492
+ </section>
493
+ <div id="relay-settings"></div>
494
+ <section id="host-ip-card" class="host-ip-card" aria-live="polite">
495
+ <div class="host-ip-head">
496
+ <div>
497
+ <div class="host-ip-title" data-i18n="hostIPs.title">主机 IP 地址</div>
498
+ <div id="host-ip-summary" class="muted" data-i18n="hostIPs.loading">正在读取主机地址…</div>
499
+ </div>
500
+ <div class="host-ip-head-actions">
501
+ <button id="btn-host-ip-add" class="mini-btn" type="button" data-i18n="hostIPs.add">添加宿主地址</button>
502
+ <div class="host-ip-badge" data-i18n="hostIPs.badge">手机连接候选</div>
503
+ </div>
504
+ </div>
505
+ <div class="host-ip-desc" data-i18n="hostIPs.desc">关闭虚拟机、容器或其他无效地址后,它们不会再写入配对二维码,也不会作为诊断和防火墙建议地址。</div>
506
+ <div class="host-ip-table-wrap">
507
+ <table class="host-ip-table">
508
+ <thead><tr><th data-i18n="hostIPs.enabledColumn">启用</th><th data-i18n="hostIPs.addressColumn">主机 IP</th><th data-i18n="hostIPs.statusColumn">状态</th></tr></thead>
509
+ <tbody id="host-ip-rows"></tbody>
510
+ </table>
511
+ <div id="host-ip-empty" class="host-ip-empty hidden" data-i18n="hostIPs.empty">暂无可用的非回环地址</div>
512
+ </div>
513
+ </section>
514
+
515
+ <div id="pair-box" class="pair-box hidden">
516
+ <div class="pair-title" data-i18n="pairTitle">手机 App 扫码配对</div>
517
+ <div class="pair-qr" id="pair-qr"></div>
518
+ <div class="muted" id="pair-hint"></div>
519
+ </div>
520
+
521
+ <section class="host-ip-card" id="lan-pairing-panel" aria-labelledby="lan-pairing-title">
522
+ <div class="host-ip-title" id="lan-pairing-title">局域网发现与配对</div>
523
+ <p class="muted" id="lan-pairing-hint"></p>
524
+ <p class="muted" id="lan-pairing-status" role="status"></p>
525
+ <p><code id="lan-pairing-code" hidden></code></p>
526
+ <button id="btn-lan-open" class="mini-btn" type="button" disabled>开放 10 分钟配对</button>
527
+ <button id="btn-lan-close" class="mini-btn" type="button" disabled>关闭配对</button>
528
+ </section>
529
+ <div class="stat-grid" id="stats"></div>
530
+
531
+ <div class="section-head"><span data-i18n="devices">已连接设备</span><span id="device-summary" class="muted"></span></div>
532
+ <div class="table-wrap">
533
+ <table>
534
+ <thead><tr>
535
+ <th data-i18n="th.status">状态</th><th data-i18n="th.name">名称</th><th data-i18n="th.type">类型</th>
536
+ <th data-i18n="th.ip">IP</th><th data-i18n="th.channels">通道</th><th data-i18n="th.requests">请求</th>
537
+ <th data-i18n="th.lastSeen">最后活跃</th><th data-i18n="th.ua">UA</th><th></th>
538
+ </tr></thead>
539
+ <tbody id="device-rows"></tbody>
540
+ </table>
541
+ <div id="device-empty" class="empty hidden" data-i18n="noDevices">暂无设备记录</div>
542
+ </div>
543
+
544
+ </div>
545
+ </div>
546
+
547
+ <!-- 赞赏支持模态 -->
548
+ <div id="modal-donate" class="modal hidden" role="dialog" aria-modal="true">
549
+ <div class="modal-card">
550
+ <div class="modal-title" data-i18n="donateTitle">赞赏支持</div>
551
+ <div class="modal-body donate-body">
552
+ <img src="../donate.png" alt="赞赏二维码" width="1152" height="1152" class="donate-img" style="display:block;margin:0 auto;max-width:100%;height:auto;max-height:60vh;border-radius:12px">
553
+ <p class="donate-thanks" data-i18n="donateThanks" style="text-align:center;margin-top:12px">感谢你的支持 ☕</p>
554
+ </div>
555
+ <div class="modal-actions">
556
+ <button id="donate-close" class="btn subtle" data-i18n="theme.close">关闭</button>
557
+ </div>
558
+ </div>
559
+ </div>
560
+
561
+ <div id="toast" class="toast hidden" role="status" aria-live="polite"></div>
562
+ <script>
563
+ window.ADMIN_STR = {
564
+ zh: {
565
+ 'console': '控制台',
566
+ 'consoleTitle': '返回控制台',
567
+ 'pluginPanel': '状态面板',
568
+ 'collapse': '收起面板',
569
+ 'admin': '管理',
570
+ 'hero.eyebrow': 'GATEWAY CONTROL', 'hero.running': '网关运行正常', 'hero.attention': '网关需要关注', 'hero.plugin': 'DSH 插件已连接', 'hero.offline': '网关未运行', 'hero.checking': '正在检查网关',
571
+ 'hero.runningDesc': '{online} 台设备在线 · {requests} 次请求', 'hero.attentionDesc': 'DSH 上游暂时不可达,请打开诊断', 'hero.pluginDesc': '插件已连接 DSH,网关可按需启动', 'hero.offlineDesc': '启动网关后即可接受 App 和桌面端连接', 'hero.openDevices': '查看设备', 'hero.startGateway': '启动网关', 'hero.copyToken': '复制令牌',
572
+ 'doctor.title': '连接诊断 · Doctor', 'doctor.checking': '正在检查连接链路', 'doctor.ready': '连接条件已就绪', 'doctor.needsWork': '还有 {n} 项需要处理',
573
+ 'doctor.allGood': '所有关键检查均已通过,手机端可以稳定连接。', 'doctor.partial': '按顺序处理未通过项;页面每 5 秒自动复查。',
574
+ 'doctor.security': '安全提示:只在可信局域网或 Tailscale 中开放网关端口,不要把令牌公开。', 'doctor.copyReport': '复制诊断', 'doctor.refresh': '重新检查',
575
+ 'doctor.dsh': 'DSH 服务', 'doctor.dshPass': 'DSH 上游可访问', 'doctor.dshFail': 'DSH 上游不可达,请先启动或重启 DSH Web',
576
+ 'doctor.gateway': '远程网关', 'doctor.gatewayPass': '网关正在 {host}:{port} 监听', 'doctor.gatewayFail': '网关尚未运行',
577
+ 'doctor.network': '局域网地址', 'doctor.networkPass': '手机可填写 {base}', 'doctor.networkFail': '未发现可供手机访问的 IPv4 地址',
578
+ 'doctor.firewall': '主机防火墙', 'doctor.firewallPass': '已有非管理设备成功接入,入站链路已验证', 'doctor.firewallWarn': '无法无权限确认规则;只对可信网络放行 TCP {port}',
579
+ 'doctor.device': '终端配对', 'doctor.devicePass': '{n} 台 App / WebUI 在线', 'doctor.deviceWait': '扫码配对后,本项会自动变为通过',
580
+ 'doctor.realtime': '实时消息通道', 'doctor.realtimePass': 'mux 与 host 通道均已连接', 'doctor.realtimeFail': '实时通道未全部建立;可先使用轮询,检查 DSH 后会自动恢复',
581
+ 'doctor.start': '启动', 'doctor.showQr': '显示二维码', 'doctor.copyAddress': '复制地址', 'doctor.copyCommand': '复制命令',
582
+ 'doctor.reportCopied': '诊断报告已复制', 'doctor.commandCopied': '防火墙命令已复制,请确认网络范围后手动执行', 'doctor.addressCopied': '服务器地址已复制',
583
+ 'theme.default': '默认深空', 'theme.dark': '落日', 'theme.light': '易北爱乐厅', 'theme.neutral': '草原孤塔', 'theme.mono': '黑曜白', 'theme.fish': '蓝色大肥鱼', 'theme.penguin': '企鹅女管·白昼', 'theme.penguin-night': '企鹅女管·极夜', 'theme.bocchi': '波奇酱', 'theme.nijika': '伊地知虹夏', 'theme.ryo': '山田凉', 'theme.kita': '喜多郁代',
584
+ 'theme.panelTitle': '选择配色', 'theme.close': '关闭',
585
+ 'repo': '仓库',
586
+ 'donateTitle': '赞赏支持', 'donateThanks': '感谢你的支持 ☕',
587
+ 'feedbackTitle': '反馈渠道',
588
+ 'feedback.githubDesc': '反馈 bug / 提建议', 'feedback.giteeDesc': '国内镜像,无需代理', 'feedback.biliDesc': 'UP 动态页交流',
589
+ 'unauth': '未认证',
590
+ 'tokenPlaceholder': '输入网关访问令牌',
591
+ 'enter': '进入',
592
+ 'startup.title': '登录后自动运行网关',
593
+ 'startup.hint': 'Windows 登录后在后台运行网关,未打开 DSH 时也能连接中转并远程启动 DSH。电脑需保持开机联网。',
594
+ 'startup.enable': '开启自启', 'startup.disable': '关闭自启', 'startup.busy': '正在更新…',
595
+ 'startup.on': '已开启 · 当前 Windows 用户登录后生效', 'startup.off': '未开启',
596
+ 'startup.unsupported': '当前仅支持 Windows 登录自启', 'startup.unavailable': '无法读取自启状态,请先启动网关或升级 Remote 后刷新',
597
+ 'startup.broken': '自启配置需要修复,请点击重新开启', 'startup.conflict': '存在其他启动配置,请在主机上检查',
598
+ 'startup.savedOn': '已开启登录自启', 'startup.savedOff': '已关闭登录自启,当前网关继续运行',
599
+ 'startup.repair': '修复自启', 'startup.refresh': '刷新状态',
600
+ 'startGateway': '启动网关',
601
+ 'stopGateway': '停止网关',
602
+ 'starting': '启动中…',
603
+ 'stopping': '停止中…',
604
+ 'gatewayPort': '网关端口',
605
+ 'gatewayPort.current': '当前 {port}',
606
+ 'savePort': '保存',
607
+ 'toast.portInvalid': '端口必须是 1-65535 的整数',
608
+ 'toast.portSaved': '端口已更新,网关已切换至 {port}',
609
+ 'toast.portSavedIdle': '端口已保存,网关未运行,下次启动生效',
610
+ 'toast.portEnv': '环境变量优先,当前仍使用 {port}',
611
+ 'toast.portFailedMsg': '端口保存失败:{msg}',
612
+ 'qrCode': '二维码',
613
+ 'rotateToken': '轮换令牌',
614
+ 'copyToken': '复制令牌',
615
+ 'signOut': '退出',
616
+ 'deviceKeys.title': '独立设备密钥', 'deviceKeys.desc': '开启后每台设备使用独立令牌,可单独轮换或退出;原共享令牌仅用于网关管理。',
617
+ 'deviceKeys.add': '添加设备', 'deviceKeys.note': '备注内容', 'deviceKeys.ip': 'IP', 'deviceKeys.empty': '暂无设备密钥',
618
+ 'deviceKeys.neverUsed': '尚未连接', 'deviceKeys.edit': '修改', 'deviceKeys.revoke': '退出',
619
+ 'deviceKeys.enableConfirm': '开启后,当前手机和浏览器使用的共享令牌会失效,需要使用设备二维码重新配对。继续?',
620
+ 'deviceKeys.disableConfirm': '关闭后,所有独立设备令牌会停止工作,需要重新使用共享令牌。继续?',
621
+ 'deviceKeys.revokeConfirm': '让这个设备退出?该设备令牌会立即失效。',
622
+ 'deviceKeys.rotateConfirm': '轮换这个设备的令牌?该设备会立即断开,需要重新扫码。',
623
+ 'deviceKeys.notePrompt': '设备备注内容',
624
+ 'deviceKeys.enabled': '独立设备密钥已开启,请使用设备二维码重新配对',
625
+ 'deviceKeys.disabled': '独立设备密钥已关闭,客户端改用共享令牌',
626
+ 'deviceKeys.created': '已创建设备密钥', 'deviceKeys.saved': '设备备注已保存',
627
+ 'deviceKeys.rotated': '设备令牌已轮换', 'deviceKeys.revoked': '设备已退出',
628
+ 'deviceKeys.failed': '设备密钥操作失败:{msg}',
629
+ 'pairTitle': '手机 App 扫码配对',
630
+ 'devices': '已连接设备',
631
+ 'noDevices': '暂无设备记录',
632
+ 'th.status': '状态', 'th.name': '名称', 'th.type': '类型', 'th.ip': 'IP',
633
+ 'th.channels': '通道', 'th.requests': '请求', 'th.lastSeen': '最后活跃', 'th.ua': 'UA',
634
+ 'badge.embedded': '内嵌', 'badge.gateway': '网关', 'badge.connected': '已连接',
635
+ 'badge.gateway.title': '新标签页打开网关管理面板', 'badge.gatewayDown': '网关未运行',
636
+ 'token.pluginNoGateway': '插件模式 · 未接网关, 无需令牌', 'token.unavailable': '未获取到令牌',
637
+ 'toast.tokenInvalid': '令牌无效', 'toast.connFailed': '连接失败', 'toast.authLayer': '登录代理拦截了管理 API,请检查 /remote/* 的认证规则',
638
+ 'stat.pluginVersion': '插件版本', 'stat.gatewayVersion': '网关版本',
639
+ 'stat.updateAvailable': '{version} 可用', 'stat.currentV': '当前 v{version}',
640
+ 'stat.download': '去下载', 'stat.embedded': 'DSH 内嵌 · 免网关',
641
+ 'stat.updateCheck': '更新检查: {error}', 'stat.latest': '已是最新(来源检查)', 'stat.notChecked': '未检查更新',
642
+ 'stat.hostIP': '主机 IP · {hostname}', 'stat.ipSep': '、', 'stat.phoneGateway': ' (手机连 {port} 网关)', 'stat.phoneThis': ' (手机连这个地址)',
643
+ 'hostIPs.title': '主机 IP 地址', 'hostIPs.badge': '手机连接候选', 'hostIPs.loading': '正在读取主机地址…', 'hostIPs.summary': '已启用 {enabled}/{total} 个地址', 'hostIPs.desc': '关闭虚拟机、容器或其他无效地址后,它们不会再写入配对二维码,也不会作为诊断和防火墙建议地址。Docker 中可手动添加宿主地址。', 'hostIPs.enabledColumn': '启用', 'hostIPs.addressColumn': '主机 IP', 'hostIPs.statusColumn': '状态', 'hostIPs.enabled': '已启用 · 会用于配对', 'hostIPs.disabled': '已关闭 · 不用于配对', 'hostIPs.enable': '切换此地址', 'hostIPs.empty': '暂无可用的非回环地址', 'hostIPs.keepOne': '至少保留一个可用地址', 'hostIPs.add': '添加宿主地址', 'hostIPs.addPrompt': '输入手机可访问的宿主 IP 或主机名:', 'hostIPs.invalid': '地址格式无效', 'hostIPs.exists': '该地址已在列表中', 'hostIPs.remove': '删除',
644
+ 'stat.reachable': '可达', 'stat.unreachable': '不可达', 'stat.dshUpstream': 'DSH 上游 {url}',
645
+ 'stat.devicesOnline': '设备在线 / 累计', 'stat.totalRequests': '总请求数', 'stat.authFailures': '认证失败',
646
+ 'stat.uptime': '运行时长 · {host}:{port}',
647
+ 'stats.title': 'Token、API 费用与 Plan 额度',
648
+ 'stats.todayTokens': '今日 Token',
649
+ 'stats.todayCost': '今日费用',
650
+ 'stats.peakShare': '高峰占比',
651
+ 'stats.input': '未缓存输入',
652
+ 'stats.cacheRead': '缓存命中',
653
+ 'stats.cacheWrite': '缓存写入',
654
+ 'stats.output': '输出',
655
+ 'stats.peak': '高峰', 'stats.off': '空闲',
656
+ 'stats.days': '近 {n} 天',
657
+ 'stats.gatewayDown': '统计需要网关运行', 'stats.empty': '暂无统计,产生会话后自动聚合',
658
+ 'stats.note': '注:本数据仅在使用 DeepSeek 官方 API 时估算;基于 token 计算,与官网账单可能有出入,一切以官网为准。统计自 2026-08-17 定价生效日起。',
659
+ 'unit.sec': ' 秒', 'unit.min': ' 分钟', 'unit.hour': ' 小时 ', 'unit.minShort': ' 分', 'unit.day': ' 天 ',
660
+ 'device.installedNotRunning': '网关已安装 · 当前未运行', 'device.noGatewayBinary': '未检测到网关程序',
661
+ 'device.ipRefresh': '{n} 个 IP · 每 5 秒刷新',
662
+ 'device.downloadApp': '下载手机 App', 'device.downloadGateway': '下载网关 ({os})',
663
+ 'device.noBinaryGuide': '本插件包未包含网关程序:下载对应系统的网关并运行',
664
+ 'device.afterRunGuide': '运行网关后回到本页刷新,即可看到设备监控与完整令牌',
665
+ 'device.installedGuide': '网关已随插件安装,当前未运行 — 点击上方「启动网关」开启',
666
+ 'device.afterStartGuide': '启动后本页会自动刷新为网关模式(完整设备监控 + 令牌)',
667
+ 'device.kind.app': '手机App', 'device.kind.admin': '管理页', 'device.kind.web': '浏览器', 'device.kind.unknown': '未知',
668
+ 'device.online': '在线', 'device.offline': '离线', 'device.note': '备注', 'device.kick': '断开',
669
+ 'prompt.note': '给 {ip} 设置备注(留空清除):', 'toast.noteSaved': '备注已保存', 'toast.noteFailed': '保存失败',
670
+ 'confirm.kick': '断开该设备的连接?', 'toast.kicked': '已断开 {ip}', 'toast.opFailed': '操作失败',
671
+ 'toast.tokenCopied': '令牌已复制', 'toast.copyFailed': '复制失败,请手动选择',
672
+ 'toast.gatewayDown': '网关未运行', 'toast.popupBlocked': '浏览器阻止了新窗口,请允许弹窗',
673
+ 'confirm.rotate': '轮换后旧令牌立即失效,手机与浏览器都需要重新扫码/输入。继续?',
674
+ 'toast.rotated': '令牌已轮换,请重新给设备配对', 'toast.rotateFailed': '轮换失败',
675
+ 'toast.rotateFailedMsg': '轮换失败:{msg}',
676
+ 'toast.gatewayStarted': '网关已启动', 'toast.gatewayAlready': '网关已在运行', 'toast.gatewayStopped': '网关已停止',
677
+ 'toast.gatewayPending': '网关启动中,稍后刷新', 'toast.done': '已执行',
678
+ 'toast.opFailedMsg': '操作失败:{msg}',
679
+ 'pair.hint': '{base} · App「设置 → 扫码连接」,或系统相机扫一扫自动打开 App',
680
+ 'pair.failed': '二维码生成失败',
681
+ 'login.title': 'DSH Remote 管理'
682
+ },
683
+ en: {
684
+ 'console': 'Console',
685
+ 'consoleTitle': 'Back to console',
686
+ 'pluginPanel': 'Status panel',
687
+ 'collapse': 'Collapse panel',
688
+ 'admin': 'Admin',
689
+ 'hero.eyebrow': 'GATEWAY CONTROL', 'hero.running': 'Gateway is healthy', 'hero.attention': 'Gateway needs attention', 'hero.plugin': 'DSH plugin connected', 'hero.offline': 'Gateway is not running', 'hero.checking': 'Checking gateway',
690
+ 'hero.runningDesc': '{online} devices online · {requests} requests', 'hero.attentionDesc': 'DSH upstream is unreachable; open diagnostics', 'hero.pluginDesc': 'The plugin is connected to DSH; start the gateway when needed', 'hero.offlineDesc': 'Start the gateway to accept App and desktop connections', 'hero.openDevices': 'View devices', 'hero.startGateway': 'Start gateway', 'hero.copyToken': 'Copy token',
691
+ 'doctor.title': 'Connection diagnostics · Doctor', 'doctor.checking': 'Checking the connection path', 'doctor.ready': 'Ready to connect', 'doctor.needsWork': '{n} checks need attention',
692
+ 'doctor.allGood': 'All critical checks passed. Mobile clients can connect.', 'doctor.partial': 'Resolve the checks in order. This page rechecks every 5 seconds.',
693
+ 'doctor.security': 'Security: expose the gateway only to a trusted LAN or Tailscale, and never publish the token.', 'doctor.copyReport': 'Copy report', 'doctor.refresh': 'Recheck',
694
+ 'doctor.dsh': 'DSH service', 'doctor.dshPass': 'DSH upstream is reachable', 'doctor.dshFail': 'DSH upstream is unreachable. Start or restart DSH Web first.',
695
+ 'doctor.gateway': 'Remote gateway', 'doctor.gatewayPass': 'Listening on {host}:{port}', 'doctor.gatewayFail': 'Gateway is not running',
696
+ 'doctor.network': 'LAN address', 'doctor.networkPass': 'Use {base} on the phone', 'doctor.networkFail': 'No IPv4 address available to the phone',
697
+ 'doctor.firewall': 'Host firewall', 'doctor.firewallPass': 'A non-admin client connected, confirming inbound access', 'doctor.firewallWarn': 'Rules cannot be confirmed without privilege. Allow TCP {port} only on trusted networks.',
698
+ 'doctor.device': 'Client pairing', 'doctor.devicePass': '{n} App / WebUI clients online', 'doctor.deviceWait': 'Scan the QR code; this check updates automatically',
699
+ 'doctor.realtime': 'Realtime channels', 'doctor.realtimePass': 'Both mux and host channels are connected', 'doctor.realtimeFail': 'Realtime channels are incomplete. Polling remains available and recovery is automatic.',
700
+ 'doctor.start': 'Start', 'doctor.showQr': 'Show QR', 'doctor.copyAddress': 'Copy address', 'doctor.copyCommand': 'Copy command',
701
+ 'doctor.reportCopied': 'Diagnostic report copied', 'doctor.commandCopied': 'Firewall command copied. Review the network scope before running it.', 'doctor.addressCopied': 'Server address copied',
702
+ 'theme.default': 'Default', 'theme.dark': 'Sunset', 'theme.light': 'Elbphilharmonie', 'theme.neutral': 'Prairie Tower', 'theme.mono': 'Monochrome', 'theme.fish': 'Blue Fat Fish', 'theme.penguin': 'Penguin Admin Day', 'theme.penguin-night': 'Penguin Admin Night', 'theme.bocchi': 'Bocchi', 'theme.nijika': 'Nijika', 'theme.ryo': 'Ryo', 'theme.kita': 'Kita',
703
+ 'theme.panelTitle': 'Choose theme', 'theme.close': 'Close',
704
+ 'repo': 'Repo',
705
+ 'donateTitle': 'Support', 'donateThanks': 'Thanks for your support ☕',
706
+ 'feedbackTitle': 'Feedback',
707
+ 'feedback.githubDesc': 'Report bugs · suggest features', 'feedback.giteeDesc': 'Mirror in China, no proxy needed', 'feedback.biliDesc': 'Chat on the UP\'s Bilibili page',
708
+ 'unauth': 'Not connected',
709
+ 'tokenPlaceholder': 'Gateway access token',
710
+ 'enter': 'Enter',
711
+ 'startup.title': 'Run gateway automatically after sign-in',
712
+ 'startup.hint': 'Run the gateway in the background after Windows sign-in, so you can connect through the relay and start DSH remotely. Keep this computer powered on and online.',
713
+ 'startup.enable': 'Enable startup', 'startup.disable': 'Disable startup', 'startup.busy': 'Updating…',
714
+ 'startup.on': 'Enabled · starts after this Windows user signs in', 'startup.off': 'Disabled',
715
+ 'startup.unsupported': 'Windows sign-in startup is currently supported', 'startup.unavailable': 'Cannot read startup status. Start the gateway or upgrade Remote, then refresh.',
716
+ 'startup.broken': 'Startup needs repair. Enable it again.', 'startup.conflict': 'Another startup configuration exists. Check it on this computer.',
717
+ 'startup.savedOn': 'Sign-in startup enabled', 'startup.savedOff': 'Sign-in startup disabled. The running gateway stays online.',
718
+ 'startup.repair': 'Repair startup', 'startup.refresh': 'Refresh status',
719
+ 'startGateway': 'Start gateway',
720
+ 'stopGateway': 'Stop gateway',
721
+ 'starting': 'Starting…',
722
+ 'stopping': 'Stopping…',
723
+ 'gatewayPort': 'Gateway port',
724
+ 'gatewayPort.current': 'Current {port}',
725
+ 'savePort': 'Save',
726
+ 'toast.portInvalid': 'Port must be an integer from 1 to 65535',
727
+ 'toast.portSaved': 'Port updated, gateway switched to {port}',
728
+ 'toast.portSavedIdle': 'Port saved; gateway not running, takes effect on next start',
729
+ 'toast.portEnv': 'Environment variable takes priority, current port remains {port}',
730
+ 'toast.portFailedMsg': 'Failed to save port: {msg}',
731
+ 'qrCode': 'QR code',
732
+ 'rotateToken': 'Rotate token',
733
+ 'copyToken': 'Copy token',
734
+ 'signOut': 'Sign out',
735
+ 'deviceKeys.title': 'Per-device keys', 'deviceKeys.desc': 'Give every device its own token so it can be rotated or signed out separately. The shared token remains admin-only.',
736
+ 'deviceKeys.add': 'Add device', 'deviceKeys.note': 'Note', 'deviceKeys.ip': 'IP', 'deviceKeys.empty': 'No device keys',
737
+ 'deviceKeys.neverUsed': 'Not connected yet', 'deviceKeys.edit': 'Edit', 'deviceKeys.revoke': 'Sign out',
738
+ 'deviceKeys.enableConfirm': 'Existing phones and browsers using the shared token will disconnect and must pair again with a device QR code. Continue?',
739
+ 'deviceKeys.disableConfirm': 'All per-device tokens will stop working and clients must use the shared token again. Continue?',
740
+ 'deviceKeys.revokeConfirm': 'Sign out this device? Its token becomes invalid immediately.',
741
+ 'deviceKeys.rotateConfirm': 'Rotate this device token? It will disconnect and must scan again.',
742
+ 'deviceKeys.notePrompt': 'Device note',
743
+ 'deviceKeys.enabled': 'Per-device keys enabled. Pair clients with a device QR code.',
744
+ 'deviceKeys.disabled': 'Per-device keys disabled. Clients now use the shared token.',
745
+ 'deviceKeys.created': 'Device key created', 'deviceKeys.saved': 'Device note saved',
746
+ 'deviceKeys.rotated': 'Device token rotated', 'deviceKeys.revoked': 'Device signed out',
747
+ 'deviceKeys.failed': 'Device key operation failed: {msg}',
748
+ 'pairTitle': 'Pair with the mobile app',
749
+ 'devices': 'Connected devices',
750
+ 'noDevices': 'No devices yet',
751
+ 'th.status': 'Status', 'th.name': 'Name', 'th.type': 'Type', 'th.ip': 'IP',
752
+ 'th.channels': 'Channels', 'th.requests': 'Requests', 'th.lastSeen': 'Last seen', 'th.ua': 'UA',
753
+ 'badge.embedded': 'Embedded', 'badge.gateway': 'Gateway', 'badge.connected': 'Connected',
754
+ 'badge.gateway.title': 'Open gateway admin in a new tab', 'badge.gatewayDown': 'Gateway not running',
755
+ 'token.pluginNoGateway': 'Plugin mode · no gateway, no token needed', 'token.unavailable': 'Token unavailable',
756
+ 'toast.tokenInvalid': 'Invalid token', 'toast.connFailed': 'Connection failed', 'toast.authLayer': 'The login proxy blocked the admin API; check authentication rules for /remote/*',
757
+ 'stat.pluginVersion': 'Plugin version', 'stat.gatewayVersion': 'Gateway version',
758
+ 'stat.updateAvailable': 'v{version} available', 'stat.currentV': 'Current v{version}',
759
+ 'stat.download': 'Download', 'stat.embedded': 'Embedded in DSH · no gateway',
760
+ 'stat.updateCheck': 'Update check: {error}', 'stat.latest': 'Up to date (source check)', 'stat.notChecked': 'Not checked',
761
+ 'stat.hostIP': 'Host IP · {hostname}', 'stat.ipSep': ', ', 'stat.phoneGateway': ' (phone connects to gateway {port})', 'stat.phoneThis': ' (phone connects to this address)',
762
+ 'hostIPs.title': 'Host IP addresses', 'hostIPs.badge': 'Phone connection candidates', 'hostIPs.loading': 'Reading host addresses…', 'hostIPs.summary': '{enabled}/{total} addresses enabled', 'hostIPs.desc': 'Disabled virtual-machine, container, or other invalid addresses are excluded from pairing QR codes, diagnostics, and firewall suggestions. In Docker, add a host address manually.', 'hostIPs.enabledColumn': 'Enabled', 'hostIPs.addressColumn': 'Host IP', 'hostIPs.statusColumn': 'Status', 'hostIPs.enabled': 'Enabled · used for pairing', 'hostIPs.disabled': 'Disabled · excluded from pairing', 'hostIPs.enable': 'Toggle this address', 'hostIPs.empty': 'No usable non-loopback address', 'hostIPs.keepOne': 'Keep at least one usable address enabled', 'hostIPs.add': 'Add host address', 'hostIPs.addPrompt': 'Enter a host IP or hostname reachable by the phone:', 'hostIPs.invalid': 'Invalid address format', 'hostIPs.exists': 'This address is already listed', 'hostIPs.remove': 'Remove',
763
+ 'stat.reachable': 'Reachable', 'stat.unreachable': 'Unreachable', 'stat.dshUpstream': 'DSH upstream {url}',
764
+ 'stat.devicesOnline': 'Devices online / total', 'stat.totalRequests': 'Total requests', 'stat.authFailures': 'Auth failures',
765
+ 'stat.uptime': 'Uptime · {host}:{port}',
766
+ 'stats.title': 'Tokens, API costs & plan quotas',
767
+ 'stats.todayTokens': 'Tokens today',
768
+ 'stats.todayCost': 'Cost today',
769
+ 'stats.peakShare': 'Peak share',
770
+ 'stats.input': 'Uncached input',
771
+ 'stats.cacheRead': 'Cache read',
772
+ 'stats.cacheWrite': 'Cache write',
773
+ 'stats.output': 'Output',
774
+ 'stats.peak': 'Peak', 'stats.off': 'Off-peak',
775
+ 'stats.days': 'Last {n} days',
776
+ 'stats.gatewayDown': 'Stats require the gateway to be running', 'stats.empty': 'No stats yet — they aggregate as sessions happen',
777
+ 'stats.note': 'Note: estimates assume the official DeepSeek API. Token-based calculation may differ from the official bill; always defer to deepseek.com. Stats start from the 2026-08-17 pricing date.',
778
+ 'unit.sec': 's', 'unit.min': 'min', 'unit.hour': 'h ', 'unit.minShort': 'm', 'unit.day': 'd ',
779
+ 'device.installedNotRunning': 'Gateway installed · not running', 'device.noGatewayBinary': 'Gateway binary not found',
780
+ 'device.ipRefresh': '{n} IPs · refreshed every 5s',
781
+ 'device.downloadApp': 'Download mobile app', 'device.downloadGateway': 'Download gateway ({os})',
782
+ 'device.noBinaryGuide': 'This plugin package does not include the gateway binary: download and run the gateway for your OS',
783
+ 'device.afterRunGuide': 'After starting the gateway, come back and refresh this page to see device monitoring and the full token',
784
+ 'device.installedGuide': 'The gateway is installed with the plugin but not running — click "Start gateway" above',
785
+ 'device.afterStartGuide': 'After startup this page refreshes into gateway mode (full device monitoring + token)',
786
+ 'device.kind.app': 'App', 'device.kind.admin': 'Admin', 'device.kind.web': 'Browser', 'device.kind.unknown': 'Unknown',
787
+ 'device.online': 'Online', 'device.offline': 'Offline', 'device.note': 'Note', 'device.kick': 'Kick',
788
+ 'prompt.note': 'Set note for {ip} (empty to clear):', 'toast.noteSaved': 'Note saved', 'toast.noteFailed': 'Save failed',
789
+ 'confirm.kick': 'Disconnect this device?', 'toast.kicked': 'Disconnected {ip}', 'toast.opFailed': 'Operation failed',
790
+ 'toast.tokenCopied': 'Token copied', 'toast.copyFailed': 'Copy failed, select manually',
791
+ 'toast.gatewayDown': 'Gateway not running', 'toast.popupBlocked': 'Popup blocked, allow popups for this site',
792
+ 'confirm.rotate': 'After rotation the old token is invalid immediately. Phones and browsers must re-scan / re-enter. Continue?',
793
+ 'toast.rotated': 'Token rotated, re-pair your devices', 'toast.rotateFailed': 'Rotate failed',
794
+ 'toast.rotateFailedMsg': 'Rotate failed: {msg}',
795
+ 'toast.gatewayStarted': 'Gateway started', 'toast.gatewayAlready': 'Gateway already running', 'toast.gatewayStopped': 'Gateway stopped',
796
+ 'toast.gatewayPending': 'Gateway starting, refresh later', 'toast.done': 'Done',
797
+ 'toast.opFailedMsg': 'Operation failed: {msg}',
798
+ 'pair.hint': '{base} · App "Settings → Scan to connect", or scan with the system camera to open the App',
799
+ 'pair.failed': 'QR generation failed',
800
+ 'login.title': 'DSH Remote Admin'
801
+ }
802
+ }
803
+ </script>
804
+ <script src="../setup.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
805
+ <script src="../qrcode.min.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
806
+ <script src="../i18n.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
807
+ <script src="../theme.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
808
+ <script src="../vendor/gsap/gsap.min.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
809
+ <script src="../motion.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
810
+ <script src="../remote-state.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
811
+ <script src="../remote-ui.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
812
+ <script src="../admin.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
813
+ <script src="../doctor.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
814
+ <script src="../doctor-entry.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
815
+ <script src="../sponsor-entry.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
816
+ <script src="../relay-devices.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
817
+ <script src="../relay-settings.js?dsr-build=f8d6f991d76f42d2027fc446d197b1ed83a3f083295f0acaac045a9a12d7340c"></script>
818
+ <script>window.mountAdminRelaySettings?.()</script>
819
+ </body>
820
+ </html>