@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.
- package/README.en.md +61 -0
- package/README.md +60 -2
- package/apk/dsh-remote.apk +0 -0
- package/approval-summary.mjs +115 -0
- package/client.js +197 -0
- package/cordis.patch.yml +5 -0
- package/doctor-skill.mjs +99 -0
- package/doctor-target.mjs +24 -0
- package/file-delivery.mjs +84 -0
- package/gateway-stats.cjs +501 -0
- package/gateway.cjs +8451 -0
- package/index.mjs +1788 -0
- package/insights.mjs +111 -0
- package/market.mjs +86 -0
- package/package.json +73 -4
- package/peak-reminders.mjs +50 -0
- package/plugin-center.mjs +777 -0
- package/plugin-transaction.mjs +300 -0
- package/public/activity.js +188 -0
- package/public/admin.html +820 -0
- package/public/admin.js +1167 -0
- package/public/announcement-forms.js +89 -0
- package/public/announcements.json +464 -0
- package/public/app.js +8826 -0
- package/public/approval-records.js +301 -0
- package/public/approval-summary.js +78 -0
- package/public/build.json +5 -0
- package/public/cache-upgrade.js +51 -0
- package/public/chat-copy.js +59 -0
- package/public/chat-files.js +87 -0
- package/public/desktop/desktop.css +816 -0
- package/public/desktop/desktop.html +871 -0
- package/public/desktop/desktop.js +4548 -0
- package/public/desktop/i18n.js +85 -0
- package/public/diagnostics.js +203 -0
- package/public/doctor-entry.js +94 -0
- package/public/doctor.css +205 -0
- package/public/doctor.js +769 -0
- package/public/donate.png +0 -0
- package/public/e2ee-transport.js +219 -0
- package/public/extensions.css +109 -0
- package/public/extensions.js +215 -0
- package/public/file-inbox.css +66 -0
- package/public/file-inbox.js +289 -0
- package/public/genui.css +8 -0
- package/public/genui.js +254 -0
- package/public/history.js +304 -0
- package/public/i18n.js +57 -0
- package/public/icon.svg +12 -0
- package/public/image-cache.js +141 -0
- package/public/image-preview.js +290 -0
- package/public/index.html +1568 -0
- package/public/insights.css +28 -0
- package/public/insights.js +290 -0
- package/public/jsqr.min.js +10104 -0
- package/public/lan-discovery.js +94 -0
- package/public/link-check.js +109 -0
- package/public/manifest.webmanifest +16 -0
- package/public/md.js +333 -0
- package/public/morphicons-init.js +41 -0
- package/public/motion.js +557 -0
- package/public/network.js +100 -0
- package/public/onboarding.css +36 -0
- package/public/onboarding.js +253 -0
- package/public/operations.js +141 -0
- package/public/permission-presets.js +159 -0
- package/public/plugin-center.css +120 -0
- package/public/plugin-center.js +666 -0
- package/public/plugin-icon.svg +5 -0
- package/public/plugin.html +68 -0
- package/public/plugin.js +211 -0
- package/public/qrcode.min.js +2297 -0
- package/public/relay-autopair.js +251 -0
- package/public/relay-devices.js +80 -0
- package/public/relay-settings.css +24 -0
- package/public/relay-settings.js +194 -0
- package/public/remote-state.js +27 -0
- package/public/remote-ui.css +148 -0
- package/public/remote-ui.js +243 -0
- package/public/session-deck.css +79 -0
- package/public/session-deck.js +180 -0
- package/public/session-presets.js +47 -0
- package/public/setup.css +18 -0
- package/public/setup.js +213 -0
- package/public/sha256.js +119 -0
- package/public/skills.css +81 -0
- package/public/skills.js +202 -0
- package/public/skins/blue-fish/DESIGN.md +24 -0
- package/public/skins/blue-fish/face.png +0 -0
- package/public/skins/blue-fish/icon-blush.png +0 -0
- package/public/skins/blue-fish/icon-sleep.png +0 -0
- package/public/skins/blue-fish/icon-smile.png +0 -0
- package/public/skins/blue-fish/icon-star.png +0 -0
- package/public/skins/blue-fish/icon-wink.png +0 -0
- package/public/skins/blue-fish/icon.png +0 -0
- package/public/skins/blue-fish/mascot.png +0 -0
- package/public/skins/blue-fish/pattern.png +0 -0
- package/public/skins/blue-fish/preview.html +12 -0
- package/public/skins/blue-fish/skin.css +122 -0
- package/public/skins/blue-fish/sparkles.svg +18 -0
- package/public/skins/bocchi/DESIGN.md +99 -0
- package/public/skins/bocchi/face.png +0 -0
- package/public/skins/bocchi/grain.png +0 -0
- package/public/skins/bocchi/icon-blush.png +0 -0
- package/public/skins/bocchi/icon-sleep.png +0 -0
- package/public/skins/bocchi/icon-smile.png +0 -0
- package/public/skins/bocchi/icon-star.png +0 -0
- package/public/skins/bocchi/icon-wink.png +0 -0
- package/public/skins/bocchi/icon.png +0 -0
- package/public/skins/bocchi/pattern-soft.png +0 -0
- package/public/skins/bocchi/pattern.png +0 -0
- package/public/skins/bocchi/preview.html +55 -0
- package/public/skins/bocchi/skin.css +233 -0
- package/public/skins/bocchi/stage-bg.png +0 -0
- package/public/skins/bocchi/stage-soft.png +0 -0
- package/public/skins/bocchi/stand.png +0 -0
- package/public/skins/bocchi/sticker-guitar.png +0 -0
- package/public/skins/kessoku/DESIGN.md +38 -0
- package/public/skins/kessoku/grain.png +0 -0
- package/public/skins/kessoku/skin.css +212 -0
- package/public/skins/kita/SOURCES.json +51 -0
- package/public/skins/kita/face.png +0 -0
- package/public/skins/kita/icon-live.png +0 -0
- package/public/skins/kita/icon-reddress.png +0 -0
- package/public/skins/kita/icon-seifuku.png +0 -0
- package/public/skins/kita/pattern.png +0 -0
- package/public/skins/kita/preview.html +56 -0
- package/public/skins/kita/skin.css +26 -0
- package/public/skins/kita/stand.png +0 -0
- package/public/skins/kita/sticker-live.png +0 -0
- package/public/skins/nijika/SOURCES.json +51 -0
- package/public/skins/nijika/face.png +0 -0
- package/public/skins/nijika/icon-live.png +0 -0
- package/public/skins/nijika/icon-reddress.png +0 -0
- package/public/skins/nijika/icon-seifuku.png +0 -0
- package/public/skins/nijika/pattern.png +0 -0
- package/public/skins/nijika/preview.html +56 -0
- package/public/skins/nijika/skin.css +25 -0
- package/public/skins/nijika/stand.png +0 -0
- package/public/skins/nijika/sticker-live.png +0 -0
- package/public/skins/penguin/DESIGN.md +33 -0
- package/public/skins/penguin/SOURCES.json +22 -0
- package/public/skins/penguin/aic-blueprint.svg +24 -0
- package/public/skins/penguin/endfield-triangles.svg +4 -0
- package/public/skins/penguin/face.png +0 -0
- package/public/skins/penguin/icon-blush.png +0 -0
- package/public/skins/penguin/icon-dizzy.png +0 -0
- package/public/skins/penguin/icon-laugh.png +0 -0
- package/public/skins/penguin/icon-sleep.png +0 -0
- package/public/skins/penguin/icon-smile.png +0 -0
- package/public/skins/penguin/icon-star.png +0 -0
- package/public/skins/penguin/icon-wink.png +0 -0
- package/public/skins/penguin/icon.png +0 -0
- package/public/skins/penguin/mascot.png +0 -0
- package/public/skins/penguin/pattern-night.png +0 -0
- package/public/skins/penguin/pattern.png +0 -0
- package/public/skins/penguin/preview.html +12 -0
- package/public/skins/penguin/skin.css +212 -0
- package/public/skins/ryo/SOURCES.json +51 -0
- package/public/skins/ryo/face.png +0 -0
- package/public/skins/ryo/icon-live.png +0 -0
- package/public/skins/ryo/icon-reddress.png +0 -0
- package/public/skins/ryo/icon-seifuku.png +0 -0
- package/public/skins/ryo/pattern.png +0 -0
- package/public/skins/ryo/preview.html +56 -0
- package/public/skins/ryo/skin.css +25 -0
- package/public/skins/ryo/stand.png +0 -0
- package/public/skins/ryo/sticker-live.png +0 -0
- package/public/sponsor-entry.js +21 -0
- package/public/styles.css +1526 -0
- package/public/subagents.css +61 -0
- package/public/subagents.js +275 -0
- package/public/task-board.js +109 -0
- package/public/teams.js +98 -0
- package/public/theme-picker.css +58 -0
- package/public/theme-vars.css +1044 -0
- package/public/theme.js +166 -0
- package/public/transcribe-core.js +74 -0
- package/public/turn-results.js +121 -0
- package/public/update.json +49 -0
- package/public/vendor/gsap/NOTICE.md +10 -0
- package/public/vendor/gsap/gsap.min.js +11 -0
- package/public/vendor/morphicons/LICENSE +21 -0
- package/public/vendor/morphicons/README.md +10 -0
- package/public/vendor/morphicons/controller-CXZuwJ_M.js +152 -0
- package/public/vendor/morphicons/dom.js +206 -0
- package/public/vendor/morphicons/element.js +261 -0
- package/public/vendor/morphicons/normalize-CYnN3Npw.js +540 -0
- package/public/vendor/morphicons/spring-CFHloqPP.js +623 -0
- package/public/version.json +3 -0
- package/public/voice-input.js +1151 -0
- package/public/workflow.css +365 -0
- package/public/workflow.js +419 -0
- package/session-file.mjs +39 -0
- package/skills/dsh-remote-doctor/SKILL.md +186 -0
- package/skills/dsh-remote-doctor/references/wiki/README.md +40 -0
- package/skills/dsh-remote-doctor/references/wiki/ai-guide.md +61 -0
- package/skills/dsh-remote-doctor/references/wiki/connection.md +76 -0
- package/skills/dsh-remote-doctor/references/wiki/errors.md +26 -0
- package/skills/dsh-remote-doctor/references/wiki/evidence.md +44 -0
- package/skills/dsh-remote-doctor/references/wiki/files.md +31 -0
- package/skills/dsh-remote-doctor/references/wiki/maintenance.md +30 -0
- package/skills/dsh-remote-doctor/references/wiki/notifications.md +33 -0
- package/skills/dsh-remote-doctor/references/wiki/operations.md +32 -0
- package/skills/dsh-remote-doctor/references/wiki/plugins.md +90 -0
- package/skills/dsh-remote-doctor/references/wiki/sessions.md +45 -0
- package/skills/dsh-remote-doctor/references/wiki/sources.md +27 -0
- package/skills.mjs +53 -0
- package/speech-whisper.mjs +705 -0
- package/task-board.mjs +57 -0
- package/teams.mjs +58 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/* Shared management presentation; scoped away from mobile conversation UI. */
|
|
2
|
+
.remote-admin body,.remote-panel-body { background:var(--dsr-bg); color:var(--dsr-text); font:14px/1.55 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; }
|
|
3
|
+
.remote-admin *, .remote-panel-body * { box-sizing:border-box; }
|
|
4
|
+
.remote-admin [hidden],.remote-panel-body [hidden] { display:none!important; }
|
|
5
|
+
.remote-admin .admin-wrap { max-width:1180px; padding:16px 24px 36px; }
|
|
6
|
+
.remote-admin .admin-title { position:relative; top:auto; margin:0; padding:0 0 16px; background:var(--dsr-bg); border:0; border-radius:0; box-shadow:none; gap:14px; backdrop-filter:none; }
|
|
7
|
+
.remote-admin .admin-title h1 { font-size:17px; font-weight:650; }
|
|
8
|
+
.remote-admin .admin-title .right { gap:6px; }
|
|
9
|
+
.remote-admin #fb-menu { position:fixed; inset:auto; margin:0; z-index:2147483001; box-sizing:border-box; overflow-y:auto; overscroll-behavior:contain; }
|
|
10
|
+
.remote-admin #fb-menu::backdrop { background:transparent; }
|
|
11
|
+
.remote-admin .admin-title .tb-btn { font-size:12px; min-height:38px; }
|
|
12
|
+
.remote-admin .remote-tabs { display:flex; flex-wrap:wrap; gap:4px; margin:0 0 24px; padding:8px 0; border-top:1px solid var(--dsr-line); border-bottom:1px solid var(--dsr-line); }
|
|
13
|
+
.remote-admin .remote-tabs button { flex:0 1 auto; min-height:44px; padding:9px 16px; border:0; border-radius:8px; background:transparent; color:var(--dsr-muted); font:inherit; font-size:13px; cursor:pointer; }
|
|
14
|
+
.remote-admin .remote-tabs button[aria-selected="true"] { background:var(--dsr-accent-soft); color:var(--dsr-accent-strong); font-weight:650; }
|
|
15
|
+
.remote-admin .remote-tabs button:hover { background:var(--dsr-panel); color:var(--dsr-text); }
|
|
16
|
+
.remote-admin .remote-page-picker { display:none; }
|
|
17
|
+
.remote-admin .remote-page { animation:none!important; }
|
|
18
|
+
.remote-admin .remote-page-head { margin-bottom:18px; display:flex; flex-direction:column; gap:4px; }
|
|
19
|
+
.remote-admin .remote-page-head h2 { margin:0; font-size:23px; font-weight:650; letter-spacing:-.4px; }
|
|
20
|
+
.remote-admin .remote-page-hint { margin:0; color:var(--dsr-muted); font-size:13px; }
|
|
21
|
+
.remote-admin .admin-hero { margin:0; padding:8px 0 18px; min-height:0; background:transparent; border:0; box-shadow:none; border-radius:0; }
|
|
22
|
+
.remote-admin .admin-hero::after { display:none; }
|
|
23
|
+
.remote-admin .admin-eyebrow,.remote-admin #admin-hero-status,.remote-admin .admin-hero-side { display:none; }
|
|
24
|
+
.remote-admin .admin-hero h2 { font-size:20px; letter-spacing:-.3px; margin:0 0 6px; }
|
|
25
|
+
.remote-admin .admin-hero p { font-size:13px; max-width:760px; }
|
|
26
|
+
.remote-admin .admin-hero[data-remote-phase="ready"] h2 { color:var(--dsr-text); }
|
|
27
|
+
.remote-admin .admin-hero[data-remote-phase="auth"] h2,.remote-admin .admin-hero[data-remote-phase="upstream"] h2 { color:var(--dsr-error); }
|
|
28
|
+
.remote-health-path { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:24px; padding:0 0 20px; border-bottom:1px solid var(--dsr-line); }
|
|
29
|
+
.remote-path-item { min-width:0; display:flex; flex-direction:column; gap:6px; }
|
|
30
|
+
.remote-path-item > span { color:var(--dsr-muted); font-size:12px; }
|
|
31
|
+
.remote-path-item strong { font-size:13px; font-weight:600; }
|
|
32
|
+
.remote-state-ok { color:var(--dsr-success); }
|
|
33
|
+
.remote-state-error { color:var(--dsr-error); }
|
|
34
|
+
.remote-state-warning { color:var(--dsr-warning); }
|
|
35
|
+
.remote-state-unknown { color:var(--dsr-muted); }
|
|
36
|
+
.remote-task { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:18px; padding:20px; border:1px solid var(--dsr-line); border-radius:14px; background:var(--dsr-panel); }
|
|
37
|
+
.remote-task h3,.remote-section-head h3,.remote-settings-block h3,.remote-connections h3 { margin:0 0 6px; font-size:15px; font-weight:650; }
|
|
38
|
+
.remote-task p { max-width:650px; color:var(--dsr-muted); font-size:13px; margin:0; }
|
|
39
|
+
.remote-task-actions { display:flex; flex-wrap:wrap; gap:8px; }
|
|
40
|
+
.remote-primary,.remote-secondary,.remote-link { min-height:44px; padding:9px 14px; border:1px solid var(--dsr-line); border-radius:9px; font:inherit; font-size:13px; color:var(--dsr-text); background:var(--dsr-panel); cursor:pointer; }
|
|
41
|
+
.remote-primary { background:var(--dsr-accent-strong); color:var(--dsr-on-accent); border-color:var(--dsr-accent-strong); font-weight:650; }
|
|
42
|
+
.remote-link { background:transparent; border-color:transparent; color:var(--dsr-accent-strong); }
|
|
43
|
+
.remote-secondary:hover,.remote-link:hover { background:var(--dsr-accent-soft); }
|
|
44
|
+
.remote-admin :focus-visible,.remote-panel-body :focus-visible { outline:2px solid var(--dsr-accent); outline-offset:3px; }
|
|
45
|
+
.remote-connections { margin-top:26px; }
|
|
46
|
+
.remote-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
|
|
47
|
+
.remote-section-head h3 { margin:0; }
|
|
48
|
+
.remote-empty { margin:0; padding:16px 0; color:var(--dsr-muted); font-size:13px; }
|
|
49
|
+
.remote-client { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:14px 0; border-bottom:1px solid var(--dsr-line); }
|
|
50
|
+
.remote-client > div { display:flex; flex-direction:column; gap:3px; min-width:0; }
|
|
51
|
+
.remote-client strong { font-size:13px; font-weight:600; }
|
|
52
|
+
.remote-client span { font-size:12px; }
|
|
53
|
+
.remote-client > div > span { color:var(--dsr-muted); overflow-wrap:anywhere; }
|
|
54
|
+
.remote-updated { color:var(--dsr-muted); font-size:12px; margin:22px 0 0; }
|
|
55
|
+
.remote-admin .device-key-card,.remote-admin .host-ip-card,.remote-admin #doctor-card,.remote-admin .gateway-port-row,.remote-admin .stats-dash,.remote-admin .remote-settings-block { padding:18px; margin:0 0 18px; border:1px solid var(--dsr-line); border-radius:12px; background:var(--dsr-panel); box-shadow:none; }
|
|
56
|
+
.remote-admin #doctor-card { padding:0; }
|
|
57
|
+
.remote-admin .doctor-step { background:var(--dsr-bg-2); box-shadow:none; border-radius:9px; }
|
|
58
|
+
.remote-admin .doctor-step strong,.remote-admin .doctor-step span { font-size:13px; }
|
|
59
|
+
.remote-admin .doctor-title span,.remote-admin .doctor-foot { font-size:12px; }
|
|
60
|
+
.remote-admin .device-key-card { display:flex; flex-direction:column; gap:14px; }
|
|
61
|
+
.remote-admin .device-key-toggle { margin:0; background:transparent; border:0; padding:0; }
|
|
62
|
+
.remote-admin .device-key-toggle-title,.remote-admin .host-ip-title { font-size:14px; }
|
|
63
|
+
.remote-admin .device-key-toggle-desc,.remote-admin .host-ip-desc,.remote-admin .token-row { font-size:13px; }
|
|
64
|
+
.remote-admin .token-row { background:var(--dsr-bg-2); padding:12px; border-radius:9px; margin:0; }
|
|
65
|
+
.remote-admin #token-full { font-size:13px; overflow-wrap:anywhere; user-select:all; }
|
|
66
|
+
.remote-admin .mini-btn { min-height:38px; font-size:12px; padding:7px 11px; border-radius:8px; box-shadow:none; }
|
|
67
|
+
.remote-admin .device-key-actions .mini-btn { min-height:38px; }
|
|
68
|
+
.remote-admin .gateway-port-row input { font-size:16px; min-height:42px; }
|
|
69
|
+
.remote-admin .table-wrap { box-shadow:none; border-radius:12px; }
|
|
70
|
+
.remote-admin .table-wrap td { font-size:12px; }
|
|
71
|
+
.remote-admin .remote-advanced { border-top:1px solid var(--dsr-line); padding:16px 0; }
|
|
72
|
+
.remote-admin .remote-advanced summary { cursor:pointer; color:var(--dsr-muted); font-size:13px; }
|
|
73
|
+
.remote-admin .remote-advanced #stats { margin-top:16px; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
|
|
74
|
+
.remote-admin .remote-advanced .stat-card { padding:12px; box-shadow:none; background:var(--dsr-panel); border:1px solid var(--dsr-line); }
|
|
75
|
+
.remote-admin .remote-advanced .stat-card .v { font-size:18px; }
|
|
76
|
+
.remote-settings-block p { margin:0 0 14px; color:var(--dsr-muted); font-size:13px; }
|
|
77
|
+
.remote-panel-body { margin:0; min-width:280px; }
|
|
78
|
+
.remote-panel-body .plugin-shell { display:flex; flex-direction:column; padding:20px; gap:0; min-height:100vh; }
|
|
79
|
+
.remote-panel-body .plugin-head { padding-bottom:18px; margin-bottom:18px; border-bottom:1px solid var(--dsr-line); }
|
|
80
|
+
.remote-panel-body .plugin-brand { display:flex; align-items:center; gap:10px; }
|
|
81
|
+
.remote-panel-body .plugin-brand-mark { width:29px; height:29px; display:grid; place-items:center; background:var(--dsr-accent-soft); color:var(--dsr-accent-strong); border-radius:8px; font-size:16px; font-weight:700; }
|
|
82
|
+
.remote-panel-body .plugin-brand-mark svg { width:19px; height:19px; }
|
|
83
|
+
.remote-panel-body .plugin-brand-copy { display:flex; flex-direction:column; }
|
|
84
|
+
.remote-panel-body .plugin-brand-name { font-size:15px; font-weight:650; }
|
|
85
|
+
.remote-panel-body .plugin-brand-sub { font-size:12px; color:var(--dsr-muted); }
|
|
86
|
+
.remote-panel-body .plugin-close { background:transparent; border:1px solid var(--dsr-line); color:var(--dsr-muted); width:36px; height:36px; border-radius:9px; cursor:pointer; margin-left:auto; }
|
|
87
|
+
.remote-panel-body .plugin-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
|
|
88
|
+
.remote-panel-body .plugin-hero { padding:0; margin-bottom:18px; }
|
|
89
|
+
.remote-panel-body .plugin-status { font-size:21px; font-weight:650; letter-spacing:-.4px; margin-bottom:7px; }
|
|
90
|
+
.remote-panel-body .plugin-status-desc { font-size:13px; color:var(--dsr-muted); }
|
|
91
|
+
.remote-panel-body .plugin-status-line { display:none; }
|
|
92
|
+
.remote-panel-body .plugin-primary { width:100%; margin-top:16px; min-height:44px; border:1px solid var(--dsr-accent-strong); border-radius:9px; background:var(--dsr-accent-strong); color:var(--dsr-on-accent); font:inherit; font-weight:650; cursor:pointer; }
|
|
93
|
+
.remote-panel-body .plugin-primary:disabled { opacity:.6; cursor:wait; }
|
|
94
|
+
.remote-panel-body .remote-health-path { margin-bottom:18px; padding-bottom:18px; gap:10px; }
|
|
95
|
+
.remote-panel-body .plugin-error { padding:12px; border-radius:9px; background:var(--dsr-error-soft); color:var(--dsr-error); font-size:13px; margin-bottom:14px; }
|
|
96
|
+
.remote-panel-body .plugin-usage { border-top:1px solid var(--dsr-line); padding-top:16px; margin-bottom:18px; }
|
|
97
|
+
.plugin-doctor-entry { margin:0 0 18px; }
|
|
98
|
+
.plugin-primary-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
|
|
99
|
+
.remote-panel-body .plugin-doctor-button { background:var(--dsr-panel); color:var(--dsr-accent-strong); border-color:var(--dsr-accent-line); }
|
|
100
|
+
.plugin-doctor-entry .plugin-action { width:100%; min-height:44px; }
|
|
101
|
+
.plugin-doctor-entry .remote-empty { margin:6px 0 0; }
|
|
102
|
+
.remote-ai-diagnosis { display:flex; flex-wrap:wrap; gap:14px; align-items:center; justify-content:space-between; padding:18px; border-bottom:1px solid var(--dsr-line); }
|
|
103
|
+
.remote-ai-diagnosis p { margin:4px 0 0; }
|
|
104
|
+
.remote-panel-body .plugin-usage .ins-section { padding:12px 0; border-bottom:1px solid var(--dsr-line); }
|
|
105
|
+
.remote-panel-body .plugin-usage .ins-section:first-child { padding-top:0; }
|
|
106
|
+
.remote-panel-body .plugin-usage .ins-section h3 { font-size:12px; color:var(--dsr-muted); }
|
|
107
|
+
.remote-panel-body .plugin-usage .ins-plan { margin:10px 0; padding:12px; background:var(--dsr-panel); border:1px solid var(--dsr-line); border-radius:10px; }
|
|
108
|
+
.remote-panel-body .plugin-usage .ins-source { font-size:11px; }
|
|
109
|
+
.remote-panel-body .hidden { display:none!important; }
|
|
110
|
+
.remote-panel-body .plugin-actions { display:flex; gap:8px; margin:0 0 18px; }
|
|
111
|
+
.remote-panel-body .plugin-action { flex:1; min-height:44px; background:var(--dsr-panel); border:1px solid var(--dsr-line); border-radius:9px; color:var(--dsr-text); font:inherit; font-size:13px; cursor:pointer; }
|
|
112
|
+
.remote-panel-body .plugin-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:20px; margin-top:auto; font-size:12px; color:var(--dsr-muted); }
|
|
113
|
+
.remote-panel-body .plugin-foot a { color:var(--dsr-accent-strong); text-decoration:none; }
|
|
114
|
+
.remote-panel-body .remote-connections { margin-top:18px; }
|
|
115
|
+
.remote-panel-body #plugin-setup { margin-bottom:18px; }
|
|
116
|
+
.remote-panel-body #plugin-setup[hidden] { margin:0; }
|
|
117
|
+
.remote-admin .remote-setup,.remote-panel-body .remote-setup { background:var(--dsr-panel); border-color:var(--dsr-line); box-shadow:none; border-radius:12px; padding:16px; }
|
|
118
|
+
.remote-admin .remote-setup summary,.remote-panel-body .remote-setup summary { font-size:14px; }
|
|
119
|
+
.remote-admin .remote-setup h3,.remote-panel-body .remote-setup h3 { font-size:14px; }
|
|
120
|
+
.remote-admin .remote-setup h3::before,.remote-panel-body .remote-setup h3::before { display:none; }
|
|
121
|
+
.remote-setup .setup-step-nav { display:flex; gap:6px; margin:12px 0; flex-wrap:wrap; }
|
|
122
|
+
.remote-setup .setup-step-nav button { min-height:36px; padding:7px 10px; font-size:12px; background:transparent; }
|
|
123
|
+
.remote-setup .setup-step-nav button[aria-current="step"] { color:var(--dsr-accent-strong); border-color:var(--dsr-accent-line); background:var(--dsr-accent-soft); }
|
|
124
|
+
.remote-setup .setup-step-actions { display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-top:12px; }
|
|
125
|
+
@media (max-width:760px) {
|
|
126
|
+
.remote-admin .admin-wrap { padding:14px 16px 28px; }
|
|
127
|
+
.remote-admin .admin-title { display:flex; flex-wrap:wrap; }
|
|
128
|
+
.remote-admin .admin-title .left { flex:1 1 100%; }
|
|
129
|
+
.remote-admin .admin-title .right { display:flex; flex-wrap:wrap; }
|
|
130
|
+
.remote-admin .remote-tabs { margin-bottom:18px; }
|
|
131
|
+
.remote-admin .remote-tabs button { padding:9px 11px; }
|
|
132
|
+
.remote-admin .remote-task { padding:16px; }
|
|
133
|
+
.remote-admin .remote-page-head h2 { font-size:21px; }
|
|
134
|
+
}
|
|
135
|
+
@media (max-width:440px) {
|
|
136
|
+
.remote-admin .remote-tabs { display:none; }
|
|
137
|
+
.remote-admin .remote-page-picker { display:block; width:100%; min-height:44px; background:var(--dsr-panel); color:var(--dsr-text); border:1px solid var(--dsr-line); border-radius:9px; padding:9px 12px; margin:0 0 18px; font:inherit; }
|
|
138
|
+
}
|
|
139
|
+
@media (max-width:560px) {
|
|
140
|
+
.remote-admin .remote-task-actions { width:100%; }
|
|
141
|
+
.remote-admin .remote-task-actions button { flex:1; }
|
|
142
|
+
.remote-admin .device-key-card,.remote-admin .host-ip-card,.remote-admin .gateway-port-row,.remote-admin .stats-dash { padding:14px; }
|
|
143
|
+
.remote-admin .mini-btn { min-height:42px; }
|
|
144
|
+
.remote-panel-body .plugin-shell { padding:16px; }
|
|
145
|
+
}
|
|
146
|
+
@media (prefers-reduced-motion:reduce) {
|
|
147
|
+
.remote-admin *,.remote-panel-body * { scroll-behavior:auto!important; animation:none!important; transition:none!important; }
|
|
148
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/* Remote presentation, task navigation and six-theme controls. No API writes. */
|
|
2
|
+
'use strict'
|
|
3
|
+
;(function (root) {
|
|
4
|
+
const $ = id => document.getElementById(id)
|
|
5
|
+
const lang = () => root.I18N?.lang === 'en' ? 'en' : 'zh'
|
|
6
|
+
const words = {
|
|
7
|
+
zh: {
|
|
8
|
+
overview:'概览',devices:'设备与访问',network:'连接网络',usage:'用量',diagnostics:'诊断',settings:'设置',
|
|
9
|
+
ready:'远程连接可用',partial:'连接部分可用',unknown:'连接状态尚未确认',stopped:'网关尚未启动',auth:'网关认证需要处理',attention:'网关状态需要检查',upstream:'暂时无法连接 DSH',
|
|
10
|
+
ok:'已响应',error:'暂不可达',warning:'恢复中',waiting:'尚未确认',gateway:'远程网关',realtime:'实时通道',
|
|
11
|
+
first:'连接第一台手机',firstDesc:'电脑保持 DSH 运行,在手机安装 App 后扫码连接。已有 App 可直接配对。',
|
|
12
|
+
add:'添加手机',pair:'已有 App,去配对',install:'安装 App 并连接',check:'检查连接',console:'完整控制台',
|
|
13
|
+
daily:'查看连接、添加手机,或进入控制台管理访问权限。',fault:'查看失败环节和下一步;可用功能仍可继续使用。',
|
|
14
|
+
online:'在线连接',none:'当前没有手机在线。添加手机后会显示在这里。',unavailable:'暂时无法读取连接列表。',
|
|
15
|
+
all:'查看全部',details:'查看详情',onlineState:'在线',offlineState:'离线',web:'浏览器',app:'Android App',anonymous:'未备注的连接',
|
|
16
|
+
address:'连接地址',source:'当前主机',updated:'状态读取于',usageHint:'Token、API 费用与套餐额度按数据来源分别展示。',
|
|
17
|
+
usageWait:'打开此分区后读取主机费用数据。',runtime:'运行与端口',runtimeHint:'停止网关会中断使用它的手机和浏览器连接。',
|
|
18
|
+
advanced:'版本与运行详情',show:'显示令牌',hide:'隐藏令牌',masked:'访问凭据已隐藏',unknownNote:'检查未完成或数据不可用;请稍后刷新或查看诊断。',
|
|
19
|
+
readyNote:'DSH、网关和实时通道均已响应。',stoppedNote:'在电脑端启动网关后,手机才能连接。',
|
|
20
|
+
networkHint:'管理手机可访问的主机地址和云中转。',diagnosticsHint:'已知结果与未知项分开显示,不由缺失数据推断成功。',
|
|
21
|
+
devicesHint:'在线连接、授权设备和 IP 访问记录分别管理。',settingsHint:'保存后以主机回读结果确认是否生效。',
|
|
22
|
+
secure:'凭据仅在主动配对或显示时呈现。',full:'打开完整控制台',start:'启动网关',refresh:'刷新状态',
|
|
23
|
+
counts:'个在线连接',help:'关于与支持',connected:'已连接',publicNote:'手机需要能访问所选地址。'
|
|
24
|
+
},
|
|
25
|
+
en: {
|
|
26
|
+
overview:'Overview',devices:'Devices & access',network:'Network',usage:'Usage',diagnostics:'Diagnostics',settings:'Settings',
|
|
27
|
+
ready:'Remote access is ready',partial:'Connection partially available',unknown:'Connection status unconfirmed',stopped:'Gateway is stopped',auth:'Gateway authentication needs attention',attention:'Check gateway state',upstream:'DSH is unreachable',
|
|
28
|
+
ok:'Responding',error:'Unreachable',warning:'Recovering',waiting:'Unconfirmed',gateway:'Gateway',realtime:'Realtime',
|
|
29
|
+
first:'Connect your first phone',firstDesc:'Keep DSH running. Install the app on your phone, then scan to connect. Already installed? Go straight to pairing.',
|
|
30
|
+
add:'Add a phone',pair:'App installed? Pair now',install:'Install app & connect',check:'Check connection',console:'Full console',
|
|
31
|
+
daily:'Check connections, add a phone, or manage access in the console.',fault:'See the affected connection and next step. Available features can still be used.',
|
|
32
|
+
online:'Online connections',none:'No phone is online. Add a phone to see it here.',unavailable:'Connection list is unavailable.',
|
|
33
|
+
all:'View all',details:'View details',onlineState:'Online',offlineState:'Offline',web:'Browser',app:'Android app',anonymous:'Unnamed connection',
|
|
34
|
+
address:'Address',source:'Current host',updated:'State read at',usageHint:'Tokens, API costs and plan quotas retain their source and accounting definitions.',
|
|
35
|
+
usageWait:'Host cost data loads when this section opens.',runtime:'Gateway & port',runtimeHint:'Stopping the gateway disconnects phones and browsers using it.',
|
|
36
|
+
advanced:'Version & runtime details',show:'Show token',hide:'Hide token',masked:'Access credentials hidden',unknownNote:'A check is pending or data is unavailable. Refresh or open diagnostics.',
|
|
37
|
+
readyNote:'DSH, the gateway and realtime channels are responding.',stoppedNote:'Start the gateway on your computer before connecting your phone.',
|
|
38
|
+
networkHint:'Manage reachable host addresses and cloud relay.',diagnosticsHint:'Known results and unconfirmed checks remain distinct.',
|
|
39
|
+
devicesHint:'Manage connections, device credentials and IP access records separately.',settingsHint:'Changes are confirmed by reading the host state.',
|
|
40
|
+
secure:'Credentials appear only when pairing or explicitly shown.',full:'Open full console',start:'Start gateway',refresh:'Refresh state',
|
|
41
|
+
counts:'online connections',help:'About & support',connected:'Connected',publicNote:'Your phone must reach the selected address.'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const t = key => words[lang()][key] || key
|
|
45
|
+
const esc = value => String(value ?? '').replace(/[&<>"']/g, c => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]))
|
|
46
|
+
const derive = st => root.DshRemoteState.derive(st)
|
|
47
|
+
const stableHtml = (el, html) => { if (el && el.innerHTML !== html) el.innerHTML = html }
|
|
48
|
+
function pathHtml(model) {
|
|
49
|
+
return [['DSH',model.upstream],[t('gateway'),model.gateway],[t('realtime'),model.realtime]].map(([label,status]) =>
|
|
50
|
+
'<div class="remote-path-item"><span>' + esc(label) + '</span><strong class="remote-state-' + status + '">' +
|
|
51
|
+
(status === 'ok' ? '✓ ' : status === 'error' ? '! ' : '· ') + esc(t(status === 'unknown' ? 'waiting' : status)) + '</strong></div>').join('')
|
|
52
|
+
}
|
|
53
|
+
function clientHtml(st, limit = 3) {
|
|
54
|
+
const model = derive(st)
|
|
55
|
+
if (!model.online) return '<p class="remote-empty">' + t('unavailable') + '</p>'
|
|
56
|
+
if (!model.online.length) return '<p class="remote-empty">' + t('none') + '</p>'
|
|
57
|
+
return model.online.slice(0,limit).map(d => '<div class="remote-client"><div><strong>' +
|
|
58
|
+
esc(d.note || t(d.kind === 'app' ? 'app' : 'web')) + '</strong><span>' + esc(d.ip || t('waiting')) +
|
|
59
|
+
'</span></div><span class="remote-state-ok">● ' + t('onlineState') + '</span></div>').join('')
|
|
60
|
+
}
|
|
61
|
+
function reconcileRows(body,html) {
|
|
62
|
+
if (!body || body.innerHTML===html) return
|
|
63
|
+
const staging=document.createElement('tbody'); staging.innerHTML=html
|
|
64
|
+
const keep=new Set()
|
|
65
|
+
for(const [index,fresh] of Array.from(staging.children).entries()) {
|
|
66
|
+
const key=fresh.dataset.remoteKey
|
|
67
|
+
let row=Array.from(body.children).find(el=>el.dataset.remoteKey===key)
|
|
68
|
+
if(row) {
|
|
69
|
+
for(const [i,cell] of Array.from(fresh.children).entries()) {
|
|
70
|
+
const target=row.children[i]
|
|
71
|
+
if(!target){row.append(cell);continue}
|
|
72
|
+
if(target.innerHTML!==cell.innerHTML)target.innerHTML=cell.innerHTML
|
|
73
|
+
for(const attr of cell.attributes)target.setAttribute(attr.name,attr.value)
|
|
74
|
+
}
|
|
75
|
+
} else row=fresh
|
|
76
|
+
keep.add(row)
|
|
77
|
+
if(body.children[index]!==row)body.insertBefore(row,body.children[index]||null)
|
|
78
|
+
}
|
|
79
|
+
for(const row of Array.from(body.children))if(!keep.has(row))row.remove()
|
|
80
|
+
}
|
|
81
|
+
root.DshRemoteUI = { t, derive, pathHtml, clientHtml, reconcileRows }
|
|
82
|
+
const main = $('main-view')
|
|
83
|
+
if (!main || !document.querySelector('.admin-wrap')) return
|
|
84
|
+
document.documentElement.classList.add('remote-admin')
|
|
85
|
+
const keys = ['overview','devices','network','diagnostics','settings']
|
|
86
|
+
const store = {
|
|
87
|
+
get(key) { try { return localStorage.getItem(key) } catch { return null } },
|
|
88
|
+
set(key,value) { try { localStorage.setItem(key,value) } catch {} }
|
|
89
|
+
}
|
|
90
|
+
const nav = document.createElement('nav')
|
|
91
|
+
nav.className = 'remote-tabs'
|
|
92
|
+
nav.setAttribute('role','tablist')
|
|
93
|
+
nav.setAttribute('aria-label','Remote')
|
|
94
|
+
const picker = document.createElement('select')
|
|
95
|
+
picker.className = 'remote-page-picker'
|
|
96
|
+
picker.setAttribute('aria-label','Remote')
|
|
97
|
+
const pages = {}
|
|
98
|
+
const buttons = {}
|
|
99
|
+
for (const key of keys) {
|
|
100
|
+
const button = document.createElement('button')
|
|
101
|
+
button.type = 'button'; button.id = 'remote-tab-' + key
|
|
102
|
+
button.setAttribute('role','tab'); button.setAttribute('aria-controls','remote-page-' + key)
|
|
103
|
+
button.dataset.page = key; nav.append(button); buttons[key] = button
|
|
104
|
+
const option = document.createElement('option'); option.value = key; picker.append(option)
|
|
105
|
+
const page = document.createElement('section')
|
|
106
|
+
page.id = 'remote-page-' + key; page.className = 'remote-page'
|
|
107
|
+
page.setAttribute('role','tabpanel'); page.setAttribute('aria-labelledby',button.id)
|
|
108
|
+
const head = document.createElement('header'); head.className = 'remote-page-head'
|
|
109
|
+
const title = document.createElement('h2'); title.dataset.remoteTitle = key
|
|
110
|
+
const sub = document.createElement('p'); sub.className = 'remote-page-hint'
|
|
111
|
+
head.append(title,sub); page.append(head); pages[key] = page
|
|
112
|
+
}
|
|
113
|
+
main.prepend(nav,picker)
|
|
114
|
+
// Keep destinations connected while moving controls: later ID lookups must
|
|
115
|
+
// still find buttons inside a section that has already been moved.
|
|
116
|
+
Object.values(pages).forEach(page=>main.append(page))
|
|
117
|
+
const add = (page,id,resolve) => { const el = $(id); if(el) pages[page].append(resolve ? resolve(el) : el) }
|
|
118
|
+
const table = $('device-rows')?.closest('.table-wrap')
|
|
119
|
+
const deviceHeading = table?.previousElementSibling
|
|
120
|
+
add('overview','admin-hero')
|
|
121
|
+
const path = document.createElement('div'); path.id = 'remote-health-path'; path.className = 'remote-health-path'; pages.overview.append(path)
|
|
122
|
+
const task = document.createElement('section'); task.className = 'remote-task'
|
|
123
|
+
task.innerHTML = '<div><h3 id="remote-task-title"></h3><p id="remote-task-desc"></p></div><div class="remote-task-actions"><button type="button" id="remote-task-primary" class="remote-primary"></button><button type="button" id="remote-task-pair" class="remote-secondary"></button></div>'
|
|
124
|
+
pages.overview.append(task)
|
|
125
|
+
const connections = document.createElement('section'); connections.className = 'remote-connections'
|
|
126
|
+
connections.innerHTML = '<div class="remote-section-head"><h3 id="remote-online-title"></h3><button type="button" class="remote-link" id="remote-view-devices"></button></div><div id="remote-client-list"></div>'
|
|
127
|
+
pages.overview.append(connections)
|
|
128
|
+
const updated = document.createElement('p'); updated.className = 'remote-updated'; pages.overview.append(updated)
|
|
129
|
+
add('devices','admin-setup')
|
|
130
|
+
add('devices','device-key-enabled',el => el.closest('.device-key-card'))
|
|
131
|
+
add('devices','pair-box')
|
|
132
|
+
if (deviceHeading?.classList.contains('section-head')) pages.devices.append(deviceHeading)
|
|
133
|
+
if (table) pages.devices.append(table)
|
|
134
|
+
add('network','host-ip-card')
|
|
135
|
+
add('network','relay-settings')
|
|
136
|
+
add('diagnostics','doctor-card')
|
|
137
|
+
const runtime = document.createElement('section'); runtime.className='remote-settings-block'
|
|
138
|
+
runtime.innerHTML='<h3 id="remote-runtime-title"></h3><p id="remote-runtime-hint"></p>'
|
|
139
|
+
pages.settings.append(runtime)
|
|
140
|
+
const gatewayButton = $('btn-gateway'); if(gatewayButton) runtime.append(gatewayButton)
|
|
141
|
+
if($('btn-logout'))document.querySelector('.admin-title .right')?.append($('btn-logout'))
|
|
142
|
+
add('settings','gateway-port-row')
|
|
143
|
+
add('settings','login-startup-title',el=>el.closest('section'))
|
|
144
|
+
const advanced = document.createElement('details'); advanced.className='remote-advanced'
|
|
145
|
+
const advancedTitle = document.createElement('summary'); advanced.append(advancedTitle)
|
|
146
|
+
if($('stats')) advanced.append($('stats'))
|
|
147
|
+
pages.settings.append(advanced)
|
|
148
|
+
const reveal = document.createElement('button'); reveal.type='button'; reveal.className='mini-btn'
|
|
149
|
+
reveal.id='remote-token-reveal'; $('shared-token-row')?.querySelector('.token-actions')?.prepend(reveal)
|
|
150
|
+
let state = null, current = 'overview', showingToken = false, visitedHost = ''
|
|
151
|
+
let initialRoute = location.hash.replace(/^#(?:remote\/)?/,'')
|
|
152
|
+
if (!keys.includes(initialRoute)) initialRoute = ''
|
|
153
|
+
function select(key,{persist=true,route=true}={}) {
|
|
154
|
+
if(!keys.includes(key))key='overview'
|
|
155
|
+
const changed=current!==key
|
|
156
|
+
current=key
|
|
157
|
+
for(const entry of keys) {
|
|
158
|
+
pages[entry].hidden=entry!==key
|
|
159
|
+
buttons[entry].setAttribute('aria-selected',String(entry===key))
|
|
160
|
+
buttons[entry].tabIndex=entry===key?0:-1
|
|
161
|
+
}
|
|
162
|
+
picker.value=key
|
|
163
|
+
if(persist && visitedHost)store.set('dshRemotePage:'+visitedHost,key)
|
|
164
|
+
if(route && location.hash!=='#remote/'+key) history.replaceState(null,'',location.pathname+location.search+'#remote/'+key)
|
|
165
|
+
if(key!=='devices') { showingToken=false; mask() }
|
|
166
|
+
if(changed) document.dispatchEvent(new CustomEvent('dsh-remote-section',{detail:{section:key}}))
|
|
167
|
+
}
|
|
168
|
+
function openSetup(step=1) {
|
|
169
|
+
select('devices')
|
|
170
|
+
root.dispatchEvent(new CustomEvent('dsh-remote-setup',{detail:{step}}))
|
|
171
|
+
$('admin-setup')?.scrollIntoView({behavior:'smooth',block:'start'})
|
|
172
|
+
}
|
|
173
|
+
function mask() {
|
|
174
|
+
const token = state?.gatewayAuthError ? '' : state?.token || ''
|
|
175
|
+
if($('token-full')) $('token-full').textContent=token?(showingToken?token:'•••• •••• •••• ••••'):t('waiting')
|
|
176
|
+
reveal.textContent=t(showingToken?'hide':'show')
|
|
177
|
+
reveal.disabled=!token
|
|
178
|
+
reveal.setAttribute('aria-pressed',String(showingToken))
|
|
179
|
+
}
|
|
180
|
+
reveal.addEventListener('click',()=>{showingToken=!showingToken;mask()})
|
|
181
|
+
nav.addEventListener('click',event=>{const button=event.target.closest('[data-page]');if(button)select(button.dataset.page)})
|
|
182
|
+
nav.addEventListener('keydown',event=>{
|
|
183
|
+
const index=keys.indexOf(current)
|
|
184
|
+
const next=event.key==='ArrowRight'?keys[(index+1)%keys.length]:event.key==='ArrowLeft'?keys[(index+keys.length-1)%keys.length]:event.key==='Home'?keys[0]:event.key==='End'?keys.at(-1):''
|
|
185
|
+
if(next){event.preventDefault();select(next);buttons[next].focus()}
|
|
186
|
+
})
|
|
187
|
+
picker.addEventListener('change',()=>select(picker.value))
|
|
188
|
+
root.addEventListener('hashchange',()=>select(location.hash.replace(/^#remote\//,''),{route:false}))
|
|
189
|
+
$('remote-view-devices').addEventListener('click',()=>select('devices'))
|
|
190
|
+
$('remote-task-pair').addEventListener('click',()=>openSetup(2))
|
|
191
|
+
$('remote-task-primary').addEventListener('click',()=>{
|
|
192
|
+
const model=derive(state)
|
|
193
|
+
if(!model.authenticated || ['upstream','partial','unknown'].includes(model.phase))select('diagnostics')
|
|
194
|
+
else openSetup(1)
|
|
195
|
+
})
|
|
196
|
+
document.addEventListener('click',event=>{
|
|
197
|
+
const link=event.target.closest('a[href="#admin-setup"]')
|
|
198
|
+
if(link){event.preventDefault();openSetup(1)}
|
|
199
|
+
})
|
|
200
|
+
function update(next) {
|
|
201
|
+
state=next
|
|
202
|
+
const model=derive(state)
|
|
203
|
+
const host=state ? state.hostname || state.upstream?.url || location.host : visitedHost || location.host
|
|
204
|
+
if(host && host!==visitedHost) {
|
|
205
|
+
visitedHost=host
|
|
206
|
+
select(initialRoute || store.get('dshRemotePage:'+host) || 'overview',{route:true})
|
|
207
|
+
initialRoute=''
|
|
208
|
+
}
|
|
209
|
+
if(model.onlineCount>0)store.set('dshRemotePaired:'+host,'1')
|
|
210
|
+
const first=!model.history && store.get('dshRemotePaired:'+host)!=='1'
|
|
211
|
+
for(const key of keys) {
|
|
212
|
+
buttons[key].textContent=t(key)
|
|
213
|
+
picker.options[keys.indexOf(key)].textContent=t(key)
|
|
214
|
+
pages[key].querySelector('h2').textContent=t(key)
|
|
215
|
+
const hint={devices:'devicesHint',network:'networkHint',usage:'usageHint',diagnostics:'diagnosticsHint',settings:'settingsHint'}[key]
|
|
216
|
+
pages[key].querySelector('.remote-page-hint').textContent=hint?t(hint):state?.hostname || t('source')
|
|
217
|
+
}
|
|
218
|
+
stableHtml(path,pathHtml(model))
|
|
219
|
+
stableHtml($('remote-client-list'),clientHtml(state,5))
|
|
220
|
+
$('remote-online-title').textContent=t('online')
|
|
221
|
+
$('remote-view-devices').textContent=t('all')
|
|
222
|
+
$('remote-task-title').textContent=t(model.phase==='ready'?(first?'first':'add'):model.phase)
|
|
223
|
+
$('remote-task-desc').textContent=t(model.phase==='ready'?(first?'firstDesc':'daily'):model.phase==='stopped'?'stoppedNote':model.phase==='unknown'?'unknownNote':'fault')
|
|
224
|
+
$('remote-task-primary').textContent=t(model.phase==='ready'?(first?'install':'add'):'check')
|
|
225
|
+
$('remote-task-pair').textContent=t('pair')
|
|
226
|
+
$('remote-task-pair').hidden=!model.authenticated
|
|
227
|
+
$('remote-runtime-title').textContent=t('runtime')
|
|
228
|
+
$('remote-runtime-hint').textContent=t('runtimeHint')
|
|
229
|
+
advancedTitle.textContent=t('advanced')
|
|
230
|
+
updated.textContent=t('updated')+' '+new Date().toLocaleTimeString(lang()==='zh'?'zh-CN':'en-US')
|
|
231
|
+
const hero=$('admin-hero')
|
|
232
|
+
if(hero) {
|
|
233
|
+
$('admin-hero-title').textContent=t(model.phase)
|
|
234
|
+
$('admin-hero-desc').textContent=state?.gatewayAuthError || t(model.phase==='ready'?'readyNote':model.phase==='stopped'?'stoppedNote':model.phase==='unknown'?'unknownNote':'fault')
|
|
235
|
+
hero.dataset.remotePhase=model.phase
|
|
236
|
+
}
|
|
237
|
+
if(!model.authenticated)showingToken=false
|
|
238
|
+
mask()
|
|
239
|
+
}
|
|
240
|
+
select(initialRoute || 'overview',{persist:false,route:false})
|
|
241
|
+
root.DshConsole={update,select,openSetup,current:()=>current,conceal(){showingToken=false;mask()}}
|
|
242
|
+
root.addEventListener('dsh-remote-console-state',event=>update(event.detail))
|
|
243
|
+
})(window)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* One visible context card, with the rest suggested by the stacked edges. */
|
|
2
|
+
.session-deck,.session-deck-stage { display:contents; }
|
|
3
|
+
.session-deck[hidden],.session-deck-stage[hidden] { display:none !important; }
|
|
4
|
+
.session-deck[data-mounted] { --deck-card-height:156px; display:block; flex:none; min-width:0; margin:0 0 8px; }
|
|
5
|
+
.ds-view .session-deck[data-mounted] { margin:10px 22px 12px; }
|
|
6
|
+
.session-deck-head { display:flex; align-items:center; gap:6px; min-height:36px; margin-bottom:4px; }
|
|
7
|
+
.session-deck-tabs { display:flex; flex:1; min-width:0; gap:5px; overflow-x:auto; scrollbar-width:none; padding:2px; }
|
|
8
|
+
.session-deck-tabs::-webkit-scrollbar { display:none; }
|
|
9
|
+
.session-deck-tab,.session-deck-control { flex:none; display:inline-flex; align-items:center; justify-content:center; gap:4px; min-height:36px; padding:5px 9px; border:1px solid var(--dsr-line); border-radius:10px; background:var(--dsr-panel); color:var(--dsr-muted); font:inherit; font-size:12px; cursor:pointer; touch-action:manipulation; }
|
|
10
|
+
.session-deck-tab small { min-width:16px; padding:1px 4px; border-radius:6px; background:var(--dsr-bg-2); font-size:10px; }
|
|
11
|
+
.session-deck-tab.needs-action { color:var(--dsr-warning); border-color:var(--dsr-warning-line); }
|
|
12
|
+
.session-deck-tab[aria-pressed="true"] { color:var(--dsr-accent-strong); border-color:var(--dsr-accent-line); background:var(--dsr-accent-soft); font-weight:700; }
|
|
13
|
+
.session-deck-controls { display:flex; align-items:center; flex:none; gap:2px; }
|
|
14
|
+
.session-deck-control { width:30px; padding:2px; font-size:19px; background:transparent; border-color:transparent; }
|
|
15
|
+
.session-deck-position { min-width:28px; text-align:center; color:var(--dsr-muted); font-size:10px; font-variant-numeric:tabular-nums; }
|
|
16
|
+
.session-deck-control:disabled { opacity:.28; cursor:default; }
|
|
17
|
+
.session-deck-tab:focus-visible,.session-deck-control:focus-visible,.session-deck-stage:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; }
|
|
18
|
+
.session-deck[data-mounted] .session-deck-stage { display:block; position:relative; min-width:0; isolation:isolate; touch-action:pan-y pinch-zoom; }
|
|
19
|
+
.session-deck[data-multiple="true"][data-folded="false"] { padding-bottom:8px; }
|
|
20
|
+
.session-deck[data-multiple="true"] .session-deck-stage::before,.session-deck[data-multiple="true"] .session-deck-stage::after { content:""; position:absolute; z-index:-1; inset:7px 7px -4px; border:1px solid var(--dsr-line); border-radius:13px; background:var(--dsr-bg-2); pointer-events:none; }
|
|
21
|
+
.session-deck[data-multiple="true"] .session-deck-stage::before { inset:12px 14px -8px; opacity:.65; }
|
|
22
|
+
.session-deck[data-mounted] #session-cards,.session-deck[data-mounted] .session-attention,.session-deck[data-mounted] #session-pending:not(.hidden),.session-deck[data-mounted] #file-inbox-session:not([hidden]),.session-deck[data-mounted] .session-pending-list,.session-deck[data-mounted] .ds-session-pending-list,.session-deck[data-mounted] #file-inbox-session > .file-inbox-list { display:contents; }
|
|
23
|
+
.session-deck[data-mounted] .session-pending-head,.session-deck[data-mounted] .ds-session-pending-head,.session-deck[data-mounted] #file-inbox-session > .file-inbox-head { display:none; }
|
|
24
|
+
.session-deck[data-mounted] [data-deck-card] { display:none !important; }
|
|
25
|
+
.session-deck[data-mounted] [data-deck-card][data-deck-active] { display:block !important; position:relative; width:100%; min-width:0; max-height:var(--deck-card-height); overflow-y:auto; overscroll-behavior:contain; box-sizing:border-box; margin:0; transform:translateX(var(--deck-drag,0px)); border-radius:13px; scrollbar-width:thin; }
|
|
26
|
+
/* A scroll container terminates touch-action ancestor lookup: include cards and nested scrollers. */
|
|
27
|
+
.session-deck [data-deck-card],.session-deck [data-deck-card] * { touch-action:pan-y pinch-zoom; }
|
|
28
|
+
.session-deck [data-deck-kind="goal"] > .goal-card,.session-deck [data-deck-kind="goal"] > .ds-goal-card { margin:0; box-sizing:border-box; }
|
|
29
|
+
.session-deck[data-mounted] [data-deck-kind="goal"][data-deck-active] { display:flex !important; justify-content:flex-end; }
|
|
30
|
+
.session-deck[data-mounted] [data-deck-card][data-deck-active]:has(details[open]) { max-height:min(48dvh,360px); }
|
|
31
|
+
.session-deck #queue-dock .queue-dock-list,.session-deck #queue-dock .ds-queue-dock-list { max-height:none; }
|
|
32
|
+
.session-deck [data-deck-card] .pc-desc,.session-deck [data-deck-card] .ds-notif-body { max-height:72px; overflow-y:auto; }
|
|
33
|
+
.session-deck .goal-card,.session-deck .ds-goal-card,.session-deck .pending-card,.session-deck .ds-notif-card { padding:10px; }
|
|
34
|
+
.session-deck .goal-obj,.session-deck .ds-goal-obj,.deck-summary-text { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
|
|
35
|
+
.session-deck .goal-card-head,.session-deck .ds-goal-card-head { margin-bottom:4px; }
|
|
36
|
+
.session-deck .goal-card-head .card-title,.session-deck .ds-goal-card-head .ds-card-title { font-size:11px; color:var(--dsr-muted); text-transform:none; }
|
|
37
|
+
.session-deck .goal-actions,.session-deck .ds-goal-actions { gap:6px; margin-top:6px; align-items:flex-start; }
|
|
38
|
+
.session-deck .goal-actions > [data-goal],.session-deck .ds-goal-actions > [data-goal] { flex:none; min-height:34px; padding:5px 11px; }
|
|
39
|
+
.deck-context-head { display:flex; align-items:center; gap:8px; margin-bottom:4px; color:var(--dsr-muted); font-size:11px; }
|
|
40
|
+
.deck-more { min-width:0; margin:0; font-size:11px; color:var(--dsr-muted); }
|
|
41
|
+
.deck-more > summary { display:flex; align-items:center; justify-content:center; min-height:34px; padding:0 6px; cursor:pointer; color:var(--dsr-muted); list-style:none; }
|
|
42
|
+
.deck-more > summary::-webkit-details-marker { display:none; }
|
|
43
|
+
.deck-more > summary::after { content:'⌄'; margin-left:5px; }
|
|
44
|
+
.deck-more[open] > summary::after { content:'⌃'; }
|
|
45
|
+
.deck-more[open] { flex-basis:100%; order:3; }
|
|
46
|
+
.session-deck .goal-actions > .deck-more,.session-deck .ds-goal-actions > .deck-more { margin-left:auto; }
|
|
47
|
+
.deck-full-content { margin:5px 0 0; max-height:240px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; line-height:1.6; text-align:left; color:var(--dsr-text); }
|
|
48
|
+
.deck-full-content p { margin:4px 0; }
|
|
49
|
+
.deck-task-state { display:inline-block; margin-right:6px; color:var(--dsr-muted); font-size:11px; }
|
|
50
|
+
.deck-review-head { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:13px; }
|
|
51
|
+
.deck-review-head strong { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
|
|
52
|
+
.deck-review-badge { flex:none; color:var(--dsr-warning); font-size:10px; }
|
|
53
|
+
.deck-review-reason { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin:4px 0; font-size:12px; line-height:1.45; color:var(--dsr-text); overflow-wrap:anywhere; }
|
|
54
|
+
.deck-argument-preview { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--dsr-muted); font-size:11px; line-height:1.5; }
|
|
55
|
+
.deck-review-footer { display:flex; flex-wrap:wrap; align-items:flex-start; gap:6px; margin-top:7px; }
|
|
56
|
+
.deck-review-footer > .deck-more { margin-left:auto; }
|
|
57
|
+
.deck-decision { min-height:44px; padding:8px 12px; border:1px solid var(--dsr-line); border-radius:9px; background:var(--dsr-panel); color:var(--dsr-text); font:inherit; font-size:12px; cursor:pointer; }
|
|
58
|
+
.deck-decision.primary { color:var(--dsr-accent-strong); background:var(--dsr-accent-soft); border-color:var(--dsr-accent-line); }
|
|
59
|
+
.deck-decision:focus-visible,.deck-more > summary:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; }
|
|
60
|
+
.session-deck .question-summary,.session-deck .ds-question-summary { -webkit-line-clamp:2; }
|
|
61
|
+
@media(min-width:900px) {
|
|
62
|
+
.ds-view .session-deck [data-session-approval][data-deck-active]:not(:has(details[open])) { display:grid !important; grid-template-columns:minmax(0,1fr) auto; column-gap:18px; }
|
|
63
|
+
.ds-view .session-deck .deck-review-head,.ds-view .session-deck .deck-review-reason,.ds-view .session-deck .deck-argument-preview { grid-column:1; }
|
|
64
|
+
.ds-view .session-deck .deck-review-footer { grid-column:2; grid-row:1 / 4; align-self:center; margin:0; }
|
|
65
|
+
.ds-view .session-deck .goal-card:not(:has(details[open])),.ds-view .session-deck .ds-goal-card:not(:has(details[open])) { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:18px; }
|
|
66
|
+
.ds-view .session-deck .ds-goal-card-head,.ds-view .session-deck .ds-goal-obj { grid-column:1; }
|
|
67
|
+
.ds-view .session-deck .ds-goal-card > .ds-goal-actions { grid-column:2; grid-row:1 / 3; align-self:center; margin:0; }
|
|
68
|
+
.ds-view .session-deck [data-deck-kind="todos"][data-deck-active]:not(:has(details[open])) { display:grid !important; grid-template-columns:minmax(0,1fr) auto; column-gap:18px; }
|
|
69
|
+
.ds-view .session-deck [data-deck-kind="todos"] > .deck-context-head,.ds-view .session-deck [data-deck-kind="todos"] > .deck-summary-text { grid-column:1; }
|
|
70
|
+
.ds-view .session-deck [data-deck-kind="todos"] > .deck-more { grid-column:2; grid-row:1 / 3; align-self:center; }
|
|
71
|
+
}
|
|
72
|
+
.session-deck-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
|
|
73
|
+
.approval-ai { grid-column:1; min-width:0; margin:8px 0; padding:8px 0; border-top:1px solid var(--dsr-line); }
|
|
74
|
+
.approval-ai .deck-summary-button { min-height:44px; padding:8px 12px; border:1px solid var(--dsr-line); border-radius:8px; color:var(--dsr-muted); background:var(--dsr-panel); font:inherit; font-size:12px; cursor:pointer; }
|
|
75
|
+
.approval-ai .deck-summary-button:disabled { opacity:.65; cursor:default; }
|
|
76
|
+
.approval-ai .deck-summary-button:focus-visible { outline:2px solid var(--dsr-accent); outline-offset:2px; }
|
|
77
|
+
.approval-ai-copy { margin:6px 0 0; color:var(--dsr-muted); font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
|
|
78
|
+
.session-deck[data-mounted] [data-session-approval][data-deck-active]:has(.approval-ai) { max-height:min(42dvh,320px); }
|
|
79
|
+
@media(max-width:360px) { .session-deck-tab { padding:5px 7px; font-size:11px; } .session-deck-control { width:26px; } }
|