@noob-stupid/dsh-plugin-console 0.5.2 → 0.5.3

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.md CHANGED
@@ -154,6 +154,29 @@ Requires: DSH ≥ 0.1.0-rc.6 (web profile, with `dsh-client-modules` / `dsh-host
154
154
 
155
155
  ---
156
156
 
157
+ ## Screenshots · 界面一览
158
+
159
+ > 入口挂在**官方插件管理页自己的插槽**(`plugins.bundle.config`,key = 包名):装完之后它出现在
160
+ > 「设置 → 插件 → 已安装」里我们这一条下面,用的是官方容器与官方风格 —— 不是 DOM 注入,官方更新也不怕。
161
+
162
+ **1 · 已安装列表里的入口**(官方页,点开我们这条即见)
163
+
164
+ ![Entry inside the official plugins page](docs/images/official-plugins-page.png)
165
+
166
+ **2 · 「升级安全」面板**(就地展开:运行模式 / 框架版本 / 回滚点 / 环境指纹 / 补声明 / 契约预检 / 各功能入口)
167
+
168
+ ![Upgrade safety panel expanded in place](docs/images/upgrade-safety-panel.png)
169
+
170
+ **3 · 框架升级 / 回滚**(可选目标版本、常驻的升级进度、一键回滚上一版)
171
+
172
+ ![Framework upgrade and rollback panel](docs/images/framework-upgrade-rollback.png)
173
+
174
+ **4 · 门控明细**(谁被隔离、为什么:升级预扫 or 启动失败隔离,附来源与时间)
175
+
176
+ ![Compatibility gate detail list](docs/images/compat-gate-detail.png)
177
+
178
+ ---
179
+
157
180
  ## Features
158
181
 
159
182
  ### Installed plugins (one-click toggle + details)
package/lib/client.js CHANGED
@@ -4962,14 +4962,19 @@ setMessage(t("failed") + ":" + (data?.reason ?? "未知"));
4962
4962
  control === undefined || control === null ? null : control);
4963
4963
  const sw = (on, onClick, title) => el("button", { type: "button", title: title, onClick: onClick, disabled: busy, style: { width: "40px", height: "22px", borderRadius: "999px", border: "none", padding: 0, cursor: busy ? "default" : "pointer", background: on ? "var(--dsw-alias-bg-accent, #4d6bfe)" : "var(--dsw-alias-bg-secondary, rgba(127,127,127,.35))", position: "relative", flex: "0 0 auto", marginTop: "2px" } },
4964
4964
  el("span", { style: { position: "absolute", top: "3px", left: on ? "21px" : "3px", width: "16px", height: "16px", borderRadius: "50%", background: "#fff", transition: "left .18s cubic-bezier(.34,1.56,.64,1)" } }));
4965
- const jump = (id, label) => el("button", { key: id, type: "button", className: styles.toggle, style: { marginRight: "8px", marginBottom: "8px" }, onClick: () => setSection(id) }, label);
4965
+ const jump = (id, label) => el("button", { key: id, type: "button", className: styles.toggle, style: { marginRight: "8px", marginBottom: "8px" }, onClick: () => setSection((prev) => (prev === id ? null : id)) }, label);
4966
4966
  const mode = status !== null && status.mode === "observer" ? "observer" : status !== null && status.mode === "managed" ? "managed" : "observer";
4967
4967
  const fp = status !== null && status.fingerprint !== null && status.fingerprint !== undefined ? status.fingerprint : {};
4968
4968
  const rb = status !== null && status.rollback !== null && status.rollback !== undefined ? status.rollback : {};
4969
4969
  const fw = status !== null && typeof status.frameworkVersion === "string" && status.frameworkVersion !== "" ? status.frameworkVersion : t("safetyUnknown");
4970
4970
  const pending = backfill !== null && typeof backfill.count === "number" ? backfill.count : 0;
4971
4971
  // 触发条:默认只看到这一行(点开在**原地**展开,功能包那种下拉,不走右侧固定抽屉)
4972
- const trigger = el("button", { type: "button", "aria-expanded": open ? "true" : "false", onClick: () => setOpen((prev) => !prev), style: { width: "100%", display: "flex", alignItems: "center", gap: "10px", padding: "12px 14px", borderRadius: "12px", border: "1px solid var(--dsw-alias-border-secondary, rgba(127,127,127,.18))", background: "var(--dsw-alias-bg-layer-4, rgba(127,127,127,.10))", cursor: "pointer", textAlign: "left", color: "inherit" } },
4972
+ // 收起/展开:收起时**清掉就地分区**,否则再展开时内嵌控制台会重新挂载并把上次那个面板自动打开一遍
4973
+ // (用户实测:点过「框架升级/回滚」→ 关掉弹窗 → 收起 → 再展开,弹窗又自己弹出来了)
4974
+ const toggleOpen = () => {
4975
+ if (open) { setOpen(false); setSection(null); } else { setOpen(true); }
4976
+ };
4977
+ const trigger = el("button", { type: "button", "aria-expanded": open ? "true" : "false", onClick: toggleOpen, style: { width: "100%", display: "flex", alignItems: "center", gap: "10px", padding: "12px 14px", borderRadius: "12px", border: "1px solid var(--dsw-alias-border-secondary, rgba(127,127,127,.18))", background: "var(--dsw-alias-bg-layer-4, rgba(127,127,127,.10))", cursor: "pointer", textAlign: "left", color: "inherit" } },
4973
4978
  icon("shield"),
4974
4979
  el("div", { style: { flex: "1 1 auto", minWidth: "0" } },
4975
4980
  el("div", { style: { fontSize: "13px", fontWeight: 500 } }, t("safetyTab")),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noob-stupid/dsh-plugin-console",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "DSH 框架升级安全与插件升级门控:一键升级、失败自动回滚、升级后回滚上版、旧插件不适配自动禁用;内置多源插件市场为发现层,插件源全部可自定义,可指向公司内网私有源 / 私有索引 / 本地 Git 仓库,纯内网离线可用 | Framework upgrade safety & plugin version gating for DSH, with a customizable multi-source plugin market: point every source at internal mirrors or a local file:// repo for intranet-only, offline installs.",
5
5
  "repository": {
6
6
  "type": "git",