@gluztm/dsh-guard 2.4.0 → 2.4.1
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 +19 -3
- package/README.md +19 -3
- package/lib/client.js +1078 -230
- package/lib/index.mjs +13 -2
- package/lib/inspector.mjs +22 -3
- package/package.json +2 -1
- package/screenshots.json +7 -0
package/lib/client.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Client half of @gluztm/dsh-guard — Cross-platform read-only health
|
|
2
|
+
* Client half of @gluztm/dsh-guard — Cross-platform read-only health, masked key readiness,
|
|
3
|
+
* snapshot timeline, and Windows DSHGuard Desktop Console bridge for DeepSeek Harness.
|
|
3
4
|
*
|
|
4
|
-
* Strictly zero-secret-leak:
|
|
5
|
-
*
|
|
5
|
+
* Strictly zero-secret-leak: never reads, slices, stores, or transmits API keys or tokens.
|
|
6
|
+
* Uses only React.createElement, useState, useEffect, and Component so lightweight ModuleLoader hosts stay compatible.
|
|
6
7
|
*/
|
|
7
8
|
window.__ModuleLoader__.load({
|
|
8
9
|
id: '@gluztm/dsh-guard',
|
|
@@ -12,109 +13,212 @@ window.__ModuleLoader__.load({
|
|
|
12
13
|
|
|
13
14
|
const SIDE_ID = 'dsh-guard'
|
|
14
15
|
const API_BASE = 'api/dsh-guard'
|
|
15
|
-
const STYLE_ID = 'dsh-guard-panel-styles'
|
|
16
|
+
const STYLE_ID = 'dsh-guard-panel-styles-v241'
|
|
17
|
+
const VERSION = '2.4.1'
|
|
18
|
+
const REPO_FALLBACK = 'https://github.com/gluztm/DSHGuard'
|
|
16
19
|
const RELEASE_FALLBACK = 'https://github.com/gluztm/DSHGuard/releases/latest'
|
|
20
|
+
const INSTALLER_FALLBACK = 'https://github.com/gluztm/DSHGuard/releases/download/2.4.1/DSHGuard-Setup-2.4.1.exe'
|
|
17
21
|
|
|
18
22
|
const COPY = {
|
|
19
23
|
zh: {
|
|
20
24
|
brand: 'DSH 守护壳',
|
|
21
25
|
subtitle: '双轨体检 · 脱敏对账 · 快照回望',
|
|
26
|
+
versionPill: `v${VERSION}`,
|
|
22
27
|
refresh: '重新体检',
|
|
23
|
-
refreshing: '
|
|
28
|
+
refreshing: '体检中',
|
|
24
29
|
langSwitch: 'EN',
|
|
25
30
|
healthy: '双轨配置健康',
|
|
26
31
|
unhealthy: (n) => `发现 ${n} 项异常`,
|
|
27
|
-
loading: '
|
|
32
|
+
loading: '正在读取双轨配置、凭据键与快照状态…',
|
|
28
33
|
retry: '重试',
|
|
34
|
+
checkedAt: (t) => `最近体检 ${t}`,
|
|
35
|
+
tabOverview: '总览',
|
|
36
|
+
tabCreds: '凭据',
|
|
37
|
+
tabSnapshots: '快照',
|
|
38
|
+
kpiProfilesLabel: '双轨插件',
|
|
39
|
+
kpiProfilesSub: 'Web / 桌面启用',
|
|
40
|
+
kpiCredsLabel: '凭据就绪',
|
|
41
|
+
kpiCredsSub: '非空环境键',
|
|
42
|
+
kpiSnapsLabel: '变更快照',
|
|
43
|
+
kpiSnapsSub: '桌面守护存档',
|
|
44
|
+
supervisorTitleWinMissing: '安装 DSHGuard 桌面完整版',
|
|
45
|
+
supervisorBadgeWin: 'Windows · 免管理员',
|
|
46
|
+
supervisorDescWinMissing: '伴生插件仅负责 DSH 内只读体检;安装 Windows 桌面控制台可解锁以下日常高频能力:',
|
|
47
|
+
feat1Title: '四协议模型配置与测速',
|
|
48
|
+
feat1Sub: '自动补全 /v1 与 /v1beta',
|
|
49
|
+
feat2Title: 'CC Switch 多源导密钥',
|
|
50
|
+
feat2Sub: '文件拖入与跨端只读导入',
|
|
51
|
+
feat3Title: '插件批量查新防串轨',
|
|
52
|
+
feat3Sub: '万款市场插件安全升级',
|
|
53
|
+
feat4Title: '进程外救援与快照回滚',
|
|
54
|
+
feat4Sub: '启动崩溃时桌面一键还原',
|
|
55
|
+
btnDownloadExe: '直接下载 Windows 安装包 (.exe)',
|
|
56
|
+
btnViewRepo: '主页与动图预览',
|
|
57
|
+
btnRedetect: '已安装?重新检测',
|
|
58
|
+
supervisorTitleWinReady: 'DSHGuard 桌面控制台',
|
|
59
|
+
supervisorBadgeReady: '桌面控制台已就绪',
|
|
60
|
+
supervisorDescWinReady: '已对接本机桌面守护壳,支持四协议模型配置与测速、CC Switch 导入及快照回滚。',
|
|
61
|
+
btnOpenGuard: '打开 DSHGuard 桌面控制台',
|
|
62
|
+
btnOpeningGuard: '正在唤起…',
|
|
63
|
+
supervisorTitleOther: '跨平台只读体检模式',
|
|
64
|
+
supervisorDescOther: (plat) => `当前运行环境为 ${plat},伴生插件双轨体检、凭据脱敏对账与 /guard 命令已全部就绪;Windows 桌面完整版独立提供图形化模型配置、CC Switch 导入与进程外崩溃救援。`,
|
|
65
|
+
btnViewReleases: '查看 Windows 版 Releases',
|
|
29
66
|
profilesTitle: 'Web / 桌面双轨对账',
|
|
30
|
-
webTrack: 'Web
|
|
67
|
+
webTrack: 'Web 引擎',
|
|
31
68
|
desktopTrack: '桌面版',
|
|
32
69
|
missingDir: '未检测到该端配置目录',
|
|
33
|
-
bundlesLabel: '
|
|
34
|
-
depsLabel: '
|
|
35
|
-
patchOk: (n) => (n > 0 ? `Patch 正常 ·
|
|
70
|
+
bundlesLabel: '插件',
|
|
71
|
+
depsLabel: '依赖',
|
|
72
|
+
patchOk: (n) => (n > 0 ? `Patch 正常 · 禁 ${n} 项` : 'Patch 正常'),
|
|
36
73
|
patchMissing: '未建 cordis.patch.yml',
|
|
37
74
|
patchErr: (e) => `Patch 异常:${e}`,
|
|
38
75
|
pkgErr: 'package.json 解析异常',
|
|
39
76
|
missingInDeps: '清单缺依赖',
|
|
40
77
|
unregisteredDeps: '未登记插件',
|
|
41
|
-
|
|
42
|
-
|
|
78
|
+
issuesTitle: '诊断建议',
|
|
79
|
+
issueActionOpen: '在桌面控制台一键排查修复',
|
|
80
|
+
issueActionDownload: '下载桌面控制台辅助排查 (.exe)',
|
|
81
|
+
credsTitle: '凭据脱敏就绪度',
|
|
82
|
+
credsPrivacyHint: '严格零秘密原则:仅核对环境键是否非空,绝不读取、截断或传输真实密钥。',
|
|
83
|
+
credReadyBadge: (ready, total) => `已就绪 ${ready} / ${total}`,
|
|
43
84
|
credMissingFile: '未创建 .credentials.yaml',
|
|
44
|
-
|
|
45
|
-
|
|
85
|
+
credProgressPatch: (ready, total) => `cordis.patch.yml 引用键就绪 ${ready} / ${total}`,
|
|
86
|
+
credProgressFile: (nonEmpty, total) => `.credentials.yaml 非空键 ${nonEmpty} / ${total}`,
|
|
87
|
+
credStatusReady: '已就绪',
|
|
88
|
+
credStatusMissing: '未配置',
|
|
89
|
+
credNoRefs: '当前双端 cordis.patch.yml 暂未引用任何 apiKeyEnv 环境变量。',
|
|
90
|
+
credUpsellTitle: '需要图形化管理模型与密钥?',
|
|
91
|
+
credUpsellDesc: '在 DSHGuard 桌面版「凭据中心」可直接点击卡片编辑 OpenAI / Anthropic / Gemini 接口、测试单模型连通性,或从 CC Switch 与本地 Agent 一键导入。',
|
|
92
|
+
credUpsellOpen: '打开桌面端「凭据中心」',
|
|
93
|
+
credUpsellDownload: '下载桌面完整版开启「凭据中心」(.exe)',
|
|
94
|
+
snapshotsTitle: '变更前快照回望',
|
|
46
95
|
snapshotsTotal: (t) => `共 ${t} 份`,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
issuesTitle: '诊断建议',
|
|
58
|
-
checkedAt: (t) => `最近体检:${t}`,
|
|
59
|
-
errorRecover: '守护壳面板渲染已自动保护恢复',
|
|
60
|
-
guideDesc: '双端配置体检 · 凭据键就绪状态 · 快照历史 · 唤起 DSHGuard',
|
|
96
|
+
snapshotsEmptyTitle: '暂无变更前快照存档',
|
|
97
|
+
snapshotsEmptyDesc: '使用 DSHGuard 桌面控制台执行插件安装、升级或切换配置前,系统都会自动存档以供随时回滚。',
|
|
98
|
+
snapItems: (n) => `${n} 项文件`,
|
|
99
|
+
snapNoReason: '操作前自动快照',
|
|
100
|
+
snapActionOpen: '在桌面端管理 / 回滚快照',
|
|
101
|
+
snapActionDownload: '下载 Windows 桌面版开启自动快照 (.exe)',
|
|
102
|
+
footerNote: `DSHGuard v${VERSION} · 严格零秘密只读伴生模式`,
|
|
103
|
+
footerHome: 'GitHub 主页',
|
|
104
|
+
errorRecover: '守护壳面板已触发渲染保护恢复',
|
|
105
|
+
guideDesc: '双端配置体检 · 凭据键就绪状态 · 快照历史 · 联动 DSHGuard 桌面端',
|
|
61
106
|
},
|
|
62
107
|
en: {
|
|
63
108
|
brand: 'DSHGuard',
|
|
64
109
|
subtitle: 'Dual-Track Health · Masked Keys · Snapshots',
|
|
65
|
-
|
|
66
|
-
|
|
110
|
+
versionPill: `v${VERSION}`,
|
|
111
|
+
refresh: 'Refresh',
|
|
112
|
+
refreshing: 'Checking',
|
|
67
113
|
langSwitch: '中',
|
|
68
114
|
healthy: 'Dual-Track Healthy',
|
|
69
115
|
unhealthy: (n) => `${n} Issue${n === 1 ? '' : 's'} Found`,
|
|
70
|
-
loading: 'Inspecting DSH profiles and
|
|
116
|
+
loading: 'Inspecting DSH profiles, credential readiness, and snapshots…',
|
|
71
117
|
retry: 'Retry',
|
|
118
|
+
checkedAt: (t) => `Checked ${t}`,
|
|
119
|
+
tabOverview: 'Overview',
|
|
120
|
+
tabCreds: 'Credentials',
|
|
121
|
+
tabSnapshots: 'Snapshots',
|
|
122
|
+
kpiProfilesLabel: 'Bundles',
|
|
123
|
+
kpiProfilesSub: 'Web / Desktop',
|
|
124
|
+
kpiCredsLabel: 'Key Slots',
|
|
125
|
+
kpiCredsSub: 'Non-empty env',
|
|
126
|
+
kpiSnapsLabel: 'Snapshots',
|
|
127
|
+
kpiSnapsSub: 'Guard backups',
|
|
128
|
+
supervisorTitleWinMissing: 'Install DSHGuard Desktop Console',
|
|
129
|
+
supervisorBadgeWin: 'Windows · Non-Admin',
|
|
130
|
+
supervisorDescWinMissing: 'This companion plugin stays strictly read-only. Install the Windows desktop app to unlock:',
|
|
131
|
+
feat1Title: '4-Protocol Model Setup & Ping',
|
|
132
|
+
feat1Sub: 'Auto /v1 & /v1beta endpoints',
|
|
133
|
+
feat2Title: 'CC Switch & Multi-Source Import',
|
|
134
|
+
feat2Sub: 'Drop configs or read local agents',
|
|
135
|
+
feat3Title: 'Safe Batch Plugin Updates',
|
|
136
|
+
feat3Sub: '10,700+ catalog, zero cross-track',
|
|
137
|
+
feat4Title: 'Out-of-Band Recovery & Rollback',
|
|
138
|
+
feat4Sub: 'Restore broken startups externally',
|
|
139
|
+
btnDownloadExe: 'Direct Download Windows Installer (.exe)',
|
|
140
|
+
btnViewRepo: 'Homepage & Visual Tour',
|
|
141
|
+
btnRedetect: 'Installed? Re-detect',
|
|
142
|
+
supervisorTitleWinReady: 'DSHGuard Desktop Console',
|
|
143
|
+
supervisorBadgeReady: 'Desktop Console Ready',
|
|
144
|
+
supervisorDescWinReady: 'Connected to your local DSHGuard executable for visual model configuration, CC Switch import, and snapshot rollback.',
|
|
145
|
+
btnOpenGuard: 'Open DSHGuard Desktop Console',
|
|
146
|
+
btnOpeningGuard: 'Launching…',
|
|
147
|
+
supervisorTitleOther: 'Cross-Platform Read-Only Mode',
|
|
148
|
+
supervisorDescOther: (plat) => `Running on ${plat} with full dual-track auditing, masked key checks, and /guard commands. Full out-of-band GUI tools run on Windows.`,
|
|
149
|
+
btnViewReleases: 'View Windows Releases',
|
|
72
150
|
profilesTitle: 'Web / Desktop Profile Alignment',
|
|
73
|
-
webTrack: 'Web
|
|
74
|
-
desktopTrack: 'Desktop
|
|
151
|
+
webTrack: 'Web Engine',
|
|
152
|
+
desktopTrack: 'Desktop',
|
|
75
153
|
missingDir: 'Profile directory not found',
|
|
76
|
-
bundlesLabel: '
|
|
77
|
-
depsLabel: '
|
|
154
|
+
bundlesLabel: 'Enabled',
|
|
155
|
+
depsLabel: 'Deps',
|
|
78
156
|
patchOk: (n) => (n > 0 ? `Patch OK · ${n} disabled` : 'Patch OK'),
|
|
79
157
|
patchMissing: 'No cordis.patch.yml',
|
|
80
158
|
patchErr: (e) => `Patch error: ${e}`,
|
|
81
159
|
pkgErr: 'Invalid package.json',
|
|
82
160
|
missingInDeps: 'Missing in deps',
|
|
83
161
|
unregisteredDeps: 'Unregistered deps',
|
|
84
|
-
|
|
85
|
-
|
|
162
|
+
issuesTitle: 'Diagnostics',
|
|
163
|
+
issueActionOpen: 'Troubleshoot in DSHGuard Desktop',
|
|
164
|
+
issueActionDownload: 'Download Windows Supervisor (.exe)',
|
|
165
|
+
credsTitle: 'Masked Credential Readiness',
|
|
166
|
+
credsPrivacyHint: 'Zero-secret guarantee: checks only whether key names are non-empty, never reading or transmitting secret values.',
|
|
167
|
+
credReadyBadge: (ready, total) => `${ready} / ${total} Ready`,
|
|
86
168
|
credMissingFile: '.credentials.yaml not found',
|
|
87
|
-
|
|
88
|
-
|
|
169
|
+
credProgressPatch: (ready, total) => `Referenced apiKeyEnv keys ready: ${ready} / ${total}`,
|
|
170
|
+
credProgressFile: (nonEmpty, total) => `Non-empty entries in .credentials.yaml: ${nonEmpty} / ${total}`,
|
|
171
|
+
credStatusReady: 'Ready',
|
|
172
|
+
credStatusMissing: 'Missing',
|
|
173
|
+
credNoRefs: 'No apiKeyEnv references detected in either cordis.patch.yml.',
|
|
174
|
+
credUpsellTitle: 'Configure models & keys visually',
|
|
175
|
+
credUpsellDesc: 'Use the desktop Credential Hub to edit OpenAI / Anthropic / Gemini endpoints, test model connectivity, or import non-subscription keys from CC Switch.',
|
|
176
|
+
credUpsellOpen: 'Open Credential Hub in Desktop',
|
|
177
|
+
credUpsellDownload: 'Download Desktop Console for Credential Hub (.exe)',
|
|
178
|
+
snapshotsTitle: 'Pre-Change Snapshot Timeline',
|
|
89
179
|
snapshotsTotal: (t) => `${t} total`,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
guardNotInstalled: 'In-app read-only audit active. Install DSHGuard on Windows for out-of-band snapshot rollback & CC Switch import.',
|
|
99
|
-
downloadRelease: 'Download Windows Supervisor on GitHub Releases',
|
|
100
|
-
issuesTitle: 'Diagnostics',
|
|
101
|
-
checkedAt: (t) => `Last check: ${t}`,
|
|
180
|
+
snapshotsEmptyTitle: 'No pre-change snapshots yet',
|
|
181
|
+
snapshotsEmptyDesc: 'DSHGuard automatically saves config and plugin snapshots before any risky change on Windows so you can roll back cleanly.',
|
|
182
|
+
snapItems: (n) => `${n} files`,
|
|
183
|
+
snapNoReason: 'Automatic checkpoint',
|
|
184
|
+
snapActionOpen: 'Manage / Roll back in Desktop',
|
|
185
|
+
snapActionDownload: 'Download Windows App for Auto-Snapshots (.exe)',
|
|
186
|
+
footerNote: `DSHGuard v${VERSION} · Strictly Read-Only Companion`,
|
|
187
|
+
footerHome: 'GitHub',
|
|
102
188
|
errorRecover: 'Panel recovered by ErrorBoundary',
|
|
103
|
-
guideDesc: '
|
|
189
|
+
guideDesc: 'Dual-track health · Masked key readiness · Snapshots · DSHGuard Desktop bridge',
|
|
104
190
|
},
|
|
105
191
|
}
|
|
106
192
|
|
|
107
193
|
const CSS = `
|
|
194
|
+
@keyframes dshg-spin {
|
|
195
|
+
from { transform: rotate(0deg); }
|
|
196
|
+
to { transform: rotate(360deg); }
|
|
197
|
+
}
|
|
198
|
+
@keyframes dshg-pulse {
|
|
199
|
+
0%, 100% { opacity: 1; }
|
|
200
|
+
50% { opacity: 0.45; }
|
|
201
|
+
}
|
|
108
202
|
.dshg-root {
|
|
109
|
-
--dshg-card: var(--dsw-alias-card-fill, var(--dsw-alias-bg-layer-1, rgba(128, 128,
|
|
110
|
-
--dshg-card-hover: var(--dsw-alias-card-fill-hover, var(--dsw-alias-bg-layer-2, rgba(128, 128,
|
|
111
|
-
--dshg-fill: var(--dsw-alias-fill-l1,
|
|
112
|
-
--dshg-
|
|
113
|
-
--dshg-border
|
|
114
|
-
--dshg-
|
|
115
|
-
--dshg-text
|
|
116
|
-
--dshg-text-
|
|
203
|
+
--dshg-card: var(--dsw-alias-card-fill, var(--dsw-alias-bg-layer-1, rgba(128, 128, 140, 0.08)));
|
|
204
|
+
--dshg-card-hover: var(--dsw-alias-card-fill-hover, var(--dsw-alias-bg-layer-2, rgba(128, 128, 140, 0.14)));
|
|
205
|
+
--dshg-fill: var(--dsw-alias-fill-l1, rgba(128, 128, 140, 0.11));
|
|
206
|
+
--dshg-fill-subtle: var(--dsw-alias-bg-layer-2, rgba(128, 128, 140, 0.06));
|
|
207
|
+
--dshg-border: var(--dsw-alias-border-l1, rgba(128, 128, 140, 0.18));
|
|
208
|
+
--dshg-border-strong: var(--dsw-alias-border-l2, rgba(128, 128, 140, 0.30));
|
|
209
|
+
--dshg-text: var(--dsw-alias-label-primary, inherit);
|
|
210
|
+
--dshg-text-2: var(--dsw-alias-label-secondary, rgba(128, 128, 140, 0.88));
|
|
211
|
+
--dshg-text-3: var(--dsw-alias-label-tertiary, rgba(128, 128, 140, 0.64));
|
|
117
212
|
--dshg-accent: var(--dsw-alias-brand-primary, #2563eb);
|
|
213
|
+
--dshg-accent-soft: rgba(37, 99, 235, 0.10);
|
|
214
|
+
--dshg-accent-border: rgba(59, 130, 246, 0.34);
|
|
215
|
+
--dshg-ok: #16a34a;
|
|
216
|
+
--dshg-ok-soft: rgba(34, 197, 94, 0.12);
|
|
217
|
+
--dshg-ok-border: rgba(34, 197, 94, 0.32);
|
|
218
|
+
--dshg-warn: #d97706;
|
|
219
|
+
--dshg-warn-soft: rgba(245, 158, 11, 0.12);
|
|
220
|
+
--dshg-warn-border: rgba(245, 158, 11, 0.34);
|
|
221
|
+
background: transparent;
|
|
118
222
|
color: var(--dshg-text);
|
|
119
223
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
|
|
120
224
|
display: flex;
|
|
@@ -124,6 +228,8 @@ window.__ModuleLoader__.load({
|
|
|
124
228
|
height: 100%;
|
|
125
229
|
box-sizing: border-box;
|
|
126
230
|
overflow-y: auto;
|
|
231
|
+
font-size: 12px;
|
|
232
|
+
line-height: 1.45;
|
|
127
233
|
}
|
|
128
234
|
.dshg-root[data-variant="main"] {
|
|
129
235
|
max-width: 780px;
|
|
@@ -137,14 +243,17 @@ window.__ModuleLoader__.load({
|
|
|
137
243
|
padding: 11px 12px;
|
|
138
244
|
display: flex;
|
|
139
245
|
flex-direction: column;
|
|
140
|
-
gap:
|
|
246
|
+
gap: 9px;
|
|
247
|
+
}
|
|
248
|
+
.dshg-card-spotlight {
|
|
249
|
+
border: 1px solid var(--dshg-accent-border);
|
|
250
|
+
background: var(--dshg-accent-soft);
|
|
141
251
|
}
|
|
142
252
|
.dshg-header {
|
|
143
253
|
display: flex;
|
|
144
254
|
align-items: center;
|
|
145
255
|
justify-content: space-between;
|
|
146
256
|
gap: 8px;
|
|
147
|
-
flex-wrap: wrap;
|
|
148
257
|
}
|
|
149
258
|
.dshg-brand {
|
|
150
259
|
display: flex;
|
|
@@ -153,23 +262,39 @@ window.__ModuleLoader__.load({
|
|
|
153
262
|
min-width: 0;
|
|
154
263
|
}
|
|
155
264
|
.dshg-logo-wrap {
|
|
156
|
-
width:
|
|
157
|
-
height:
|
|
265
|
+
width: 34px;
|
|
266
|
+
height: 34px;
|
|
158
267
|
border-radius: 9px;
|
|
159
268
|
display: inline-flex;
|
|
160
269
|
align-items: center;
|
|
161
270
|
justify-content: center;
|
|
162
|
-
background:
|
|
163
|
-
border: 1px solid
|
|
164
|
-
color:
|
|
271
|
+
background: var(--dshg-accent-soft);
|
|
272
|
+
border: 1px solid var(--dshg-accent-border);
|
|
273
|
+
color: var(--dshg-accent);
|
|
165
274
|
flex-shrink: 0;
|
|
166
275
|
}
|
|
276
|
+
.dshg-title-row {
|
|
277
|
+
display: flex;
|
|
278
|
+
align-items: center;
|
|
279
|
+
gap: 6px;
|
|
280
|
+
flex-wrap: wrap;
|
|
281
|
+
}
|
|
167
282
|
.dshg-title {
|
|
168
283
|
font-size: 13.5px;
|
|
169
|
-
font-weight:
|
|
284
|
+
font-weight: 600;
|
|
170
285
|
line-height: 1.2;
|
|
171
286
|
letter-spacing: -0.01em;
|
|
172
287
|
}
|
|
288
|
+
.dshg-ver {
|
|
289
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
290
|
+
font-size: 11px;
|
|
291
|
+
font-weight: 500;
|
|
292
|
+
padding: 1px 6px;
|
|
293
|
+
border-radius: 99px;
|
|
294
|
+
border: 1px solid var(--dshg-border);
|
|
295
|
+
background: var(--dshg-fill);
|
|
296
|
+
color: var(--dshg-text-2);
|
|
297
|
+
}
|
|
173
298
|
.dshg-sub {
|
|
174
299
|
font-size: 11px;
|
|
175
300
|
color: var(--dshg-text-2);
|
|
@@ -178,16 +303,16 @@ window.__ModuleLoader__.load({
|
|
|
178
303
|
.dshg-actions {
|
|
179
304
|
display: flex;
|
|
180
305
|
align-items: center;
|
|
181
|
-
gap:
|
|
306
|
+
gap: 5px;
|
|
182
307
|
flex-shrink: 0;
|
|
183
308
|
}
|
|
184
309
|
.dshg-btn {
|
|
185
310
|
display: inline-flex;
|
|
186
311
|
align-items: center;
|
|
187
312
|
justify-content: center;
|
|
188
|
-
gap:
|
|
189
|
-
height:
|
|
190
|
-
padding: 0
|
|
313
|
+
gap: 6px;
|
|
314
|
+
height: 28px;
|
|
315
|
+
padding: 0 10px;
|
|
191
316
|
border-radius: 8px;
|
|
192
317
|
border: 1px solid var(--dshg-border);
|
|
193
318
|
background: var(--dshg-card);
|
|
@@ -195,55 +320,83 @@ window.__ModuleLoader__.load({
|
|
|
195
320
|
font-size: 11.5px;
|
|
196
321
|
font-weight: 500;
|
|
197
322
|
cursor: pointer;
|
|
198
|
-
transition: background 0.15s ease, border-color 0.15s ease;
|
|
323
|
+
transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
|
|
199
324
|
text-decoration: none;
|
|
200
325
|
box-sizing: border-box;
|
|
326
|
+
white-space: nowrap;
|
|
201
327
|
}
|
|
202
328
|
.dshg-btn:hover:not(:disabled) {
|
|
203
329
|
background: var(--dshg-card-hover);
|
|
204
330
|
border-color: var(--dshg-border-strong);
|
|
205
331
|
}
|
|
206
332
|
.dshg-btn:disabled {
|
|
207
|
-
opacity: 0.
|
|
333
|
+
opacity: 0.58;
|
|
208
334
|
cursor: default;
|
|
209
335
|
}
|
|
336
|
+
.dshg-btn-icon {
|
|
337
|
+
width: 28px;
|
|
338
|
+
padding: 0;
|
|
339
|
+
}
|
|
210
340
|
.dshg-btn-primary {
|
|
211
341
|
background: var(--dshg-accent);
|
|
212
342
|
border-color: transparent;
|
|
213
343
|
color: #ffffff;
|
|
214
|
-
height:
|
|
215
|
-
padding: 0
|
|
344
|
+
height: 34px;
|
|
345
|
+
padding: 0 14px;
|
|
346
|
+
font-size: 12.5px;
|
|
216
347
|
font-weight: 600;
|
|
217
348
|
width: 100%;
|
|
349
|
+
border-radius: 9px;
|
|
218
350
|
}
|
|
219
351
|
.dshg-btn-primary:hover:not(:disabled) {
|
|
220
352
|
background: var(--dshg-accent);
|
|
221
|
-
|
|
353
|
+
border-color: transparent;
|
|
354
|
+
opacity: 0.92;
|
|
355
|
+
}
|
|
356
|
+
.dshg-btn-row {
|
|
357
|
+
display: grid;
|
|
358
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
359
|
+
gap: 6px;
|
|
360
|
+
}
|
|
361
|
+
.dshg-btn-row .dshg-btn {
|
|
362
|
+
width: 100%;
|
|
363
|
+
padding: 0 8px;
|
|
364
|
+
font-size: 11px;
|
|
365
|
+
}
|
|
366
|
+
.dshg-spin {
|
|
367
|
+
animation: dshg-spin 0.9s linear infinite;
|
|
222
368
|
}
|
|
223
369
|
.dshg-badge {
|
|
224
370
|
display: inline-flex;
|
|
225
371
|
align-items: center;
|
|
226
372
|
gap: 5px;
|
|
227
|
-
padding:
|
|
373
|
+
padding: 2px 8px;
|
|
228
374
|
border-radius: 99px;
|
|
229
375
|
font-size: 11px;
|
|
230
|
-
font-weight:
|
|
376
|
+
font-weight: 500;
|
|
231
377
|
border: 1px solid transparent;
|
|
232
378
|
width: fit-content;
|
|
233
379
|
}
|
|
380
|
+
.dshg-dot {
|
|
381
|
+
width: 6px;
|
|
382
|
+
height: 6px;
|
|
383
|
+
border-radius: 50%;
|
|
384
|
+
background: currentColor;
|
|
385
|
+
animation: dshg-pulse 2.2s ease-in-out infinite;
|
|
386
|
+
}
|
|
234
387
|
.dshg-badge[data-tone="ok"] {
|
|
235
|
-
background:
|
|
236
|
-
border-color:
|
|
237
|
-
color: #
|
|
388
|
+
background: var(--dshg-ok-soft);
|
|
389
|
+
border-color: var(--dshg-ok-border);
|
|
390
|
+
color: #10b981;
|
|
238
391
|
}
|
|
239
392
|
.dshg-badge[data-tone="warn"] {
|
|
240
|
-
background:
|
|
241
|
-
border-color:
|
|
242
|
-
color: #
|
|
393
|
+
background: var(--dshg-warn-soft);
|
|
394
|
+
border-color: var(--dshg-warn-border);
|
|
395
|
+
color: #d97706;
|
|
243
396
|
}
|
|
244
397
|
.dshg-badge[data-tone="blue"] {
|
|
245
|
-
background:
|
|
246
|
-
border-color:
|
|
398
|
+
background: var(--dshg-accent-soft);
|
|
399
|
+
border-color: var(--dshg-accent-border);
|
|
247
400
|
color: #3b82f6;
|
|
248
401
|
}
|
|
249
402
|
.dshg-badge[data-tone="muted"] {
|
|
@@ -251,19 +404,136 @@ window.__ModuleLoader__.load({
|
|
|
251
404
|
border-color: var(--dshg-border);
|
|
252
405
|
color: var(--dshg-text-2);
|
|
253
406
|
}
|
|
407
|
+
.dshg-kpi-strip {
|
|
408
|
+
display: grid;
|
|
409
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
410
|
+
gap: 6px;
|
|
411
|
+
}
|
|
412
|
+
.dshg-kpi {
|
|
413
|
+
border: 1px solid var(--dshg-border);
|
|
414
|
+
background: var(--dshg-card);
|
|
415
|
+
border-radius: 10px;
|
|
416
|
+
padding: 8px 9px;
|
|
417
|
+
display: flex;
|
|
418
|
+
flex-direction: column;
|
|
419
|
+
gap: 2px;
|
|
420
|
+
text-align: left;
|
|
421
|
+
cursor: pointer;
|
|
422
|
+
color: var(--dshg-text);
|
|
423
|
+
transition: border-color 0.15s ease, background 0.15s ease;
|
|
424
|
+
}
|
|
425
|
+
.dshg-kpi:hover {
|
|
426
|
+
background: var(--dshg-card-hover);
|
|
427
|
+
border-color: var(--dshg-border-strong);
|
|
428
|
+
}
|
|
429
|
+
.dshg-kpi[data-active="true"] {
|
|
430
|
+
border-color: var(--dshg-accent-border);
|
|
431
|
+
background: var(--dshg-accent-soft);
|
|
432
|
+
}
|
|
433
|
+
.dshg-kpi-label {
|
|
434
|
+
font-size: 11px;
|
|
435
|
+
color: var(--dshg-text-2);
|
|
436
|
+
}
|
|
437
|
+
.dshg-kpi-val {
|
|
438
|
+
font-size: 14px;
|
|
439
|
+
font-weight: 600;
|
|
440
|
+
font-variant-numeric: tabular-nums;
|
|
441
|
+
line-height: 1.25;
|
|
442
|
+
}
|
|
443
|
+
.dshg-kpi-sub {
|
|
444
|
+
font-size: 11px;
|
|
445
|
+
color: var(--dshg-text-3);
|
|
446
|
+
white-space: nowrap;
|
|
447
|
+
overflow: hidden;
|
|
448
|
+
text-overflow: ellipsis;
|
|
449
|
+
}
|
|
450
|
+
.dshg-seg {
|
|
451
|
+
display: grid;
|
|
452
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
453
|
+
gap: 4px;
|
|
454
|
+
padding: 3px;
|
|
455
|
+
border-radius: 10px;
|
|
456
|
+
border: 1px solid var(--dshg-border);
|
|
457
|
+
background: var(--dshg-fill-subtle);
|
|
458
|
+
}
|
|
459
|
+
.dshg-seg-btn {
|
|
460
|
+
height: 27px;
|
|
461
|
+
border: 1px solid transparent;
|
|
462
|
+
border-radius: 7px;
|
|
463
|
+
background: transparent;
|
|
464
|
+
color: var(--dshg-text-2);
|
|
465
|
+
font-size: 11.5px;
|
|
466
|
+
font-weight: 500;
|
|
467
|
+
cursor: pointer;
|
|
468
|
+
display: inline-flex;
|
|
469
|
+
align-items: center;
|
|
470
|
+
justify-content: center;
|
|
471
|
+
gap: 5px;
|
|
472
|
+
transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
|
|
473
|
+
}
|
|
474
|
+
.dshg-seg-btn:hover {
|
|
475
|
+
color: var(--dshg-text);
|
|
476
|
+
}
|
|
477
|
+
.dshg-seg-btn[data-active="true"] {
|
|
478
|
+
background: var(--dshg-card);
|
|
479
|
+
border-color: var(--dshg-border);
|
|
480
|
+
color: var(--dshg-text);
|
|
481
|
+
font-weight: 600;
|
|
482
|
+
}
|
|
483
|
+
.dshg-seg-dot {
|
|
484
|
+
width: 5px;
|
|
485
|
+
height: 5px;
|
|
486
|
+
border-radius: 50%;
|
|
487
|
+
background: #f59e0b;
|
|
488
|
+
}
|
|
254
489
|
.dshg-sec-head {
|
|
255
490
|
display: flex;
|
|
256
491
|
align-items: center;
|
|
257
492
|
justify-content: space-between;
|
|
258
493
|
gap: 8px;
|
|
494
|
+
font-size: 12px;
|
|
495
|
+
font-weight: 600;
|
|
496
|
+
color: var(--dshg-text);
|
|
497
|
+
}
|
|
498
|
+
.dshg-sec-sub {
|
|
499
|
+
font-size: 11px;
|
|
500
|
+
color: var(--dshg-text-2);
|
|
501
|
+
line-height: 1.45;
|
|
502
|
+
}
|
|
503
|
+
.dshg-feat-grid {
|
|
504
|
+
display: grid;
|
|
505
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
506
|
+
gap: 6px;
|
|
507
|
+
}
|
|
508
|
+
.dshg-feat-item {
|
|
509
|
+
border: 1px solid var(--dshg-border);
|
|
510
|
+
background: var(--dshg-card);
|
|
511
|
+
border-radius: 9px;
|
|
512
|
+
padding: 8px 9px;
|
|
513
|
+
display: flex;
|
|
514
|
+
align-items: flex-start;
|
|
515
|
+
gap: 7px;
|
|
516
|
+
}
|
|
517
|
+
.dshg-feat-ico {
|
|
518
|
+
color: var(--dshg-accent);
|
|
519
|
+
flex-shrink: 0;
|
|
520
|
+
margin-top: 1px;
|
|
521
|
+
}
|
|
522
|
+
.dshg-feat-t {
|
|
259
523
|
font-size: 11.5px;
|
|
260
524
|
font-weight: 600;
|
|
525
|
+
line-height: 1.25;
|
|
526
|
+
}
|
|
527
|
+
.dshg-feat-s {
|
|
528
|
+
font-size: 11px;
|
|
261
529
|
color: var(--dshg-text-2);
|
|
530
|
+
margin-top: 2px;
|
|
531
|
+
line-height: 1.3;
|
|
262
532
|
}
|
|
263
533
|
.dshg-profile-grid {
|
|
264
534
|
display: grid;
|
|
265
|
-
grid-template-columns: repeat(auto-fit, minmax(
|
|
266
|
-
gap:
|
|
535
|
+
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
536
|
+
gap: 7px;
|
|
267
537
|
}
|
|
268
538
|
.dshg-subcard {
|
|
269
539
|
border: 1px solid var(--dshg-border);
|
|
@@ -272,7 +542,7 @@ window.__ModuleLoader__.load({
|
|
|
272
542
|
display: flex;
|
|
273
543
|
flex-direction: column;
|
|
274
544
|
gap: 6px;
|
|
275
|
-
background:
|
|
545
|
+
background: var(--dshg-fill-subtle);
|
|
276
546
|
}
|
|
277
547
|
.dshg-row {
|
|
278
548
|
display: flex;
|
|
@@ -288,7 +558,7 @@ window.__ModuleLoader__.load({
|
|
|
288
558
|
}
|
|
289
559
|
.dshg-pill {
|
|
290
560
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
291
|
-
font-size:
|
|
561
|
+
font-size: 11px;
|
|
292
562
|
padding: 2px 7px;
|
|
293
563
|
border-radius: 6px;
|
|
294
564
|
border: 1px solid var(--dshg-border);
|
|
@@ -296,41 +566,120 @@ window.__ModuleLoader__.load({
|
|
|
296
566
|
color: var(--dshg-text);
|
|
297
567
|
word-break: break-all;
|
|
298
568
|
}
|
|
299
|
-
.dshg-pill[data-tone="ok"] {
|
|
300
|
-
background: rgba(34, 197, 94, 0.12);
|
|
301
|
-
border-color: rgba(34, 197, 94, 0.32);
|
|
302
|
-
color: #22c55e;
|
|
303
|
-
}
|
|
304
569
|
.dshg-pill[data-tone="warn"] {
|
|
305
|
-
background:
|
|
306
|
-
border-color:
|
|
570
|
+
background: var(--dshg-warn-soft);
|
|
571
|
+
border-color: var(--dshg-warn-border);
|
|
307
572
|
color: #f59e0b;
|
|
308
573
|
}
|
|
309
|
-
.dshg-
|
|
574
|
+
.dshg-progress-wrap {
|
|
575
|
+
display: flex;
|
|
576
|
+
flex-direction: column;
|
|
577
|
+
gap: 5px;
|
|
578
|
+
}
|
|
579
|
+
.dshg-progress-track {
|
|
580
|
+
height: 5px;
|
|
581
|
+
border-radius: 99px;
|
|
582
|
+
background: var(--dshg-fill);
|
|
583
|
+
overflow: hidden;
|
|
584
|
+
}
|
|
585
|
+
.dshg-progress-fill {
|
|
586
|
+
height: 100%;
|
|
587
|
+
border-radius: 99px;
|
|
588
|
+
background: #22c55e;
|
|
589
|
+
transition: width 0.25s ease;
|
|
590
|
+
}
|
|
591
|
+
.dshg-cred-list {
|
|
310
592
|
display: flex;
|
|
311
593
|
flex-direction: column;
|
|
312
594
|
gap: 6px;
|
|
313
595
|
}
|
|
596
|
+
.dshg-cred-item {
|
|
597
|
+
border: 1px solid var(--dshg-border);
|
|
598
|
+
background: var(--dshg-fill-subtle);
|
|
599
|
+
border-radius: 9px;
|
|
600
|
+
padding: 7px 10px;
|
|
601
|
+
display: flex;
|
|
602
|
+
align-items: center;
|
|
603
|
+
justify-content: space-between;
|
|
604
|
+
gap: 8px;
|
|
605
|
+
}
|
|
606
|
+
.dshg-cred-key {
|
|
607
|
+
display: inline-flex;
|
|
608
|
+
align-items: center;
|
|
609
|
+
gap: 6px;
|
|
610
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
611
|
+
font-size: 11.5px;
|
|
612
|
+
font-weight: 500;
|
|
613
|
+
min-width: 0;
|
|
614
|
+
word-break: break-all;
|
|
615
|
+
}
|
|
616
|
+
.dshg-timeline {
|
|
617
|
+
display: flex;
|
|
618
|
+
flex-direction: column;
|
|
619
|
+
gap: 7px;
|
|
620
|
+
}
|
|
314
621
|
.dshg-snap-item {
|
|
315
622
|
border: 1px solid var(--dshg-border);
|
|
316
|
-
border-radius:
|
|
317
|
-
padding:
|
|
623
|
+
border-radius: 9px;
|
|
624
|
+
padding: 8px 10px;
|
|
318
625
|
display: flex;
|
|
319
626
|
flex-direction: column;
|
|
320
|
-
gap:
|
|
321
|
-
background:
|
|
627
|
+
gap: 4px;
|
|
628
|
+
background: var(--dshg-fill-subtle);
|
|
629
|
+
}
|
|
630
|
+
.dshg-snap-head {
|
|
631
|
+
display: flex;
|
|
632
|
+
align-items: center;
|
|
633
|
+
justify-content: space-between;
|
|
634
|
+
gap: 6px;
|
|
635
|
+
}
|
|
636
|
+
.dshg-snap-title {
|
|
637
|
+
display: inline-flex;
|
|
638
|
+
align-items: center;
|
|
639
|
+
gap: 6px;
|
|
640
|
+
font-size: 12px;
|
|
641
|
+
font-weight: 500;
|
|
642
|
+
min-width: 0;
|
|
643
|
+
}
|
|
644
|
+
.dshg-track-dot {
|
|
645
|
+
width: 7px;
|
|
646
|
+
height: 7px;
|
|
647
|
+
border-radius: 50%;
|
|
648
|
+
flex-shrink: 0;
|
|
322
649
|
}
|
|
323
650
|
.dshg-mono {
|
|
324
651
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
325
652
|
font-size: 11px;
|
|
326
653
|
word-break: break-all;
|
|
654
|
+
color: var(--dshg-text-2);
|
|
655
|
+
}
|
|
656
|
+
.dshg-path-box {
|
|
657
|
+
border: 1px solid var(--dshg-border);
|
|
658
|
+
border-radius: 8px;
|
|
659
|
+
background: var(--dshg-fill-subtle);
|
|
660
|
+
padding: 6px 9px;
|
|
661
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
662
|
+
font-size: 11px;
|
|
663
|
+
color: var(--dshg-text-2);
|
|
664
|
+
word-break: break-all;
|
|
665
|
+
}
|
|
666
|
+
.dshg-empty {
|
|
667
|
+
border: 1px dashed var(--dshg-border-strong);
|
|
668
|
+
border-radius: 10px;
|
|
669
|
+
padding: 16px 12px;
|
|
670
|
+
display: flex;
|
|
671
|
+
flex-direction: column;
|
|
672
|
+
align-items: center;
|
|
673
|
+
text-align: center;
|
|
674
|
+
gap: 7px;
|
|
675
|
+
color: var(--dshg-text-2);
|
|
327
676
|
}
|
|
328
677
|
.dshg-notice {
|
|
329
678
|
padding: 8px 10px;
|
|
330
679
|
border-radius: 9px;
|
|
331
680
|
font-size: 11.5px;
|
|
332
|
-
border: 1px solid
|
|
333
|
-
background:
|
|
681
|
+
border: 1px solid var(--dshg-accent-border);
|
|
682
|
+
background: var(--dshg-accent-soft);
|
|
334
683
|
color: var(--dshg-text);
|
|
335
684
|
}
|
|
336
685
|
.dshg-error {
|
|
@@ -338,9 +687,26 @@ window.__ModuleLoader__.load({
|
|
|
338
687
|
border-radius: 9px;
|
|
339
688
|
font-size: 11.5px;
|
|
340
689
|
border: 1px solid rgba(239, 68, 68, 0.4);
|
|
341
|
-
background: rgba(239, 68, 68, 0.
|
|
690
|
+
background: rgba(239, 68, 68, 0.11);
|
|
342
691
|
color: #f87171;
|
|
343
692
|
}
|
|
693
|
+
.dshg-footer {
|
|
694
|
+
display: flex;
|
|
695
|
+
align-items: center;
|
|
696
|
+
justify-content: space-between;
|
|
697
|
+
gap: 8px;
|
|
698
|
+
padding: 2px 4px 4px;
|
|
699
|
+
font-size: 11px;
|
|
700
|
+
color: var(--dshg-text-3);
|
|
701
|
+
}
|
|
702
|
+
.dshg-footer a {
|
|
703
|
+
color: var(--dshg-text-2);
|
|
704
|
+
text-decoration: none;
|
|
705
|
+
}
|
|
706
|
+
.dshg-footer a:hover {
|
|
707
|
+
color: var(--dshg-text);
|
|
708
|
+
text-decoration: underline;
|
|
709
|
+
}
|
|
344
710
|
`
|
|
345
711
|
|
|
346
712
|
function ensureStyles() {
|
|
@@ -354,6 +720,7 @@ window.__ModuleLoader__.load({
|
|
|
354
720
|
|
|
355
721
|
const store = {
|
|
356
722
|
lang: 'zh',
|
|
723
|
+
tab: 'overview',
|
|
357
724
|
loading: false,
|
|
358
725
|
launching: false,
|
|
359
726
|
error: '',
|
|
@@ -369,7 +736,7 @@ window.__ModuleLoader__.load({
|
|
|
369
736
|
try {
|
|
370
737
|
listener()
|
|
371
738
|
} catch {
|
|
372
|
-
// Ignore
|
|
739
|
+
// Ignore subscriber errors safely.
|
|
373
740
|
}
|
|
374
741
|
}
|
|
375
742
|
}
|
|
@@ -441,7 +808,15 @@ window.__ModuleLoader__.load({
|
|
|
441
808
|
const d = new Date(value)
|
|
442
809
|
if (Number.isNaN(d.getTime())) return String(value)
|
|
443
810
|
const p = (n) => String(n).padStart(2, '0')
|
|
444
|
-
return `${d.
|
|
811
|
+
return `${d.getMonth() + 1}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
function formatClockOnly(value) {
|
|
815
|
+
if (!value) return ''
|
|
816
|
+
const d = new Date(value)
|
|
817
|
+
if (Number.isNaN(d.getTime())) return String(value)
|
|
818
|
+
const p = (n) => String(n).padStart(2, '0')
|
|
819
|
+
return `${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`
|
|
445
820
|
}
|
|
446
821
|
|
|
447
822
|
/** Crisp Whale-Shield glyph rendered in currentColor for tabs & rail icons. */
|
|
@@ -461,7 +836,7 @@ window.__ModuleLoader__.load({
|
|
|
461
836
|
strokeLinejoin: 'round',
|
|
462
837
|
'aria-hidden': true,
|
|
463
838
|
focusable: false,
|
|
464
|
-
style: { display: 'block' },
|
|
839
|
+
style: { display: 'block', flexShrink: 0 },
|
|
465
840
|
},
|
|
466
841
|
h('path', { d: 'M12 2.8 4.8 5.8v5.7c0 4.6 3.1 8.3 7.2 9.7 4.1-1.4 7.2-5.1 7.2-9.7V5.8L12 2.8Z' }),
|
|
467
842
|
h('path', { d: 'M8.5 13c.8-2 2.5-3 4.3-2.6 1.5.3 2.5 1.3 3.2 2.2.8-.6 1.4-1.3 1.7-2.2' }),
|
|
@@ -469,6 +844,102 @@ window.__ModuleLoader__.load({
|
|
|
469
844
|
)
|
|
470
845
|
}
|
|
471
846
|
|
|
847
|
+
/** Flat outline SVG icon set (zero emoji). */
|
|
848
|
+
function SvgIcon({ name, size = 14, className = '' }) {
|
|
849
|
+
const common = {
|
|
850
|
+
width: size,
|
|
851
|
+
height: size,
|
|
852
|
+
viewBox: '0 0 24 24',
|
|
853
|
+
fill: 'none',
|
|
854
|
+
stroke: 'currentColor',
|
|
855
|
+
strokeWidth: 1.85,
|
|
856
|
+
strokeLinecap: 'round',
|
|
857
|
+
strokeLinejoin: 'round',
|
|
858
|
+
'aria-hidden': true,
|
|
859
|
+
focusable: false,
|
|
860
|
+
className: className || undefined,
|
|
861
|
+
style: { display: 'block', flexShrink: 0 },
|
|
862
|
+
}
|
|
863
|
+
switch (name) {
|
|
864
|
+
case 'refresh':
|
|
865
|
+
return h(
|
|
866
|
+
'svg',
|
|
867
|
+
common,
|
|
868
|
+
h('path', { d: 'M20 11a8.1 8.1 0 0 0-15.5-2m-.5-4v4h4' }),
|
|
869
|
+
h('path', { d: 'M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4' }),
|
|
870
|
+
)
|
|
871
|
+
case 'download':
|
|
872
|
+
return h(
|
|
873
|
+
'svg',
|
|
874
|
+
common,
|
|
875
|
+
h('path', { d: 'M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2' }),
|
|
876
|
+
h('path', { d: 'M7 11l5 5 5-5' }),
|
|
877
|
+
h('path', { d: 'M12 4v12' }),
|
|
878
|
+
)
|
|
879
|
+
case 'external':
|
|
880
|
+
return h(
|
|
881
|
+
'svg',
|
|
882
|
+
common,
|
|
883
|
+
h('path', { d: 'M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6' }),
|
|
884
|
+
h('path', { d: 'M11 13l9-9' }),
|
|
885
|
+
h('path', { d: 'M15 4h5v5' }),
|
|
886
|
+
)
|
|
887
|
+
case 'window':
|
|
888
|
+
return h(
|
|
889
|
+
'svg',
|
|
890
|
+
common,
|
|
891
|
+
h('rect', { x: 3, y: 4, width: 18, height: 16, rx: 3 }),
|
|
892
|
+
h('path', { d: 'M3 9h18' }),
|
|
893
|
+
h('path', { d: 'M10 14.5l2.5-2.5 2.5 2.5' }),
|
|
894
|
+
)
|
|
895
|
+
case 'bolt':
|
|
896
|
+
return h('svg', common, h('path', { d: 'M13 3L4 14h7l-1 7 9-11h-7l1-7z' }))
|
|
897
|
+
case 'key':
|
|
898
|
+
return h(
|
|
899
|
+
'svg',
|
|
900
|
+
common,
|
|
901
|
+
h('circle', { cx: 8.5, cy: 15.5, r: 4.5 }),
|
|
902
|
+
h('path', { d: 'M11.7 12.3L19 5' }),
|
|
903
|
+
h('path', { d: 'M16.5 7.5l2 2' }),
|
|
904
|
+
h('path', { d: 'M14 10l2 2' }),
|
|
905
|
+
)
|
|
906
|
+
case 'layers':
|
|
907
|
+
return h(
|
|
908
|
+
'svg',
|
|
909
|
+
common,
|
|
910
|
+
h('path', { d: 'M12 3l9 4.5-9 4.5-9-4.5 9-4.5z' }),
|
|
911
|
+
h('path', { d: 'M3 12l9 4.5 9-4.5' }),
|
|
912
|
+
h('path', { d: 'M3 16.5l9 4.5 9-4.5' }),
|
|
913
|
+
)
|
|
914
|
+
case 'shield':
|
|
915
|
+
return h(
|
|
916
|
+
'svg',
|
|
917
|
+
common,
|
|
918
|
+
h('path', { d: 'M12 3l7.5 3v6c0 4.5-3.2 8.2-7.5 9.5C7.7 20.2 4.5 16.5 4.5 12V6L12 3z' }),
|
|
919
|
+
h('path', { d: 'M9 12l2 2 4-4' }),
|
|
920
|
+
)
|
|
921
|
+
case 'clock':
|
|
922
|
+
return h(
|
|
923
|
+
'svg',
|
|
924
|
+
common,
|
|
925
|
+
h('circle', { cx: 12, cy: 12, r: 9 }),
|
|
926
|
+
h('path', { d: 'M12 7v5l3 2' }),
|
|
927
|
+
)
|
|
928
|
+
case 'check':
|
|
929
|
+
return h('svg', common, h('path', { d: 'M5 12l5 5 9-9' }))
|
|
930
|
+
case 'alert':
|
|
931
|
+
return h(
|
|
932
|
+
'svg',
|
|
933
|
+
common,
|
|
934
|
+
h('path', { d: 'M12 9v4' }),
|
|
935
|
+
h('path', { d: 'M10.4 4.3L3.1 17a1.8 1.8 0 0 0 1.6 2.7h14.6a1.8 1.8 0 0 0 1.6-2.7L13.6 4.3a1.8 1.8 0 0 0-3.2 0z' }),
|
|
936
|
+
h('circle', { cx: 12, cy: 16.3, r: 0.6, fill: 'currentColor' }),
|
|
937
|
+
)
|
|
938
|
+
default:
|
|
939
|
+
return null
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
|
|
472
943
|
class GuardErrorBoundary extends React.Component {
|
|
473
944
|
constructor(props) {
|
|
474
945
|
super(props)
|
|
@@ -528,13 +999,13 @@ window.__ModuleLoader__.load({
|
|
|
528
999
|
)
|
|
529
1000
|
}
|
|
530
1001
|
|
|
531
|
-
const
|
|
532
|
-
const patchText = !
|
|
1002
|
+
const patchInfo = profile.patch || {}
|
|
1003
|
+
const patchText = !patchInfo.exists
|
|
533
1004
|
? t.patchMissing
|
|
534
|
-
:
|
|
535
|
-
? t.patchOk(
|
|
536
|
-
: t.patchErr(
|
|
537
|
-
const patchTone =
|
|
1005
|
+
: patchInfo.syntaxOk
|
|
1006
|
+
? t.patchOk(patchInfo.disabledCount || 0)
|
|
1007
|
+
: t.patchErr(patchInfo.error || 'YAML')
|
|
1008
|
+
const patchTone = patchInfo.exists && !patchInfo.syntaxOk ? 'warn' : 'ok'
|
|
538
1009
|
|
|
539
1010
|
return h(
|
|
540
1011
|
'div',
|
|
@@ -545,11 +1016,16 @@ window.__ModuleLoader__.load({
|
|
|
545
1016
|
h('span', { className: 'dshg-badge', 'data-tone': trackTone }, trackName),
|
|
546
1017
|
h(
|
|
547
1018
|
'span',
|
|
548
|
-
{ style: { fontSize: 11, color: 'var(--dshg-text-2)' } },
|
|
549
|
-
`${
|
|
1019
|
+
{ style: { fontSize: 11, color: 'var(--dshg-text-2)', fontVariantNumeric: 'tabular-nums', whiteSpace: 'nowrap' } },
|
|
1020
|
+
`${profile.bundlesCount} ${t.bundlesLabel} · ${profile.dependenciesCount} ${t.depsLabel}`,
|
|
550
1021
|
),
|
|
551
1022
|
),
|
|
552
|
-
h(
|
|
1023
|
+
h(
|
|
1024
|
+
'div',
|
|
1025
|
+
{ className: 'dshg-badge', 'data-tone': patchTone, style: { whiteSpace: 'nowrap' } },
|
|
1026
|
+
h(SvgIcon, { name: patchTone === 'ok' ? 'check' : 'alert', size: 11 }),
|
|
1027
|
+
patchText,
|
|
1028
|
+
),
|
|
553
1029
|
!profile.packageJsonOk
|
|
554
1030
|
? h('div', { style: { fontSize: 11, color: '#f59e0b' } }, t.pkgErr)
|
|
555
1031
|
: null,
|
|
@@ -557,7 +1033,7 @@ window.__ModuleLoader__.load({
|
|
|
557
1033
|
? h(
|
|
558
1034
|
'div',
|
|
559
1035
|
{ className: 'dshg-pills' },
|
|
560
|
-
h('span', { style: { fontSize:
|
|
1036
|
+
h('span', { style: { fontSize: 11, color: '#f59e0b' } }, `${t.missingInDeps}:`),
|
|
561
1037
|
...profile.missingInDeps.map((pkg) => h('span', { key: pkg, className: 'dshg-pill', 'data-tone': 'warn' }, pkg)),
|
|
562
1038
|
)
|
|
563
1039
|
: null,
|
|
@@ -565,13 +1041,171 @@ window.__ModuleLoader__.load({
|
|
|
565
1041
|
? h(
|
|
566
1042
|
'div',
|
|
567
1043
|
{ className: 'dshg-pills' },
|
|
568
|
-
h('span', { style: { fontSize:
|
|
1044
|
+
h('span', { style: { fontSize: 11, color: '#f59e0b' } }, `${t.unregisteredDeps}:`),
|
|
569
1045
|
...profile.unregisteredDeps.map((pkg) => h('span', { key: pkg, className: 'dshg-pill', 'data-tone': 'warn' }, pkg)),
|
|
570
1046
|
)
|
|
571
1047
|
: null,
|
|
572
1048
|
)
|
|
573
1049
|
}
|
|
574
1050
|
|
|
1051
|
+
function SupervisorCard({ platform, guard, installerUrl, releaseUrl, repoUrl, launching, t }) {
|
|
1052
|
+
const isWin = platform === 'win32'
|
|
1053
|
+
if (isWin && guard.installed) {
|
|
1054
|
+
return h(
|
|
1055
|
+
'div',
|
|
1056
|
+
{ className: 'dshg-card dshg-card-spotlight' },
|
|
1057
|
+
h(
|
|
1058
|
+
'div',
|
|
1059
|
+
{ className: 'dshg-sec-head' },
|
|
1060
|
+
h(
|
|
1061
|
+
'span',
|
|
1062
|
+
{ style: { display: 'inline-flex', alignItems: 'center', gap: 6 } },
|
|
1063
|
+
h(GuardIcon, { size: 15, active: true }),
|
|
1064
|
+
t.supervisorTitleWinReady,
|
|
1065
|
+
),
|
|
1066
|
+
h(
|
|
1067
|
+
'span',
|
|
1068
|
+
{ className: 'dshg-badge', 'data-tone': 'ok' },
|
|
1069
|
+
h('span', { className: 'dshg-dot' }),
|
|
1070
|
+
t.supervisorBadgeReady,
|
|
1071
|
+
),
|
|
1072
|
+
),
|
|
1073
|
+
h('div', { className: 'dshg-sec-sub' }, t.supervisorDescWinReady),
|
|
1074
|
+
h('div', { className: 'dshg-path-box' }, guard.exePath || 'DSHGuard.exe'),
|
|
1075
|
+
h(
|
|
1076
|
+
'button',
|
|
1077
|
+
{
|
|
1078
|
+
className: 'dshg-btn dshg-btn-primary',
|
|
1079
|
+
disabled: launching,
|
|
1080
|
+
onClick: () => void launchDesktopGuard(),
|
|
1081
|
+
},
|
|
1082
|
+
h(SvgIcon, { name: 'window', size: 15 }),
|
|
1083
|
+
launching ? t.btnOpeningGuard : t.btnOpenGuard,
|
|
1084
|
+
),
|
|
1085
|
+
)
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
if (isWin) {
|
|
1089
|
+
const feats = [
|
|
1090
|
+
{ icon: 'bolt', title: t.feat1Title, sub: t.feat1Sub },
|
|
1091
|
+
{ icon: 'key', title: t.feat2Title, sub: t.feat2Sub },
|
|
1092
|
+
{ icon: 'layers', title: t.feat3Title, sub: t.feat3Sub },
|
|
1093
|
+
{ icon: 'shield', title: t.feat4Title, sub: t.feat4Sub },
|
|
1094
|
+
]
|
|
1095
|
+
return h(
|
|
1096
|
+
'div',
|
|
1097
|
+
{ className: 'dshg-card dshg-card-spotlight' },
|
|
1098
|
+
h(
|
|
1099
|
+
'div',
|
|
1100
|
+
{ className: 'dshg-sec-head' },
|
|
1101
|
+
h(
|
|
1102
|
+
'span',
|
|
1103
|
+
{ style: { display: 'inline-flex', alignItems: 'center', gap: 6 } },
|
|
1104
|
+
h(GuardIcon, { size: 15, active: true }),
|
|
1105
|
+
t.supervisorTitleWinMissing,
|
|
1106
|
+
),
|
|
1107
|
+
h('span', { className: 'dshg-badge', 'data-tone': 'blue' }, t.supervisorBadgeWin),
|
|
1108
|
+
),
|
|
1109
|
+
h('div', { className: 'dshg-sec-sub' }, t.supervisorDescWinMissing),
|
|
1110
|
+
h(
|
|
1111
|
+
'div',
|
|
1112
|
+
{ className: 'dshg-feat-grid' },
|
|
1113
|
+
...feats.map((f) =>
|
|
1114
|
+
h(
|
|
1115
|
+
'div',
|
|
1116
|
+
{ key: f.title, className: 'dshg-feat-item' },
|
|
1117
|
+
h('div', { className: 'dshg-feat-ico' }, h(SvgIcon, { name: f.icon, size: 14 })),
|
|
1118
|
+
h(
|
|
1119
|
+
'div',
|
|
1120
|
+
null,
|
|
1121
|
+
h('div', { className: 'dshg-feat-t' }, f.title),
|
|
1122
|
+
h('div', { className: 'dshg-feat-s' }, f.sub),
|
|
1123
|
+
),
|
|
1124
|
+
),
|
|
1125
|
+
),
|
|
1126
|
+
),
|
|
1127
|
+
h(
|
|
1128
|
+
'a',
|
|
1129
|
+
{
|
|
1130
|
+
className: 'dshg-btn dshg-btn-primary',
|
|
1131
|
+
href: installerUrl,
|
|
1132
|
+
target: '_blank',
|
|
1133
|
+
rel: 'noopener noreferrer',
|
|
1134
|
+
},
|
|
1135
|
+
h(SvgIcon, { name: 'download', size: 15 }),
|
|
1136
|
+
t.btnDownloadExe,
|
|
1137
|
+
),
|
|
1138
|
+
h(
|
|
1139
|
+
'div',
|
|
1140
|
+
{ className: 'dshg-btn-row' },
|
|
1141
|
+
h(
|
|
1142
|
+
'a',
|
|
1143
|
+
{
|
|
1144
|
+
className: 'dshg-btn',
|
|
1145
|
+
href: repoUrl,
|
|
1146
|
+
target: '_blank',
|
|
1147
|
+
rel: 'noopener noreferrer',
|
|
1148
|
+
},
|
|
1149
|
+
h(SvgIcon, { name: 'external', size: 12 }),
|
|
1150
|
+
t.btnViewRepo,
|
|
1151
|
+
),
|
|
1152
|
+
h(
|
|
1153
|
+
'button',
|
|
1154
|
+
{
|
|
1155
|
+
className: 'dshg-btn',
|
|
1156
|
+
onClick: () => void fetchOverview(),
|
|
1157
|
+
},
|
|
1158
|
+
h(SvgIcon, { name: 'refresh', size: 12 }),
|
|
1159
|
+
t.btnRedetect,
|
|
1160
|
+
),
|
|
1161
|
+
),
|
|
1162
|
+
)
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
return h(
|
|
1166
|
+
'div',
|
|
1167
|
+
{ className: 'dshg-card' },
|
|
1168
|
+
h(
|
|
1169
|
+
'div',
|
|
1170
|
+
{ className: 'dshg-sec-head' },
|
|
1171
|
+
h(
|
|
1172
|
+
'span',
|
|
1173
|
+
{ style: { display: 'inline-flex', alignItems: 'center', gap: 6 } },
|
|
1174
|
+
h(GuardIcon, { size: 15, active: true }),
|
|
1175
|
+
t.supervisorTitleOther,
|
|
1176
|
+
),
|
|
1177
|
+
platform ? h('span', { className: 'dshg-badge', 'data-tone': 'muted' }, platform) : null,
|
|
1178
|
+
),
|
|
1179
|
+
h('div', { className: 'dshg-sec-sub' }, t.supervisorDescOther(platform || 'POSIX')),
|
|
1180
|
+
h(
|
|
1181
|
+
'div',
|
|
1182
|
+
{ className: 'dshg-btn-row' },
|
|
1183
|
+
h(
|
|
1184
|
+
'a',
|
|
1185
|
+
{
|
|
1186
|
+
className: 'dshg-btn',
|
|
1187
|
+
href: repoUrl,
|
|
1188
|
+
target: '_blank',
|
|
1189
|
+
rel: 'noopener noreferrer',
|
|
1190
|
+
},
|
|
1191
|
+
h(SvgIcon, { name: 'external', size: 12 }),
|
|
1192
|
+
t.btnViewRepo,
|
|
1193
|
+
),
|
|
1194
|
+
h(
|
|
1195
|
+
'a',
|
|
1196
|
+
{
|
|
1197
|
+
className: 'dshg-btn',
|
|
1198
|
+
href: releaseUrl,
|
|
1199
|
+
target: '_blank',
|
|
1200
|
+
rel: 'noopener noreferrer',
|
|
1201
|
+
},
|
|
1202
|
+
h(SvgIcon, { name: 'download', size: 12 }),
|
|
1203
|
+
t.btnViewReleases,
|
|
1204
|
+
),
|
|
1205
|
+
),
|
|
1206
|
+
)
|
|
1207
|
+
}
|
|
1208
|
+
|
|
575
1209
|
function GuardPanelInner({ variant }) {
|
|
576
1210
|
const snap = useStore()
|
|
577
1211
|
const t = COPY[snap.lang] || COPY.zh
|
|
@@ -588,15 +1222,76 @@ window.__ModuleLoader__.load({
|
|
|
588
1222
|
const snapshots = data && data.snapshots
|
|
589
1223
|
const platform = (data && data.platform) || (health && health.platform) || ''
|
|
590
1224
|
const guard = (health && health.guard) || {}
|
|
591
|
-
const releaseUrl = guard.releaseUrl || (snapshots && snapshots.releaseUrl) || RELEASE_FALLBACK
|
|
1225
|
+
const releaseUrl = (guard && guard.releaseUrl) || (snapshots && snapshots.releaseUrl) || RELEASE_FALLBACK
|
|
1226
|
+
const installerUrl = (data && data.installerUrl) || (guard && guard.installerUrl) || (snapshots && snapshots.installerUrl) || INSTALLER_FALLBACK
|
|
1227
|
+
const repoUrl = (data && data.repoUrl) || (guard && guard.repoUrl) || REPO_FALLBACK
|
|
592
1228
|
const creds = (health && health.credentials) || {}
|
|
593
1229
|
const refKeys = Array.isArray(creds.referencedKeys) ? creds.referencedKeys : []
|
|
594
1230
|
const snapList = snapshots && Array.isArray(snapshots.snapshots) ? snapshots.snapshots : []
|
|
1231
|
+
const profiles = health && Array.isArray(health.profiles) ? health.profiles : []
|
|
1232
|
+
|
|
1233
|
+
const webProfile = profiles.find((p) => p.target === 'web')
|
|
1234
|
+
const deskProfile = profiles.find((p) => p.target === 'desktop')
|
|
1235
|
+
const kpiProfilesText = profiles.length
|
|
1236
|
+
? `${webProfile && webProfile.exists ? webProfile.bundlesCount : 0} · ${deskProfile && deskProfile.exists ? deskProfile.bundlesCount : 0}`
|
|
1237
|
+
: '—'
|
|
1238
|
+
const refReadyCount = refKeys.filter((r) => r.ready).length
|
|
1239
|
+
const kpiCredsReady = refKeys.length > 0 ? refReadyCount : (creds.nonEmptyKeysCount || 0)
|
|
1240
|
+
const kpiCredsTotal = refKeys.length > 0 ? refKeys.length : (creds.totalKeysCount || 0)
|
|
1241
|
+
const kpiCredsText = health ? (creds.fileExists ? `${kpiCredsReady}/${kpiCredsTotal}` : '0/0') : '—'
|
|
1242
|
+
const kpiSnapsText = snapshots ? String(snapshots.total || 0) : '—'
|
|
1243
|
+
|
|
1244
|
+
const hasProfileIssues = Boolean(health && Array.isArray(health.issues) && health.issues.length > 0)
|
|
1245
|
+
const hasMissingCreds = Boolean(
|
|
1246
|
+
!creds.fileExists || (Array.isArray(creds.missingReferencedKeys) && creds.missingReferencedKeys.length > 0),
|
|
1247
|
+
)
|
|
1248
|
+
|
|
1249
|
+
const credRatioPct = kpiCredsTotal > 0 ? Math.min(100, Math.round((kpiCredsReady / kpiCredsTotal) * 100)) : 0
|
|
1250
|
+
|
|
1251
|
+
function renderDesktopCta(openLabel, downloadLabel) {
|
|
1252
|
+
if (platform === 'win32' && guard.installed) {
|
|
1253
|
+
return h(
|
|
1254
|
+
'button',
|
|
1255
|
+
{
|
|
1256
|
+
className: 'dshg-btn dshg-btn-primary',
|
|
1257
|
+
disabled: snap.launching,
|
|
1258
|
+
onClick: () => void launchDesktopGuard(),
|
|
1259
|
+
},
|
|
1260
|
+
h(SvgIcon, { name: 'window', size: 14 }),
|
|
1261
|
+
snap.launching ? t.btnOpeningGuard : openLabel,
|
|
1262
|
+
)
|
|
1263
|
+
}
|
|
1264
|
+
if (platform === 'win32') {
|
|
1265
|
+
return h(
|
|
1266
|
+
'a',
|
|
1267
|
+
{
|
|
1268
|
+
className: 'dshg-btn dshg-btn-primary',
|
|
1269
|
+
href: installerUrl,
|
|
1270
|
+
target: '_blank',
|
|
1271
|
+
rel: 'noopener noreferrer',
|
|
1272
|
+
},
|
|
1273
|
+
h(SvgIcon, { name: 'download', size: 14 }),
|
|
1274
|
+
downloadLabel,
|
|
1275
|
+
)
|
|
1276
|
+
}
|
|
1277
|
+
return h(
|
|
1278
|
+
'a',
|
|
1279
|
+
{
|
|
1280
|
+
className: 'dshg-btn',
|
|
1281
|
+
href: repoUrl,
|
|
1282
|
+
target: '_blank',
|
|
1283
|
+
rel: 'noopener noreferrer',
|
|
1284
|
+
},
|
|
1285
|
+
h(SvgIcon, { name: 'external', size: 13 }),
|
|
1286
|
+
t.btnViewRepo,
|
|
1287
|
+
)
|
|
1288
|
+
}
|
|
595
1289
|
|
|
596
1290
|
return h(
|
|
597
1291
|
'div',
|
|
598
1292
|
{ className: 'dshg-root', 'data-variant': variant || 'dock' },
|
|
599
|
-
|
|
1293
|
+
|
|
1294
|
+
// Brand Header Card
|
|
600
1295
|
h(
|
|
601
1296
|
'div',
|
|
602
1297
|
{ className: 'dshg-card' },
|
|
@@ -610,7 +1305,12 @@ window.__ModuleLoader__.load({
|
|
|
610
1305
|
h(
|
|
611
1306
|
'div',
|
|
612
1307
|
null,
|
|
613
|
-
h(
|
|
1308
|
+
h(
|
|
1309
|
+
'div',
|
|
1310
|
+
{ className: 'dshg-title-row' },
|
|
1311
|
+
h('span', { className: 'dshg-title' }, t.brand),
|
|
1312
|
+
h('span', { className: 'dshg-ver' }, t.versionPill),
|
|
1313
|
+
),
|
|
614
1314
|
h('div', { className: 'dshg-sub' }, t.subtitle),
|
|
615
1315
|
),
|
|
616
1316
|
),
|
|
@@ -620,11 +1320,13 @@ window.__ModuleLoader__.load({
|
|
|
620
1320
|
h(
|
|
621
1321
|
'button',
|
|
622
1322
|
{
|
|
623
|
-
className: 'dshg-btn',
|
|
1323
|
+
className: 'dshg-btn dshg-btn-icon',
|
|
624
1324
|
disabled: snap.loading,
|
|
1325
|
+
title: t.refresh,
|
|
1326
|
+
'aria-label': t.refresh,
|
|
625
1327
|
onClick: () => void fetchOverview(),
|
|
626
1328
|
},
|
|
627
|
-
snap.loading ?
|
|
1329
|
+
h(SvgIcon, { name: 'refresh', size: 14, className: snap.loading ? 'dshg-spin' : '' }),
|
|
628
1330
|
),
|
|
629
1331
|
h(
|
|
630
1332
|
'button',
|
|
@@ -643,159 +1345,305 @@ window.__ModuleLoader__.load({
|
|
|
643
1345
|
h(
|
|
644
1346
|
'span',
|
|
645
1347
|
{ className: 'dshg-badge', 'data-tone': health.healthy ? 'ok' : 'warn' },
|
|
646
|
-
|
|
1348
|
+
h('span', { className: 'dshg-dot' }),
|
|
1349
|
+
health.healthy ? t.healthy : t.unhealthy(health.issuesCount || 0),
|
|
647
1350
|
),
|
|
648
1351
|
snap.checkedAt
|
|
649
|
-
? h(
|
|
1352
|
+
? h(
|
|
1353
|
+
'span',
|
|
1354
|
+
{ style: { fontSize: 11, color: 'var(--dshg-text-3)', fontVariantNumeric: 'tabular-nums' } },
|
|
1355
|
+
t.checkedAt(formatClockOnly(snap.checkedAt)),
|
|
1356
|
+
)
|
|
650
1357
|
: null,
|
|
651
1358
|
)
|
|
652
1359
|
: null,
|
|
653
1360
|
),
|
|
654
1361
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
!data && snap.loading
|
|
659
|
-
? h('div', { className: 'dshg-card', style: { fontSize: 12, color: 'var(--dshg-text-2)' } }, t.loading)
|
|
660
|
-
: null,
|
|
661
|
-
|
|
662
|
-
// Profiles comparison
|
|
663
|
-
health && Array.isArray(health.profiles)
|
|
1362
|
+
// Compact 3-Column KPI Strip
|
|
1363
|
+
data
|
|
664
1364
|
? h(
|
|
665
1365
|
'div',
|
|
666
|
-
{ className: 'dshg-
|
|
667
|
-
h('div', { className: 'dshg-sec-head' }, h('span', null, t.profilesTitle)),
|
|
1366
|
+
{ className: 'dshg-kpi-strip' },
|
|
668
1367
|
h(
|
|
669
|
-
'
|
|
670
|
-
{
|
|
671
|
-
|
|
1368
|
+
'button',
|
|
1369
|
+
{
|
|
1370
|
+
className: 'dshg-kpi',
|
|
1371
|
+
'data-active': snap.tab === 'overview' ? 'true' : 'false',
|
|
1372
|
+
onClick: () => patch({ tab: 'overview' }),
|
|
1373
|
+
},
|
|
1374
|
+
h('span', { className: 'dshg-kpi-label' }, t.kpiProfilesLabel),
|
|
1375
|
+
h('span', { className: 'dshg-kpi-val' }, kpiProfilesText),
|
|
1376
|
+
h('span', { className: 'dshg-kpi-sub' }, t.kpiProfilesSub),
|
|
1377
|
+
),
|
|
1378
|
+
h(
|
|
1379
|
+
'button',
|
|
1380
|
+
{
|
|
1381
|
+
className: 'dshg-kpi',
|
|
1382
|
+
'data-active': snap.tab === 'creds' ? 'true' : 'false',
|
|
1383
|
+
onClick: () => patch({ tab: 'creds' }),
|
|
1384
|
+
},
|
|
1385
|
+
h('span', { className: 'dshg-kpi-label' }, t.kpiCredsLabel),
|
|
1386
|
+
h('span', { className: 'dshg-kpi-val' }, kpiCredsText),
|
|
1387
|
+
h('span', { className: 'dshg-kpi-sub' }, t.kpiCredsSub),
|
|
1388
|
+
),
|
|
1389
|
+
h(
|
|
1390
|
+
'button',
|
|
1391
|
+
{
|
|
1392
|
+
className: 'dshg-kpi',
|
|
1393
|
+
'data-active': snap.tab === 'snapshots' ? 'true' : 'false',
|
|
1394
|
+
onClick: () => patch({ tab: 'snapshots' }),
|
|
1395
|
+
},
|
|
1396
|
+
h('span', { className: 'dshg-kpi-label' }, t.kpiSnapsLabel),
|
|
1397
|
+
h('span', { className: 'dshg-kpi-val' }, kpiSnapsText),
|
|
1398
|
+
h('span', { className: 'dshg-kpi-sub' }, t.kpiSnapsSub),
|
|
672
1399
|
),
|
|
673
1400
|
)
|
|
674
1401
|
: null,
|
|
675
1402
|
|
|
676
|
-
//
|
|
677
|
-
|
|
1403
|
+
// Segmented Control Tabs
|
|
1404
|
+
data
|
|
678
1405
|
? h(
|
|
679
1406
|
'div',
|
|
680
|
-
{ className: 'dshg-
|
|
681
|
-
h(
|
|
682
|
-
|
|
683
|
-
|
|
1407
|
+
{ className: 'dshg-seg', role: 'tablist' },
|
|
1408
|
+
h(
|
|
1409
|
+
'button',
|
|
1410
|
+
{
|
|
1411
|
+
className: 'dshg-seg-btn',
|
|
1412
|
+
role: 'tab',
|
|
1413
|
+
'aria-selected': snap.tab === 'overview',
|
|
1414
|
+
'data-active': snap.tab === 'overview' ? 'true' : 'false',
|
|
1415
|
+
onClick: () => patch({ tab: 'overview' }),
|
|
1416
|
+
},
|
|
1417
|
+
t.tabOverview,
|
|
1418
|
+
hasProfileIssues ? h('span', { className: 'dshg-seg-dot' }) : null,
|
|
1419
|
+
),
|
|
1420
|
+
h(
|
|
1421
|
+
'button',
|
|
1422
|
+
{
|
|
1423
|
+
className: 'dshg-seg-btn',
|
|
1424
|
+
role: 'tab',
|
|
1425
|
+
'aria-selected': snap.tab === 'creds',
|
|
1426
|
+
'data-active': snap.tab === 'creds' ? 'true' : 'false',
|
|
1427
|
+
onClick: () => patch({ tab: 'creds' }),
|
|
1428
|
+
},
|
|
1429
|
+
t.tabCreds,
|
|
1430
|
+
hasMissingCreds ? h('span', { className: 'dshg-seg-dot' }) : null,
|
|
1431
|
+
),
|
|
1432
|
+
h(
|
|
1433
|
+
'button',
|
|
1434
|
+
{
|
|
1435
|
+
className: 'dshg-seg-btn',
|
|
1436
|
+
role: 'tab',
|
|
1437
|
+
'aria-selected': snap.tab === 'snapshots',
|
|
1438
|
+
'data-active': snap.tab === 'snapshots' ? 'true' : 'false',
|
|
1439
|
+
onClick: () => patch({ tab: 'snapshots' }),
|
|
1440
|
+
},
|
|
1441
|
+
t.tabSnapshots,
|
|
684
1442
|
),
|
|
685
1443
|
)
|
|
686
1444
|
: null,
|
|
687
1445
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
1446
|
+
snap.error ? h('div', { className: 'dshg-error' }, snap.error) : null,
|
|
1447
|
+
snap.notice ? h('div', { className: 'dshg-notice' }, snap.notice) : null,
|
|
1448
|
+
|
|
1449
|
+
!data && snap.loading
|
|
1450
|
+
? h('div', { className: 'dshg-card', style: { color: 'var(--dshg-text-2)' } }, t.loading)
|
|
1451
|
+
: null,
|
|
1452
|
+
|
|
1453
|
+
// TAB 1: Overview
|
|
1454
|
+
data && snap.tab === 'overview'
|
|
1455
|
+
? [
|
|
1456
|
+
h(SupervisorCard, {
|
|
1457
|
+
key: 'supervisor',
|
|
1458
|
+
platform,
|
|
1459
|
+
guard,
|
|
1460
|
+
installerUrl,
|
|
1461
|
+
releaseUrl,
|
|
1462
|
+
repoUrl,
|
|
1463
|
+
launching: snap.launching,
|
|
1464
|
+
t,
|
|
1465
|
+
}),
|
|
1466
|
+
health && profiles.length > 0
|
|
706
1467
|
? h(
|
|
707
1468
|
'div',
|
|
708
|
-
{ className: 'dshg-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
),
|
|
1469
|
+
{ key: 'profiles', className: 'dshg-card' },
|
|
1470
|
+
h('div', { className: 'dshg-sec-head' }, h('span', null, t.profilesTitle)),
|
|
1471
|
+
h(
|
|
1472
|
+
'div',
|
|
1473
|
+
{ className: 'dshg-profile-grid' },
|
|
1474
|
+
...profiles.map((p) => h(ProfileSubcard, { key: p.target, profile: p, t })),
|
|
715
1475
|
),
|
|
716
1476
|
)
|
|
717
|
-
:
|
|
718
|
-
|
|
1477
|
+
: null,
|
|
1478
|
+
hasProfileIssues
|
|
1479
|
+
? h(
|
|
1480
|
+
'div',
|
|
1481
|
+
{ key: 'issues', className: 'dshg-card' },
|
|
1482
|
+
h(
|
|
1483
|
+
'div',
|
|
1484
|
+
{ className: 'dshg-sec-head' },
|
|
1485
|
+
h('span', { style: { display: 'inline-flex', alignItems: 'center', gap: 6, color: '#f59e0b' } }, h(SvgIcon, { name: 'alert', size: 14 }), t.issuesTitle),
|
|
1486
|
+
),
|
|
1487
|
+
...health.issues.map((issue, idx) =>
|
|
1488
|
+
h('div', { key: idx, style: { fontSize: 11.5, color: '#f59e0b', wordBreak: 'break-word' } }, `• ${issue}`),
|
|
1489
|
+
),
|
|
1490
|
+
platform === 'win32'
|
|
1491
|
+
? renderDesktopCta(t.issueActionOpen, t.issueActionDownload)
|
|
1492
|
+
: null,
|
|
1493
|
+
)
|
|
1494
|
+
: null,
|
|
1495
|
+
]
|
|
719
1496
|
: null,
|
|
720
1497
|
|
|
721
|
-
//
|
|
722
|
-
|
|
723
|
-
?
|
|
724
|
-
'div',
|
|
725
|
-
{ className: 'dshg-card' },
|
|
1498
|
+
// TAB 2: Masked Credentials Readiness
|
|
1499
|
+
data && snap.tab === 'creds' && health
|
|
1500
|
+
? [
|
|
726
1501
|
h(
|
|
727
1502
|
'div',
|
|
728
|
-
{ className: 'dshg-
|
|
729
|
-
h(
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
'
|
|
735
|
-
{ className: 'dshg-
|
|
736
|
-
|
|
1503
|
+
{ key: 'cred-status', className: 'dshg-card' },
|
|
1504
|
+
h(
|
|
1505
|
+
'div',
|
|
1506
|
+
{ className: 'dshg-sec-head' },
|
|
1507
|
+
h('span', { style: { display: 'inline-flex', alignItems: 'center', gap: 6 } }, h(SvgIcon, { name: 'key', size: 14 }), t.credsTitle),
|
|
1508
|
+
h(
|
|
1509
|
+
'span',
|
|
1510
|
+
{ className: 'dshg-badge', 'data-tone': creds.fileExists && !hasMissingCreds ? 'ok' : creds.fileExists ? 'warn' : 'muted' },
|
|
1511
|
+
creds.fileExists
|
|
1512
|
+
? t.credReadyBadge(kpiCredsReady, kpiCredsTotal)
|
|
1513
|
+
: t.credMissingFile,
|
|
1514
|
+
),
|
|
1515
|
+
),
|
|
1516
|
+
h('div', { className: 'dshg-sec-sub' }, t.credsPrivacyHint),
|
|
1517
|
+
creds.fileExists
|
|
1518
|
+
? h(
|
|
1519
|
+
'div',
|
|
1520
|
+
{ className: 'dshg-progress-wrap' },
|
|
737
1521
|
h(
|
|
738
1522
|
'div',
|
|
739
|
-
{
|
|
1523
|
+
{ className: 'dshg-row', style: { fontSize: 11, color: 'var(--dshg-text-2)' } },
|
|
1524
|
+
h(
|
|
1525
|
+
'span',
|
|
1526
|
+
null,
|
|
1527
|
+
refKeys.length > 0
|
|
1528
|
+
? t.credProgressPatch(refReadyCount, refKeys.length)
|
|
1529
|
+
: t.credProgressFile(creds.nonEmptyKeysCount || 0, creds.totalKeysCount || 0),
|
|
1530
|
+
),
|
|
1531
|
+
h('span', { style: { fontVariantNumeric: 'tabular-nums' } }, `${credRatioPct}%`),
|
|
1532
|
+
),
|
|
1533
|
+
h(
|
|
1534
|
+
'div',
|
|
1535
|
+
{ className: 'dshg-progress-track' },
|
|
1536
|
+
h('div', { className: 'dshg-progress-fill', style: { width: `${credRatioPct}%` } }),
|
|
1537
|
+
),
|
|
1538
|
+
)
|
|
1539
|
+
: null,
|
|
1540
|
+
refKeys.length > 0
|
|
1541
|
+
? h(
|
|
1542
|
+
'div',
|
|
1543
|
+
{ className: 'dshg-cred-list' },
|
|
1544
|
+
...refKeys.map((item) =>
|
|
740
1545
|
h(
|
|
741
1546
|
'div',
|
|
742
|
-
{ className: 'dshg-
|
|
1547
|
+
{ key: item.key, className: 'dshg-cred-item' },
|
|
743
1548
|
h(
|
|
744
1549
|
'span',
|
|
745
|
-
{ className: 'dshg-
|
|
746
|
-
|
|
1550
|
+
{ className: 'dshg-cred-key' },
|
|
1551
|
+
h(SvgIcon, { name: 'key', size: 12 }),
|
|
1552
|
+
item.key,
|
|
1553
|
+
),
|
|
1554
|
+
h(
|
|
1555
|
+
'span',
|
|
1556
|
+
{ className: 'dshg-badge', 'data-tone': item.ready ? 'ok' : 'warn' },
|
|
1557
|
+
h(SvgIcon, { name: item.ready ? 'check' : 'alert', size: 11 }),
|
|
1558
|
+
item.ready ? t.credStatusReady : t.credStatusMissing,
|
|
747
1559
|
),
|
|
748
|
-
h('span', { style: { fontSize: 10.5, color: 'var(--dshg-text-3)' } }, `${t.snapItems(s.itemCount || 0)} · ${formatShortTime(s.createdAt)}`),
|
|
749
1560
|
),
|
|
750
|
-
h('div', { className: 'dshg-mono' }, s.id),
|
|
751
|
-
h('div', { style: { fontSize: 11, color: 'var(--dshg-text-2)' } }, s.reason || t.snapNoReason),
|
|
752
1561
|
),
|
|
753
|
-
)
|
|
754
|
-
)
|
|
755
|
-
|
|
756
|
-
|
|
1562
|
+
)
|
|
1563
|
+
: h('div', { className: 'dshg-sec-sub' }, t.credNoRefs),
|
|
1564
|
+
),
|
|
1565
|
+
h(
|
|
1566
|
+
'div',
|
|
1567
|
+
{ key: 'cred-upsell', className: 'dshg-card dshg-card-spotlight' },
|
|
1568
|
+
h('div', { className: 'dshg-sec-head' }, h('span', null, t.credUpsellTitle)),
|
|
1569
|
+
h('div', { className: 'dshg-sec-sub' }, t.credUpsellDesc),
|
|
1570
|
+
renderDesktopCta(t.credUpsellOpen, t.credUpsellDownload),
|
|
1571
|
+
),
|
|
1572
|
+
]
|
|
757
1573
|
: null,
|
|
758
1574
|
|
|
759
|
-
//
|
|
760
|
-
data
|
|
1575
|
+
// TAB 3: Snapshots Timeline
|
|
1576
|
+
data && snap.tab === 'snapshots' && snapshots
|
|
761
1577
|
? h(
|
|
762
1578
|
'div',
|
|
763
1579
|
{ className: 'dshg-card' },
|
|
764
|
-
h(
|
|
765
|
-
|
|
1580
|
+
h(
|
|
1581
|
+
'div',
|
|
1582
|
+
{ className: 'dshg-sec-head' },
|
|
1583
|
+
h('span', { style: { display: 'inline-flex', alignItems: 'center', gap: 6 } }, h(SvgIcon, { name: 'clock', size: 14 }), t.snapshotsTitle),
|
|
1584
|
+
h('span', { className: 'dshg-badge', 'data-tone': 'muted' }, t.snapshotsTotal(snapshots.total || 0)),
|
|
1585
|
+
),
|
|
1586
|
+
snapList.length > 0
|
|
766
1587
|
? [
|
|
767
|
-
h('div', { key: 'path', className: 'dshg-mono', style: { color: 'var(--dshg-text-2)' } }, t.guardReady(guard.exePath || 'DSHGuard.exe')),
|
|
768
|
-
h(
|
|
769
|
-
'button',
|
|
770
|
-
{
|
|
771
|
-
key: 'launch',
|
|
772
|
-
className: 'dshg-btn dshg-btn-primary',
|
|
773
|
-
disabled: snap.launching,
|
|
774
|
-
onClick: () => void launchDesktopGuard(),
|
|
775
|
-
},
|
|
776
|
-
snap.launching ? t.openingGuard : `🐋 ${t.openGuard}`,
|
|
777
|
-
),
|
|
778
|
-
]
|
|
779
|
-
: [
|
|
780
1588
|
h(
|
|
781
1589
|
'div',
|
|
782
|
-
{ key: '
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
1590
|
+
{ key: 'list', className: 'dshg-timeline' },
|
|
1591
|
+
...snapList.slice(0, 10).map((s) =>
|
|
1592
|
+
h(
|
|
1593
|
+
'div',
|
|
1594
|
+
{ key: s.id, className: 'dshg-snap-item' },
|
|
1595
|
+
h(
|
|
1596
|
+
'div',
|
|
1597
|
+
{ className: 'dshg-snap-head' },
|
|
1598
|
+
h(
|
|
1599
|
+
'span',
|
|
1600
|
+
{ className: 'dshg-snap-title' },
|
|
1601
|
+
h('span', {
|
|
1602
|
+
className: 'dshg-track-dot',
|
|
1603
|
+
style: { background: s.target === 'desktop' ? '#22c55e' : '#3b82f6' },
|
|
1604
|
+
}),
|
|
1605
|
+
s.reason || t.snapNoReason,
|
|
1606
|
+
),
|
|
1607
|
+
h(
|
|
1608
|
+
'span',
|
|
1609
|
+
{ className: 'dshg-badge', 'data-tone': s.target === 'desktop' ? 'ok' : 'blue' },
|
|
1610
|
+
s.target === 'desktop' ? t.desktopTrack : t.webTrack,
|
|
1611
|
+
),
|
|
1612
|
+
),
|
|
1613
|
+
h(
|
|
1614
|
+
'div',
|
|
1615
|
+
{ className: 'dshg-row', style: { fontSize: 11, color: 'var(--dshg-text-2)' } },
|
|
1616
|
+
h('span', null, t.snapItems(s.itemCount || 0)),
|
|
1617
|
+
h('span', { style: { fontVariantNumeric: 'tabular-nums' } }, formatShortTime(s.createdAt)),
|
|
1618
|
+
),
|
|
1619
|
+
h('div', { className: 'dshg-mono' }, s.id),
|
|
1620
|
+
),
|
|
1621
|
+
),
|
|
795
1622
|
),
|
|
796
|
-
|
|
1623
|
+
h('div', { key: 'snap-cta' }, renderDesktopCta(t.snapActionOpen, t.snapActionDownload)),
|
|
1624
|
+
]
|
|
1625
|
+
: h(
|
|
1626
|
+
'div',
|
|
1627
|
+
{ className: 'dshg-empty' },
|
|
1628
|
+
h('div', { style: { color: 'var(--dshg-text-2)' } }, h(SvgIcon, { name: 'clock', size: 22 })),
|
|
1629
|
+
h('div', { style: { fontWeight: 600, fontSize: 12, color: 'var(--dshg-text)' } }, t.snapshotsEmptyTitle),
|
|
1630
|
+
h('div', { style: { fontSize: 11, lineHeight: 1.5 } }, t.snapshotsEmptyDesc),
|
|
1631
|
+
renderDesktopCta(t.snapActionOpen, t.snapActionDownload),
|
|
1632
|
+
),
|
|
797
1633
|
)
|
|
798
1634
|
: null,
|
|
1635
|
+
|
|
1636
|
+
// Subtle Footer
|
|
1637
|
+
h(
|
|
1638
|
+
'div',
|
|
1639
|
+
{ className: 'dshg-footer' },
|
|
1640
|
+
h('span', null, t.footerNote),
|
|
1641
|
+
h(
|
|
1642
|
+
'a',
|
|
1643
|
+
{ href: repoUrl, target: '_blank', rel: 'noopener noreferrer' },
|
|
1644
|
+
t.footerHome,
|
|
1645
|
+
),
|
|
1646
|
+
),
|
|
799
1647
|
)
|
|
800
1648
|
}
|
|
801
1649
|
|