dsh-plugin-mesh 0.5.8 → 0.5.10
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 +28 -9
- package/README.md +77 -1038
- package/client/client.js +490 -36
- package/cordis.patch.yml +6 -0
- package/lib/_selftest-approval.mjs +165 -0
- package/lib/_selftest-capabilities.mjs +11 -7
- package/lib/_selftest-reply-route.mjs +11 -0
- package/lib/_selftest-update.mjs +11 -3
- package/lib/_selftest-upgrade.mjs +5 -1
- package/lib/_selftest-workbench.mjs +90 -23
- package/lib/approval.js +152 -0
- package/lib/index.js +214 -4
- package/llms.txt +20 -2
- package/package.json +9 -8
- package/scripts/check-tdz.mjs +53 -8
package/client/client.js
CHANGED
|
@@ -1094,6 +1094,12 @@ window.__ModuleLoader__.load({
|
|
|
1094
1094
|
.mesh-chip.is-muted { background: transparent; border: 1px solid var(--mesh-line); color: var(--mesh-muted); }
|
|
1095
1095
|
.mesh-chip-label { color: var(--mesh-muted); }
|
|
1096
1096
|
.mesh-chip-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; }
|
|
1097
|
+
.mesh-chip-btn {
|
|
1098
|
+
cursor: pointer; border: 1px solid var(--mesh-line);
|
|
1099
|
+
background: transparent; color: var(--mesh-fg);
|
|
1100
|
+
transition: border-color 140ms ease, background 140ms ease;
|
|
1101
|
+
}
|
|
1102
|
+
.mesh-chip-btn:hover { border-color: var(--mesh-line-2); background: var(--mesh-surface-2); }
|
|
1097
1103
|
.mesh-specs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--mesh-muted); }
|
|
1098
1104
|
.mesh-text-btn {
|
|
1099
1105
|
align-self: flex-start; border: 0; background: transparent;
|
|
@@ -1610,6 +1616,114 @@ window.__ModuleLoader__.load({
|
|
|
1610
1616
|
.mesh-home-empty p { margin: 0 0 12px; font-size: 12px; color: var(--mesh-muted); }
|
|
1611
1617
|
.mesh-home .mesh-firstrun { margin: 0 0 16px; }
|
|
1612
1618
|
|
|
1619
|
+
/* ── 演示(单机也能看见完整闭环) ── */
|
|
1620
|
+
.mesh-demo-layer {
|
|
1621
|
+
position: absolute; inset: 0; z-index: 50;
|
|
1622
|
+
display: flex; align-items: center; justify-content: center;
|
|
1623
|
+
padding: 22px;
|
|
1624
|
+
background: rgba(12, 14, 18, .46);
|
|
1625
|
+
animation: mesh-view-in 160ms ease both;
|
|
1626
|
+
}
|
|
1627
|
+
.mesh-demo-card {
|
|
1628
|
+
width: min(560px, 100%); max-height: min(88vh, 780px);
|
|
1629
|
+
display: flex; flex-direction: column;
|
|
1630
|
+
background: var(--mesh-surface);
|
|
1631
|
+
color: var(--mesh-fg);
|
|
1632
|
+
border: 1px solid var(--mesh-line);
|
|
1633
|
+
border-radius: 18px;
|
|
1634
|
+
box-shadow: 0 24px 80px rgba(0,0,0,.34);
|
|
1635
|
+
overflow: hidden;
|
|
1636
|
+
animation: mesh-detail-in 220ms var(--mesh-ease-out) both;
|
|
1637
|
+
}
|
|
1638
|
+
.mesh-demo-head {
|
|
1639
|
+
flex: 0 0 auto;
|
|
1640
|
+
display: flex; align-items: center; gap: 10px;
|
|
1641
|
+
padding: 15px 18px 12px;
|
|
1642
|
+
border-bottom: 1px solid var(--mesh-line);
|
|
1643
|
+
}
|
|
1644
|
+
.mesh-demo-eyebrow { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--mesh-muted); }
|
|
1645
|
+
.mesh-demo-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
|
|
1646
|
+
.mesh-demo-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px 6px; display: flex; flex-direction: column; gap: 12px; }
|
|
1647
|
+
.mesh-demo-peer {
|
|
1648
|
+
display: flex; align-items: center; gap: 10px;
|
|
1649
|
+
padding: 10px 12px; border: 1px solid var(--mesh-line); border-radius: 12px;
|
|
1650
|
+
background: var(--mesh-bg);
|
|
1651
|
+
}
|
|
1652
|
+
.mesh-demo-peer-name { font-size: 13px; font-weight: 600; }
|
|
1653
|
+
.mesh-demo-peer-meta { margin-left: auto; font-size: 11px; color: var(--mesh-muted); }
|
|
1654
|
+
.mesh-demo-task {
|
|
1655
|
+
align-self: flex-end; max-width: 86%;
|
|
1656
|
+
padding: 9px 13px; border-radius: 14px 14px 4px 14px;
|
|
1657
|
+
background: var(--mesh-accent-soft, var(--mesh-surface));
|
|
1658
|
+
border: 1px solid var(--mesh-line);
|
|
1659
|
+
font-size: 12.5px; line-height: 1.6;
|
|
1660
|
+
}
|
|
1661
|
+
.mesh-demo-steps { display: flex; flex-direction: column; gap: 7px; padding: 2px 2px 0; }
|
|
1662
|
+
.mesh-demo-step { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--mesh-muted); }
|
|
1663
|
+
.mesh-demo-step.is-active { color: var(--mesh-fg); font-weight: 550; }
|
|
1664
|
+
.mesh-demo-step.is-done { color: var(--mesh-fg); }
|
|
1665
|
+
.mesh-demo-step-dot {
|
|
1666
|
+
width: 16px; height: 16px; flex: 0 0 auto; border-radius: 50%;
|
|
1667
|
+
border: 1.5px solid var(--mesh-line-2);
|
|
1668
|
+
display: flex; align-items: center; justify-content: center;
|
|
1669
|
+
font-size: 9px; color: transparent;
|
|
1670
|
+
}
|
|
1671
|
+
.mesh-demo-step.is-active .mesh-demo-step-dot { border-color: var(--mesh-accent); }
|
|
1672
|
+
.mesh-demo-step.is-done .mesh-demo-step-dot { border-color: var(--mesh-accent); background: var(--mesh-accent); color: var(--mesh-bg); }
|
|
1673
|
+
.mesh-demo-spin { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--mesh-accent); border-top-color: transparent; animation: mesh-spin .8s linear infinite; }
|
|
1674
|
+
.mesh-demo-result {
|
|
1675
|
+
border: 1px solid var(--mesh-line); border-radius: 13px;
|
|
1676
|
+
padding: 13px 14px; background: var(--mesh-bg);
|
|
1677
|
+
animation: mesh-detail-in 220ms ease both;
|
|
1678
|
+
}
|
|
1679
|
+
.mesh-demo-result-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
|
|
1680
|
+
.mesh-demo-result-title { font-size: 12.5px; font-weight: 600; }
|
|
1681
|
+
.mesh-demo-result-rows { display: flex; flex-direction: column; gap: 5px; }
|
|
1682
|
+
.mesh-demo-result-row { display: flex; gap: 10px; font-size: 11.5px; line-height: 1.5; }
|
|
1683
|
+
.mesh-demo-result-k { flex: 0 0 66px; color: var(--mesh-muted); }
|
|
1684
|
+
.mesh-demo-result-v { flex: 1; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
|
|
1685
|
+
.mesh-demo-caption { font-size: 11px; line-height: 1.65; color: var(--mesh-muted); }
|
|
1686
|
+
.mesh-demo-code {
|
|
1687
|
+
display: flex; align-items: center; gap: 8px;
|
|
1688
|
+
padding: 9px 11px; border: 1px dashed var(--mesh-line-2); border-radius: 10px;
|
|
1689
|
+
font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
1690
|
+
background: var(--mesh-code-bg, var(--mesh-bg));
|
|
1691
|
+
overflow-wrap: anywhere;
|
|
1692
|
+
}
|
|
1693
|
+
.mesh-demo-code code { flex: 1; min-width: 0; }
|
|
1694
|
+
.mesh-demo-foot { flex: 0 0 auto; display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px 16px; border-top: 1px solid var(--mesh-line); flex-wrap: wrap; }
|
|
1695
|
+
.mesh-demo-note { margin-right: auto; font-size: 10.5px; color: var(--mesh-muted); align-self: center; }
|
|
1696
|
+
|
|
1697
|
+
/* ── 安装确认弹窗:一次点击 → 一个说清楚要发生什么的弹窗 ── */
|
|
1698
|
+
.mesh-confirm-layer {
|
|
1699
|
+
position: fixed; inset: 0; z-index: 2147482700;
|
|
1700
|
+
display: flex; align-items: center; justify-content: center;
|
|
1701
|
+
padding: 22px; background: rgba(12, 14, 18, .46);
|
|
1702
|
+
animation: mesh-view-in 140ms ease both;
|
|
1703
|
+
}
|
|
1704
|
+
.mesh-confirm-card {
|
|
1705
|
+
width: min(430px, 100%);
|
|
1706
|
+
background: var(--mesh-surface); color: var(--mesh-fg);
|
|
1707
|
+
border: 1px solid var(--mesh-line); border-radius: 16px;
|
|
1708
|
+
box-shadow: 0 24px 70px rgba(0,0,0,.34);
|
|
1709
|
+
overflow: hidden; animation: mesh-detail-in 180ms var(--mesh-ease-out) both;
|
|
1710
|
+
}
|
|
1711
|
+
.mesh-confirm-head { display: flex; align-items: center; gap: 9px; padding: 16px 18px 6px; }
|
|
1712
|
+
.mesh-confirm-title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
|
|
1713
|
+
.mesh-confirm-body { padding: 4px 18px 14px; font-size: 12px; line-height: 1.7; }
|
|
1714
|
+
.mesh-confirm-body p { margin: 0 0 8px; color: var(--mesh-muted); }
|
|
1715
|
+
.mesh-confirm-ver {
|
|
1716
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
1717
|
+
font-size: 12px; color: var(--mesh-fg);
|
|
1718
|
+
}
|
|
1719
|
+
.mesh-confirm-list { margin: 0 0 10px; padding-left: 18px; color: var(--mesh-muted); }
|
|
1720
|
+
.mesh-confirm-list li { margin: 2px 0; }
|
|
1721
|
+
.mesh-confirm-warn { color: var(--mesh-warn); font-size: 11.5px; margin: 0; }
|
|
1722
|
+
.mesh-confirm-foot {
|
|
1723
|
+
display: flex; gap: 8px; justify-content: flex-end;
|
|
1724
|
+
padding: 12px 18px 16px; border-top: 1px solid var(--mesh-line);
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1613
1727
|
/* 主页底部的派发面板:视觉上跟卡片同级,但不参与拖动/隐藏。 */
|
|
1614
1728
|
.mesh-dispatch {
|
|
1615
1729
|
margin-top: 16px;
|
|
@@ -2977,6 +3091,183 @@ window.__ModuleLoader__.load({
|
|
|
2977
3091
|
);
|
|
2978
3092
|
}
|
|
2979
3093
|
|
|
3094
|
+
/**
|
|
3095
|
+
* 陌生设备第一次派活的确认条。
|
|
3096
|
+
*
|
|
3097
|
+
* 默认会拦(判定在 lib/approval.js)。这里只负责把「谁、要干什么」摆清楚,
|
|
3098
|
+
* 给两个按钮;点完立刻调接口 —— 任务要么当场开始跑,要么被拒。
|
|
3099
|
+
*/
|
|
3100
|
+
function ApprovalBar({ items, busy, onDecide }) {
|
|
3101
|
+
const list = Array.isArray(items) ? items : [];
|
|
3102
|
+
const first = list[0];
|
|
3103
|
+
if (!first) return null;
|
|
3104
|
+
const name = first.fromMachine || String(first.from || "").split("/")[0] || "一台设备";
|
|
3105
|
+
const more = list.length > 1 ? `(还有 ${list.length - 1} 条待确认)` : "";
|
|
3106
|
+
const preview = String(first.task || "").replace(/\s+/g, " ").slice(0, 68);
|
|
3107
|
+
return h(
|
|
3108
|
+
"div",
|
|
3109
|
+
{ className: "mesh-banner is-warn", role: "status", "data-mesh-approval": first.id },
|
|
3110
|
+
h(Icon, { name: "alert", size: 14 }),
|
|
3111
|
+
h(
|
|
3112
|
+
"div",
|
|
3113
|
+
{ className: "mesh-banner-main" },
|
|
3114
|
+
h("span", { className: "mesh-banner-title" }, `「${name}」想派一个任务过来${more}`),
|
|
3115
|
+
h("span", { className: "mesh-banner-detail" }, `允许后这台设备以后不再问:${preview}`),
|
|
3116
|
+
),
|
|
3117
|
+
h(Button, { variant: "primary", size: "sm", loading: busy, onClick: () => onDecide(first.id, "allow") }, "允许"),
|
|
3118
|
+
h(Button, { variant: "ghost", size: "sm", disabled: busy, onClick: () => onDecide(first.id, "deny") }, "拒绝"),
|
|
3119
|
+
);
|
|
3120
|
+
}
|
|
3121
|
+
|
|
3122
|
+
/**
|
|
3123
|
+
* 「看演示」:没有第二台机器也能看见完整闭环。
|
|
3124
|
+
*
|
|
3125
|
+
* 这是唯一能让单机用户理解产品的东西。它**不连网络、不建会话、不花 token**,
|
|
3126
|
+
* 但结果里的数字是这台机器的真实数据(走 GET /mesh/api/demo),所以看起来
|
|
3127
|
+
* 不像编的。装好第二台之后,同一条链路会真的在那边跑。
|
|
3128
|
+
*/
|
|
3129
|
+
function DemoOverlay({ open, onClose }) {
|
|
3130
|
+
const [phase, setPhase] = react.useState("loading");
|
|
3131
|
+
const [data, setData] = react.useState(null);
|
|
3132
|
+
const [error, setError] = react.useState("");
|
|
3133
|
+
const [run, setRun] = react.useState(0);
|
|
3134
|
+
const [copied, setCopied] = react.useState(false);
|
|
3135
|
+
|
|
3136
|
+
react.useEffect(() => {
|
|
3137
|
+
if (!open) return undefined;
|
|
3138
|
+
let alive = true;
|
|
3139
|
+
const timers = [];
|
|
3140
|
+
setPhase("loading");
|
|
3141
|
+
setError("");
|
|
3142
|
+
setCopied(false);
|
|
3143
|
+
apiGet("/demo")
|
|
3144
|
+
.then((r) => {
|
|
3145
|
+
if (!alive) return;
|
|
3146
|
+
if (!r || !r.ok) {
|
|
3147
|
+
setError(apiErr(r));
|
|
3148
|
+
setPhase("error");
|
|
3149
|
+
return;
|
|
3150
|
+
}
|
|
3151
|
+
setData(r);
|
|
3152
|
+
setPhase("queued");
|
|
3153
|
+
timers.push(setTimeout(() => alive && setPhase("running"), 900));
|
|
3154
|
+
timers.push(setTimeout(() => alive && setPhase("done"), 3000));
|
|
3155
|
+
})
|
|
3156
|
+
.catch((e) => {
|
|
3157
|
+
if (!alive) return;
|
|
3158
|
+
setError(String((e && e.message) || e));
|
|
3159
|
+
setPhase("error");
|
|
3160
|
+
});
|
|
3161
|
+
return () => {
|
|
3162
|
+
alive = false;
|
|
3163
|
+
timers.forEach((t) => clearTimeout(t));
|
|
3164
|
+
};
|
|
3165
|
+
}, [open, run]);
|
|
3166
|
+
|
|
3167
|
+
if (!open) return null;
|
|
3168
|
+
|
|
3169
|
+
const stage = phase === "done" ? 2 : phase === "running" ? 1 : phase === "queued" ? 0 : -1;
|
|
3170
|
+
const stepClass = (i) => cls("mesh-demo-step", stage === i && "is-active", stage > i && "is-done");
|
|
3171
|
+
const dot = (i) => (stage === i ? h("span", { className: "mesh-demo-spin" }) : stage > i ? "✓" : "");
|
|
3172
|
+
const install = "dsh plugin add dsh-plugin-mesh";
|
|
3173
|
+
|
|
3174
|
+
return h(
|
|
3175
|
+
"div",
|
|
3176
|
+
{ className: "mesh-demo-layer", role: "dialog", "aria-modal": "true", "aria-label": "Mesh 演示", onClick: (e) => e.target === e.currentTarget && onClose() },
|
|
3177
|
+
h(
|
|
3178
|
+
"div",
|
|
3179
|
+
{ className: "mesh-demo-card" },
|
|
3180
|
+
h(
|
|
3181
|
+
"div",
|
|
3182
|
+
{ className: "mesh-demo-head" },
|
|
3183
|
+
h(Dot, { kind: "ok" }),
|
|
3184
|
+
h(
|
|
3185
|
+
"div",
|
|
3186
|
+
{ style: { flex: 1, minWidth: 0 } },
|
|
3187
|
+
h("div", { className: "mesh-demo-eyebrow" }, "演示 · 不连接其他机器"),
|
|
3188
|
+
h("div", { className: "mesh-demo-title" }, "一次跨机派发长什么样"),
|
|
3189
|
+
),
|
|
3190
|
+
h(IconButton, { icon: "close", label: "关闭演示", onClick: onClose }),
|
|
3191
|
+
),
|
|
3192
|
+
h(
|
|
3193
|
+
"div",
|
|
3194
|
+
{ className: "mesh-demo-body" },
|
|
3195
|
+
h(
|
|
3196
|
+
"div",
|
|
3197
|
+
{ className: "mesh-demo-peer" },
|
|
3198
|
+
h(Dot, { kind: "ok" }),
|
|
3199
|
+
h("span", { className: "mesh-demo-peer-name" }, "演示机 · Studio"),
|
|
3200
|
+
h("span", { className: "mesh-demo-peer-meta" }, "在线 · 示例"),
|
|
3201
|
+
),
|
|
3202
|
+
h("div", { className: "mesh-demo-task" }, "报一下你的系统和负载"),
|
|
3203
|
+
h(
|
|
3204
|
+
"div",
|
|
3205
|
+
{ className: "mesh-demo-steps" },
|
|
3206
|
+
h("div", { className: stage >= 0 ? "mesh-demo-step is-done" : "mesh-demo-step" }, h("span", { className: "mesh-demo-step-dot" }, stage >= 0 ? "✓" : ""), "已送达对端"),
|
|
3207
|
+
h("div", { className: stepClass(1) }, h("span", { className: "mesh-demo-step-dot" }, dot(1)), stage === 1 ? "对端正在跑" : "对端执行完毕"),
|
|
3208
|
+
h("div", { className: stepClass(2) }, h("span", { className: "mesh-demo-step-dot" }, dot(2)), "结果回到这里"),
|
|
3209
|
+
),
|
|
3210
|
+
phase === "error"
|
|
3211
|
+
? h("div", { className: "mesh-demo-caption" }, `取不到本机数据:${error}(演示依赖插件主机在线)`)
|
|
3212
|
+
: null,
|
|
3213
|
+
phase === "done" && data
|
|
3214
|
+
? h(
|
|
3215
|
+
"div",
|
|
3216
|
+
{ className: "mesh-demo-result" },
|
|
3217
|
+
h(
|
|
3218
|
+
"div",
|
|
3219
|
+
{ className: "mesh-demo-result-head" },
|
|
3220
|
+
h(Icon, { name: "check", size: 14 }),
|
|
3221
|
+
h("span", { className: "mesh-demo-result-title" }, "任务完成 · 结果卡"),
|
|
3222
|
+
),
|
|
3223
|
+
h(
|
|
3224
|
+
"div",
|
|
3225
|
+
{ className: "mesh-demo-result-rows" },
|
|
3226
|
+
h("div", { className: "mesh-demo-result-row" }, h("span", { className: "mesh-demo-result-k" }, "机器"), h("span", { className: "mesh-demo-result-v" }, `${data.hostname || data.machine} · ${osLabel(data.platform)} ${data.release}`)),
|
|
3227
|
+
h("div", { className: "mesh-demo-result-row" }, h("span", { className: "mesh-demo-result-k" }, "CPU"), h("span", { className: "mesh-demo-result-v" }, `${data.cpuModel || "未知型号"} · ${data.cpuCores} 核`)),
|
|
3228
|
+
h("div", { className: "mesh-demo-result-row" }, h("span", { className: "mesh-demo-result-k" }, "内存"), h("span", { className: "mesh-demo-result-v" }, `${data.memFreeGb} GB 可用 / ${data.memTotalGb} GB`)),
|
|
3229
|
+
h("div", { className: "mesh-demo-result-row" }, h("span", { className: "mesh-demo-result-k" }, "负载"), h("span", { className: "mesh-demo-result-v" }, `${data.load1}(1 分钟)· 已运行 ${data.uptimeHours} 小时`)),
|
|
3230
|
+
h("div", { className: "mesh-demo-result-row" }, h("span", { className: "mesh-demo-result-k" }, "运行时"), h("span", { className: "mesh-demo-result-v" }, (data.runtimes || []).map((r) => `${r.name} ${r.version}`).join(" · ") || "未探测到")),
|
|
3231
|
+
),
|
|
3232
|
+
)
|
|
3233
|
+
: null,
|
|
3234
|
+
phase === "done"
|
|
3235
|
+
? h(
|
|
3236
|
+
"div",
|
|
3237
|
+
null,
|
|
3238
|
+
h("p", { className: "mesh-demo-caption" }, "上面的数字来自这台机器本身 —— 演示只证明流程,不假装有第二台。装好第二台之后,同一句话会真的在那边跑,结果回到这里;合上笔记本也不影响。"),
|
|
3239
|
+
h(
|
|
3240
|
+
"div",
|
|
3241
|
+
{ className: "mesh-demo-code" },
|
|
3242
|
+
h("code", null, install),
|
|
3243
|
+
h(
|
|
3244
|
+
Button,
|
|
3245
|
+
{
|
|
3246
|
+
variant: "ghost",
|
|
3247
|
+
size: "sm",
|
|
3248
|
+
icon: copied ? "check" : "copy",
|
|
3249
|
+
onClick: async () => {
|
|
3250
|
+
const ok = await copyText(install);
|
|
3251
|
+
setCopied(ok);
|
|
3252
|
+
},
|
|
3253
|
+
},
|
|
3254
|
+
copied ? "已复制" : "复制",
|
|
3255
|
+
),
|
|
3256
|
+
),
|
|
3257
|
+
)
|
|
3258
|
+
: h("p", { className: "mesh-demo-caption" }, "派发出去之后这里会变成「在跑」,跑完自动变成结果卡 —— 你不用盯着。"),
|
|
3259
|
+
),
|
|
3260
|
+
h(
|
|
3261
|
+
"div",
|
|
3262
|
+
{ className: "mesh-demo-foot" },
|
|
3263
|
+
h("span", { className: "mesh-demo-note" }, "演示不会唤醒 agent,也不花 token。"),
|
|
3264
|
+
h(Button, { variant: "ghost", size: "sm", icon: "refresh", onClick: () => setRun((n) => n + 1) }, "再看一遍"),
|
|
3265
|
+
h(Button, { variant: "primary", size: "sm", onClick: onClose }, "知道了"),
|
|
3266
|
+
),
|
|
3267
|
+
),
|
|
3268
|
+
);
|
|
3269
|
+
}
|
|
3270
|
+
|
|
2980
3271
|
function LoadingView() {
|
|
2981
3272
|
return h("div", { className: "mesh-loading" }, h("span", { className: "mesh-spinner-lg" }), h("span", null, "正在读取 Mesh 状态…"));
|
|
2982
3273
|
}
|
|
@@ -3353,7 +3644,7 @@ window.__ModuleLoader__.load({
|
|
|
3353
3644
|
);
|
|
3354
3645
|
}
|
|
3355
3646
|
|
|
3356
|
-
function DeviceList({ selfPeer, peers, selectedId, onSelect, onWeb, onSsh, now, lastOk, onScan, scanning }) {
|
|
3647
|
+
function DeviceList({ selfPeer, peers, selectedId, onSelect, onWeb, onSsh, now, lastOk, onScan, scanning, onDemo }) {
|
|
3357
3648
|
return h(
|
|
3358
3649
|
"aside",
|
|
3359
3650
|
{ className: "mesh-list-pane" },
|
|
@@ -3380,7 +3671,17 @@ window.__ModuleLoader__.load({
|
|
|
3380
3671
|
h("div", { className: "mesh-list-heading" }, "其他设备"),
|
|
3381
3672
|
peers.length
|
|
3382
3673
|
? peers.map((p, i) => h(DeviceRow, { key: p.id, peer: p, active: selectedId === p.id, onSelect, onWeb, onSsh, now, index: i + 1 }))
|
|
3383
|
-
: h(
|
|
3674
|
+
: h(
|
|
3675
|
+
"div",
|
|
3676
|
+
{ className: "mesh-list-empty" },
|
|
3677
|
+
h("div", null, "还没有发现其他设备。"),
|
|
3678
|
+
h("div", { style: { marginTop: 8 } },
|
|
3679
|
+
onDemo
|
|
3680
|
+
? h(Button, { variant: "primary", size: "sm", icon: "arrowOut", onClick: onDemo }, "看 60 秒演示")
|
|
3681
|
+
: null,
|
|
3682
|
+
),
|
|
3683
|
+
h("div", { style: { marginTop: 6, fontSize: 10.5 } }, "或者在另一台电脑上装一次,它们会自己找到彼此。"),
|
|
3684
|
+
),
|
|
3384
3685
|
h(
|
|
3385
3686
|
"div",
|
|
3386
3687
|
{ className: "mesh-list-actions" },
|
|
@@ -3557,7 +3858,7 @@ window.__ModuleLoader__.load({
|
|
|
3557
3858
|
}
|
|
3558
3859
|
|
|
3559
3860
|
function DeviceView(props) {
|
|
3560
|
-
const { selfPeer, peers, selectedPeer, selectedId, onSelect, onWeb, onSsh, mobilePane, onBack, onCompose, onProbe, probe, hostDown, now, lastOk, onScan, scanning, firstRun, onRename, recentTasks, onOpenTask, onAllTasks } = props;
|
|
3861
|
+
const { selfPeer, peers, selectedPeer, selectedId, onSelect, onWeb, onSsh, mobilePane, onBack, onCompose, onProbe, probe, hostDown, now, lastOk, onScan, scanning, onDemo, firstRun, onRename, recentTasks, onOpenTask, onAllTasks } = props;
|
|
3561
3862
|
return h(
|
|
3562
3863
|
react.Fragment,
|
|
3563
3864
|
null,
|
|
@@ -3565,7 +3866,7 @@ window.__ModuleLoader__.load({
|
|
|
3565
3866
|
h(
|
|
3566
3867
|
"div",
|
|
3567
3868
|
{ className: "mesh-split", "data-pane": mobilePane },
|
|
3568
|
-
h(DeviceList, { selfPeer, peers, selectedId, onSelect, onWeb, onSsh, now, lastOk, onScan, scanning }),
|
|
3869
|
+
h(DeviceList, { selfPeer, peers, selectedId, onSelect, onWeb, onSsh, now, lastOk, onScan, scanning, onDemo }),
|
|
3569
3870
|
h(DeviceDetail, { peer: selectedPeer, isSelf: selectedId === "self", onCompose, onProbe, probe, hostDown, now, onBack, onRename, onScan, recentTasks, onOpenTask, onAllTasks }),
|
|
3570
3871
|
),
|
|
3571
3872
|
);
|
|
@@ -3679,6 +3980,27 @@ window.__ModuleLoader__.load({
|
|
|
3679
3980
|
h("strong", null, target.machine || "?"),
|
|
3680
3981
|
h("span", { style: { marginLeft: "auto" } }, online ? "对端会在自己的会话里执行" : "设备离线"),
|
|
3681
3982
|
),
|
|
3983
|
+
h(
|
|
3984
|
+
"div",
|
|
3985
|
+
{ className: "mesh-chips", style: { marginBottom: 8 } },
|
|
3986
|
+
[
|
|
3987
|
+
"在 Windows 那台编译,产物和报错都发我",
|
|
3988
|
+
"装到 Android 上启动一下,截图和日志发我",
|
|
3989
|
+
"在另一台装新版本插件,重启后确认版本",
|
|
3990
|
+
].map((preset) =>
|
|
3991
|
+
h(
|
|
3992
|
+
"button",
|
|
3993
|
+
{
|
|
3994
|
+
key: preset,
|
|
3995
|
+
type: "button",
|
|
3996
|
+
className: "mesh-chip mesh-chip-btn",
|
|
3997
|
+
onClick: () => setTask(preset),
|
|
3998
|
+
title: "填入这句话",
|
|
3999
|
+
},
|
|
4000
|
+
preset,
|
|
4001
|
+
),
|
|
4002
|
+
),
|
|
4003
|
+
),
|
|
3682
4004
|
h(
|
|
3683
4005
|
Field,
|
|
3684
4006
|
{ label: "要对方做什么?" },
|
|
@@ -3713,7 +4035,7 @@ window.__ModuleLoader__.load({
|
|
|
3713
4035
|
),
|
|
3714
4036
|
),
|
|
3715
4037
|
error ? h("div", { className: "mesh-sheet-error" }, error) : null,
|
|
3716
|
-
h("p", { className: "mesh-hint" }, "
|
|
4038
|
+
h("p", { className: "mesh-hint" }, "派发是异步的:这里成功只代表对端收了。它跑完会把结果派回来,出现在「任务」里。第一次派给陌生设备时,对方会先问你一次。⌘/Ctrl + Enter 发送。"),
|
|
3717
4039
|
),
|
|
3718
4040
|
h(
|
|
3719
4041
|
"div",
|
|
@@ -4437,6 +4759,10 @@ window.__ModuleLoader__.load({
|
|
|
4437
4759
|
dispatched: ["已派发", "ok"],
|
|
4438
4760
|
"queued-lost": ["排队丢失", "err"],
|
|
4439
4761
|
"dispatch-failed": ["派发失败", "err"],
|
|
4762
|
+
// 信任闸门:发出去的还在等对端点「允许」,收到的等本机点「允许」
|
|
4763
|
+
"awaiting-approval": ["等对端确认", "warn"],
|
|
4764
|
+
"needs-approval": ["待本机确认", "warn"],
|
|
4765
|
+
rejected: ["已拒绝", "err"],
|
|
4440
4766
|
};
|
|
4441
4767
|
|
|
4442
4768
|
function taskList(state) {
|
|
@@ -4462,7 +4788,13 @@ window.__ModuleLoader__.load({
|
|
|
4462
4788
|
at: tsOf(t.at),
|
|
4463
4789
|
text: String(t.task || ""),
|
|
4464
4790
|
thread: t.thread || "",
|
|
4465
|
-
status: t.ok
|
|
4791
|
+
status: t.ok
|
|
4792
|
+
? t.remoteStatus === "needs-approval"
|
|
4793
|
+
? "awaiting-approval"
|
|
4794
|
+
: "delivered"
|
|
4795
|
+
: t.status === 403
|
|
4796
|
+
? "pairing-mismatch"
|
|
4797
|
+
: "failed",
|
|
4466
4798
|
raw: t,
|
|
4467
4799
|
}));
|
|
4468
4800
|
return [...inbound, ...outbound].sort((a, b) => b.at - a.at);
|
|
@@ -5953,7 +6285,14 @@ window.__ModuleLoader__.load({
|
|
|
5953
6285
|
h("span", { className: "mesh-mini-meta" }, p.online ? `在线 · ${osLabel(p.os)}` : `${ago(p.lastSeen, now)}`),
|
|
5954
6286
|
),
|
|
5955
6287
|
)
|
|
5956
|
-
: h(
|
|
6288
|
+
: h(
|
|
6289
|
+
"div",
|
|
6290
|
+
null,
|
|
6291
|
+
h("p", { className: "mesh-card-text" }, "还没有发现其他设备。扫描本网段,或让对方也打开 Mesh。"),
|
|
6292
|
+
onDemo
|
|
6293
|
+
? h(Button, { variant: "secondary", size: "sm", icon: "arrowOut", onClick: onDemo }, "看演示:一次派发长什么样")
|
|
6294
|
+
: null,
|
|
6295
|
+
),
|
|
5957
6296
|
footer: h(Button, { variant: "ghost", size: "sm", icon: "device", onClick: onDevices }, "查看全部设备"),
|
|
5958
6297
|
});
|
|
5959
6298
|
}
|
|
@@ -6509,7 +6848,6 @@ window.__ModuleLoader__.load({
|
|
|
6509
6848
|
const checking = phase === "checking";
|
|
6510
6849
|
const state = (install && install.state) || "idle";
|
|
6511
6850
|
const running = state === "running";
|
|
6512
|
-
const armed = state === "armed";
|
|
6513
6851
|
const installFailed = state === "failed";
|
|
6514
6852
|
const busy = checking || running;
|
|
6515
6853
|
const pending =
|
|
@@ -6585,12 +6923,10 @@ window.__ModuleLoader__.load({
|
|
|
6585
6923
|
disabled: running,
|
|
6586
6924
|
title: installFailed
|
|
6587
6925
|
? `上次安装失败:${String(install.error || "未知原因")};点一下重试`
|
|
6588
|
-
:
|
|
6589
|
-
|
|
6590
|
-
: `一键安装 v${report.latest}(先校验 sha512,可加载检查通过才替换)`,
|
|
6591
|
-
"aria-label": armed ? `确认安装 v${report.latest}` : `安装 v${report.latest}`,
|
|
6926
|
+
: `安装 v${report.latest}(先弹确认,再下载、校验、替换)`,
|
|
6927
|
+
"aria-label": `安装 v${report.latest}`,
|
|
6592
6928
|
},
|
|
6593
|
-
installFailed ? "安装失败" : running ? "安装中…" :
|
|
6929
|
+
installFailed ? "安装失败" : running ? "安装中…" : `新版本 v${report.latest}`,
|
|
6594
6930
|
)
|
|
6595
6931
|
: null,
|
|
6596
6932
|
failed && !canInstall
|
|
@@ -6610,14 +6946,88 @@ window.__ModuleLoader__.load({
|
|
|
6610
6946
|
);
|
|
6611
6947
|
}
|
|
6612
6948
|
|
|
6949
|
+
/**
|
|
6950
|
+
* 安装确认弹窗:一次点击就打开,把"要发生什么"说清楚再动手。
|
|
6951
|
+
*
|
|
6952
|
+
* 为什么不是"点两下":旧版把第一次点击做成静默确认态,按钮文案虽然变了,
|
|
6953
|
+
* 但没有别的提示,很多人点一下就以为装完了(真机反馈:点一次就重启,
|
|
6954
|
+
* 结果还是旧版本)。确认应该是一个看得见的弹窗,而不是一个容易错过的按钮状态。
|
|
6955
|
+
*/
|
|
6956
|
+
function InstallConfirm({ report, busy, onCancel, onConfirm }) {
|
|
6957
|
+
const to = report && report.latest ? String(report.latest) : "";
|
|
6958
|
+
const from = report ? String(report.current || report.diskVersion || "?") : "?";
|
|
6959
|
+
react.useEffect(() => {
|
|
6960
|
+
const onKey = (e) => {
|
|
6961
|
+
if (e.key === "Escape" && !busy) onCancel();
|
|
6962
|
+
};
|
|
6963
|
+
document.addEventListener("keydown", onKey);
|
|
6964
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
6965
|
+
}, [busy, onCancel]);
|
|
6966
|
+
if (!report || report.hasUpdate !== true || !to) return null;
|
|
6967
|
+
return h(
|
|
6968
|
+
"div",
|
|
6969
|
+
{
|
|
6970
|
+
className: "mesh-confirm-layer",
|
|
6971
|
+
role: "dialog",
|
|
6972
|
+
"aria-modal": "true",
|
|
6973
|
+
"aria-label": `安装 v${to}`,
|
|
6974
|
+
onClick: (e) => {
|
|
6975
|
+
if (e.target === e.currentTarget && !busy) onCancel();
|
|
6976
|
+
},
|
|
6977
|
+
},
|
|
6978
|
+
h(
|
|
6979
|
+
"div",
|
|
6980
|
+
{ className: "mesh-confirm-card" },
|
|
6981
|
+
h(
|
|
6982
|
+
"div",
|
|
6983
|
+
{ className: "mesh-confirm-head" },
|
|
6984
|
+
h(Icon, { name: "arrowUp", size: 15 }),
|
|
6985
|
+
h("span", { className: "mesh-confirm-title" }, `安装 Mesh v${to}?`),
|
|
6986
|
+
),
|
|
6987
|
+
h(
|
|
6988
|
+
"div",
|
|
6989
|
+
{ className: "mesh-confirm-body" },
|
|
6990
|
+
h(
|
|
6991
|
+
"p",
|
|
6992
|
+
null,
|
|
6993
|
+
"当前 ",
|
|
6994
|
+
h("span", { className: "mesh-confirm-ver" }, `v${from}`),
|
|
6995
|
+
" → 目标 ",
|
|
6996
|
+
h("span", { className: "mesh-confirm-ver" }, `v${to}`),
|
|
6997
|
+
),
|
|
6998
|
+
h(
|
|
6999
|
+
"ul",
|
|
7000
|
+
{ className: "mesh-confirm-list" },
|
|
7001
|
+
h("li", null, "从 npm 下载,并校验 sha512"),
|
|
7002
|
+
h("li", null, "可加载检查通过后才替换文件;旧版本会备份,可回滚"),
|
|
7003
|
+
h("li", null, "装完在顶部点「重启生效」;只改界面时会提示重载即可"),
|
|
7004
|
+
),
|
|
7005
|
+
h("p", { className: "mesh-confirm-warn" }, "重启 DSH 会中断当前会话。"),
|
|
7006
|
+
),
|
|
7007
|
+
h(
|
|
7008
|
+
"div",
|
|
7009
|
+
{ className: "mesh-confirm-foot" },
|
|
7010
|
+
h(Button, { variant: "ghost", disabled: busy, onClick: onCancel }, "取消"),
|
|
7011
|
+
h(
|
|
7012
|
+
Button,
|
|
7013
|
+
{ variant: "primary", loading: busy, onClick: onConfirm },
|
|
7014
|
+
busy ? "安装中…" : `安装 v${to}`,
|
|
7015
|
+
),
|
|
7016
|
+
),
|
|
7017
|
+
),
|
|
7018
|
+
);
|
|
7019
|
+
}
|
|
7020
|
+
|
|
6613
7021
|
/**
|
|
6614
7022
|
* 检查更新的容器:进主页**静默**查一次(宿主机缓存 30 分钟),点一下强查。
|
|
6615
|
-
*
|
|
7023
|
+
* 点「新版本」→ 弹确认框 → 点「安装」才真的动手。
|
|
6616
7024
|
*/
|
|
6617
7025
|
function UpdateLink({ push }) {
|
|
6618
7026
|
const [phase, setPhase] = react.useState("idle");
|
|
6619
7027
|
const [report, setReport] = react.useState(null);
|
|
6620
7028
|
const [install, setInstall] = react.useState({ state: "idle", error: "" });
|
|
7029
|
+
// 安装确认弹窗:点「新版本」打开,点「安装」才真的开始
|
|
7030
|
+
const [confirmOpen, setConfirmOpen] = react.useState(false);
|
|
6621
7031
|
const alive = react.useRef(true);
|
|
6622
7032
|
const run = react.useCallback(
|
|
6623
7033
|
async (force, announce) => {
|
|
@@ -6661,19 +7071,9 @@ window.__ModuleLoader__.load({
|
|
|
6661
7071
|
alive.current = false;
|
|
6662
7072
|
};
|
|
6663
7073
|
}, [run]);
|
|
6664
|
-
// 确认态 6 秒后自动取消:避免"上次点了一半"的按钮一直挂着。
|
|
6665
|
-
react.useEffect(() => {
|
|
6666
|
-
if (install.state !== "armed") return;
|
|
6667
|
-
const timer = setTimeout(() => setInstall({ state: "idle", error: "" }), 6000);
|
|
6668
|
-
return () => clearTimeout(timer);
|
|
6669
|
-
}, [install.state]);
|
|
6670
|
-
|
|
6671
7074
|
const startInstall = react.useCallback(async () => {
|
|
6672
7075
|
if (!report || report.ok !== true || !report.latest) return;
|
|
6673
|
-
|
|
6674
|
-
setInstall({ state: "armed", error: "" });
|
|
6675
|
-
return;
|
|
6676
|
-
}
|
|
7076
|
+
setConfirmOpen(false);
|
|
6677
7077
|
setInstall({ state: "running", error: "" });
|
|
6678
7078
|
try {
|
|
6679
7079
|
const r = await api("/upgrade", { version: report.latest });
|
|
@@ -6699,7 +7099,7 @@ window.__ModuleLoader__.load({
|
|
|
6699
7099
|
setInstall({ state: "failed", error: String((e && e.message) || e) });
|
|
6700
7100
|
push("error", `安装失败:${String((e && e.message) || e)}`);
|
|
6701
7101
|
}
|
|
6702
|
-
}, [
|
|
7102
|
+
}, [push, report, run]);
|
|
6703
7103
|
|
|
6704
7104
|
const restart = react.useCallback(async () => {
|
|
6705
7105
|
try {
|
|
@@ -6731,15 +7131,27 @@ window.__ModuleLoader__.load({
|
|
|
6731
7131
|
}
|
|
6732
7132
|
}, [push]);
|
|
6733
7133
|
|
|
6734
|
-
return h(
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
7134
|
+
return h(
|
|
7135
|
+
react.Fragment,
|
|
7136
|
+
null,
|
|
7137
|
+
h(UpdateLinkView, {
|
|
7138
|
+
phase,
|
|
7139
|
+
report,
|
|
7140
|
+
install,
|
|
7141
|
+
onCheck: () => run(true, true),
|
|
7142
|
+
onInstall: () => setConfirmOpen(true),
|
|
7143
|
+
onRestart: restart,
|
|
7144
|
+
onReload: reload,
|
|
7145
|
+
}),
|
|
7146
|
+
confirmOpen
|
|
7147
|
+
? h(InstallConfirm, {
|
|
7148
|
+
report,
|
|
7149
|
+
busy: install.state === "running",
|
|
7150
|
+
onCancel: () => setConfirmOpen(false),
|
|
7151
|
+
onConfirm: startInstall,
|
|
7152
|
+
})
|
|
7153
|
+
: null,
|
|
7154
|
+
);
|
|
6743
7155
|
}
|
|
6744
7156
|
|
|
6745
7157
|
function HomeMetaLinks({ state, push }) {
|
|
@@ -6930,6 +7342,7 @@ window.__ModuleLoader__.load({
|
|
|
6930
7342
|
onSsh,
|
|
6931
7343
|
onScan,
|
|
6932
7344
|
scanning,
|
|
7345
|
+
onDemo,
|
|
6933
7346
|
firstRun,
|
|
6934
7347
|
hostDown,
|
|
6935
7348
|
onDispatched,
|
|
@@ -7663,6 +8076,10 @@ window.__ModuleLoader__.load({
|
|
|
7663
8076
|
const [transferDraft, setTransferDraft] = react.useState(null);
|
|
7664
8077
|
const [transferLogOpen, setTransferLogOpen] = react.useState(false);
|
|
7665
8078
|
const [transfers, setTransfers] = react.useState(() => loadTransfers());
|
|
8079
|
+
// 「看演示」:单机用户也能看见完整闭环(不连网络、不建会话)
|
|
8080
|
+
const [demoOpen, setDemoOpen] = react.useState(false);
|
|
8081
|
+
// 陌生设备首次派活的确认动作进行中
|
|
8082
|
+
const [approvalBusy, setApprovalBusy] = react.useState(false);
|
|
7666
8083
|
const sessionId = currentSessionId();
|
|
7667
8084
|
|
|
7668
8085
|
const self = state && state.self ? state.self : null;
|
|
@@ -7735,6 +8152,30 @@ window.__ModuleLoader__.load({
|
|
|
7735
8152
|
: null;
|
|
7736
8153
|
const hostDown = !!error;
|
|
7737
8154
|
|
|
8155
|
+
/**
|
|
8156
|
+
* 陌生设备第一次派活的确认。
|
|
8157
|
+
*
|
|
8158
|
+
* 允许 = 对端写进本机信任列表并立刻开始执行;拒绝 = 只标记,不执行。
|
|
8159
|
+
* 两种情况都刷新一次状态,让确认条和任务列表同时更新。
|
|
8160
|
+
*/
|
|
8161
|
+
const decideApproval = async (id, action) => {
|
|
8162
|
+
if (!id || approvalBusy) return;
|
|
8163
|
+
setApprovalBusy(true);
|
|
8164
|
+
try {
|
|
8165
|
+
const r = await api("/approval", { id, action });
|
|
8166
|
+
if (r && r.ok) {
|
|
8167
|
+
push("success", action === "allow" ? "已允许这台设备,任务开始执行" : "已拒绝这次派发");
|
|
8168
|
+
} else {
|
|
8169
|
+
push("error", apiErr(r));
|
|
8170
|
+
}
|
|
8171
|
+
await reload();
|
|
8172
|
+
} catch (e) {
|
|
8173
|
+
push("error", String((e && e.message) || e));
|
|
8174
|
+
} finally {
|
|
8175
|
+
setApprovalBusy(false);
|
|
8176
|
+
}
|
|
8177
|
+
};
|
|
8178
|
+
|
|
7738
8179
|
const saveName = async (raw) => {
|
|
7739
8180
|
const name = String(raw || "").trim();
|
|
7740
8181
|
if (!name) return false;
|
|
@@ -7954,7 +8395,11 @@ window.__ModuleLoader__.load({
|
|
|
7954
8395
|
* 设备页弹层和主页的派发面板共用它,免得两处提示文案慢慢走散。
|
|
7955
8396
|
*/
|
|
7956
8397
|
const notifyDispatched = (name, r) => {
|
|
7957
|
-
|
|
8398
|
+
// 202 = 对端收到了,但在等人点「允许」。不能把「送达」说成「开跑」。
|
|
8399
|
+
const pending = !!(r && r.pendingApproval);
|
|
8400
|
+
push(pending ? "info" : "success", pending
|
|
8401
|
+
? `已送达 ${name || "对端"},等它那边点一次「允许」`
|
|
8402
|
+
: `已派发给 ${name || "对端"}${r && r.id ? `(${r.id})` : ""}`, {
|
|
7958
8403
|
label: "查看任务",
|
|
7959
8404
|
onClick: () => {
|
|
7960
8405
|
setView("tasks");
|
|
@@ -8205,6 +8650,9 @@ window.__ModuleLoader__.load({
|
|
|
8205
8650
|
},
|
|
8206
8651
|
})
|
|
8207
8652
|
: null,
|
|
8653
|
+
state.approvals && state.approvals.length
|
|
8654
|
+
? h(ApprovalBar, { items: state.approvals, busy: approvalBusy, onDecide: decideApproval })
|
|
8655
|
+
: null,
|
|
8208
8656
|
h(
|
|
8209
8657
|
"main",
|
|
8210
8658
|
{ key: view, className: "mesh-view", role: "tabpanel", "aria-label": view === "home" ? "主页" : view === "devices" ? "设备" : view === "tasks" ? "任务" : "连接" },
|
|
@@ -8234,6 +8682,7 @@ window.__ModuleLoader__.load({
|
|
|
8234
8682
|
onSsh: (peer) => setSshPeer(peer),
|
|
8235
8683
|
onScan: doScan,
|
|
8236
8684
|
scanning,
|
|
8685
|
+
onDemo: () => setDemoOpen(true),
|
|
8237
8686
|
firstRun: firstRunNode,
|
|
8238
8687
|
hostDown,
|
|
8239
8688
|
onDispatched: (peer, r) => notifyDispatched((peer && peer.machine) || "", r),
|
|
@@ -8259,6 +8708,7 @@ window.__ModuleLoader__.load({
|
|
|
8259
8708
|
lastOk,
|
|
8260
8709
|
onScan: doScan,
|
|
8261
8710
|
scanning,
|
|
8711
|
+
onDemo: () => setDemoOpen(true),
|
|
8262
8712
|
recentTasks,
|
|
8263
8713
|
onOpenTask: openTask,
|
|
8264
8714
|
onAllTasks: openAllTasks,
|
|
@@ -8328,6 +8778,7 @@ window.__ModuleLoader__.load({
|
|
|
8328
8778
|
h(WebPanel, { panel: webPanel, onClose: closeWebPanel, onReload: reloadWebPanel }),
|
|
8329
8779
|
sshPeer ? h(SshPanel, { peer: sshPeer, onClose: () => setSshPeer(null) }) : null,
|
|
8330
8780
|
h(Toasts, { items: toasts, onClose: close }),
|
|
8781
|
+
h(DemoOverlay, { open: demoOpen, onClose: () => setDemoOpen(false) }),
|
|
8331
8782
|
);
|
|
8332
8783
|
}
|
|
8333
8784
|
|
|
@@ -8377,6 +8828,8 @@ window.__ModuleLoader__.load({
|
|
|
8377
8828
|
HomeView,
|
|
8378
8829
|
HomeBoard,
|
|
8379
8830
|
DispatchPanel,
|
|
8831
|
+
DemoOverlay,
|
|
8832
|
+
ApprovalBar,
|
|
8380
8833
|
DeviceList,
|
|
8381
8834
|
TasksView,
|
|
8382
8835
|
DeviceDetail,
|
|
@@ -8413,6 +8866,7 @@ window.__ModuleLoader__.load({
|
|
|
8413
8866
|
HomeMetaLinks,
|
|
8414
8867
|
UpdateLink,
|
|
8415
8868
|
UpdateLinkView,
|
|
8869
|
+
InstallConfirm,
|
|
8416
8870
|
FeedbackLink,
|
|
8417
8871
|
feedbackBody,
|
|
8418
8872
|
feedbackIssueUrl,
|