dsh-dpharness 0.6.6 → 0.6.8

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/lib/changelog.js CHANGED
@@ -37,6 +37,24 @@ export function npmLatestUrl(pkg) {
37
37
  * (用户要看的是行为变化,不是我们的 commit 分类)。
38
38
  */
39
39
  export const CHANGELOG = [
40
+ {
41
+ version: "0.6.8",
42
+ date: "2026-10-23",
43
+ title: "发布链路迁移到 CI(本次无功能变化)",
44
+ items: [
45
+ "这一版没有功能改动,仅把发版从本机手工发布迁移到 GitHub Actions:以后版本更新不再需要人工授权即可发布,更新更及时。",
46
+ ],
47
+ },
48
+ {
49
+ version: "0.6.7",
50
+ date: "2026-10-23",
51
+ title: "「我的插件」每行的操作不再错位",
52
+ items: [
53
+ "「升级」按钮原来比同一行的其它按钮矮半格,头顶还多一条分隔线;现在与同行按钮同高对齐。",
54
+ "「卸载」不再单独掉到下一行最左:动作整组右对齐,窗口变窄时整组一起换行,不会散开。",
55
+ "点「升级」后的确认提示固定占两行,不再把整行挤变形;失败可直接在行内重试。",
56
+ ],
57
+ },
40
58
  {
41
59
  version: "0.6.6",
42
60
  date: "2026-10-21",
package/lib/client.js CHANGED
@@ -202,7 +202,23 @@ window.__ModuleLoader__.load({
202
202
  /* 「更新」视图的行:第一行 = 谁 + 版本 + 操作;第二行 = 这是什么 + 包名 */
203
203
  ".dph_updItem{display:flex;flex-direction:column;gap:5px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-1);padding:8px 10px;flex:none}",
204
204
  ".dph_updOn{border-color:var(--dsw-alias-state-error-primary)}",
205
- ".dph_upd{display:flex;align-items:center;gap:8px;flex-wrap:wrap}",
205
+ /* 行分两段:左信息、右动作。
206
+ 2026-10-22 修错位:原来所有元素(名称/标签/版本/状态/6 个按钮)平铺在
207
+ 一条 flex 行里,靠 `.dph_spacer{flex:1}` 顶住右端 —— 一旦这行放不下,
208
+ 换行是按**单个元素**发生的,于是最后一个按钮(卸载)被单独甩到下一行最左。
209
+ 现在把动作整组做成**一个** flex 项:放不下就整组换行,并因 margin-left:auto
210
+ 保持右对齐,不会再出现"孤零零一个按钮掉到左边"。 */
211
+ ".dph_upd{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap}",
212
+ ".dph_updInfo{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}",
213
+ ".dph_updActs{flex:none;max-width:100%;margin-left:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}",
214
+ /* 破坏性动作(卸载)与可逆动作(保留/禁用)之间留一道分界,降低误触 */
215
+ ".dph_actDanger{display:inline-flex;align-items:center;gap:8px;padding-left:10px;border-left:1px solid var(--dsw-alias-border-l2)}",
216
+ /* InstallRow 的「内联」变体:它本体是块(自带 padding-top:10px + 上边框),
217
+ 直接塞进单行会让按钮比同排矮半格、头顶多一条横线 —— 用户截图里
218
+ 「升级」比邻居低 5~6px 就是这条 padding 造成的。内联时把外壳清零。 */
219
+ ".dph_instInline{margin-top:0;padding-top:0;border-top:0}",
220
+ /* 块级状态(进度/已装完/失败)落在行卡片里时,不要再叠一道内边框 */
221
+ ".dph_updItem>.dph_instRow{margin-top:0;padding-top:0;border-top:0}",
206
222
  ".dph_updSub{font-size:11px;line-height:1.5;color:var(--dsw-alias-label-tertiary)}",
207
223
  ".dph_updName{font-size:12px;font-weight:600;color:var(--dsw-alias-label-primary)}",
208
224
  ".dph_updVer{font-size:12px;color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums}",
@@ -509,6 +525,8 @@ window.__ModuleLoader__.load({
509
525
  "updates.ackNote": "红点在你打开本页后熄灭,只有再出现更新的版本才会重新亮。",
510
526
  "updates.restartConfirm": "确认重启 dsh?重启后当前会话会中断。",
511
527
  "updates.upgrade": "升级",
528
+ "updates.upgradeGo": "确认升级",
529
+ "updates.upgradeAsk": "确认升级?会改写本机 profile,装完需重启 dsh。",
512
530
  "updates.upgradeConfirm": "确认升级到最新版?",
513
531
  "updates.upgradeHint": "升级会在本机执行 dsh plugin add <包名>@latest,改的是你的 profile,装完需要重启 dsh。",
514
532
  "updates.upgradeAll": "全部升级({n})",
@@ -839,6 +857,8 @@ window.__ModuleLoader__.load({
839
857
  "updates.ackNote": "The dot clears once you open this page, and returns only when a newer version shows up.",
840
858
  "updates.restartConfirm": "Restart dsh? The current session will be interrupted.",
841
859
  "updates.upgrade": "Upgrade",
860
+ "updates.upgradeGo": "Confirm",
861
+ "updates.upgradeAsk": "Confirm? This rewrites your local profile; a restart is needed.",
842
862
  "updates.upgradeConfirm": "Upgrade to the latest version?",
843
863
  "updates.upgradeHint": "This runs dsh plugin add <pkg>@latest against your profile; a restart is needed afterwards.",
844
864
  "updates.upgradeAll": "Upgrade all ({n})",
@@ -2756,25 +2776,42 @@ window.__ModuleLoader__.load({
2756
2776
  /* 已经装过的**不要再写"安装"** —— 实测有用户对着早就装好的插件反复点「安装」,
2757
2777
  然后判定"安装不成功"(卡片上的「已安装 vX」标注还不够,按钮才是他看的那一处)。 */
2758
2778
  const idleLabel = upgrading ? t("updates.upgrade") : item.installed ? t("install.reinstall") : t("install.action");
2759
- const confirmLabel = upgrading ? t("updates.upgradeConfirm") : item.installed ? t("install.reinstallConfirm") : t("install.confirm");
2779
+ const confirmLabel = upgrading ? t("updates.upgradeGo") : item.installed ? t("install.reinstallConfirm") : t("install.confirm");
2760
2780
 
2761
2781
  const job = state.install;
2762
2782
  const mine = job && job.target === item.pkg;
2763
2783
  const busyElsewhere = !!(job && job.active && !mine);
2764
-
2765
- if (mine && job.active) {
2766
- return h("div", { className: "dph_instRow" }, [
2784
+ const phase = mine ? String(job.phase || "") : "";
2785
+ const running = !!(mine && job.active);
2786
+ const finished = !!(mine && !job.active && (phase === "okMarket" || phase === "okLocal"));
2787
+ const failed = !!(mine && !job.active && phase === "failed");
2788
+
2789
+ /* 两个实例,同一份宿主状态(2026-10-22):
2790
+ · mode="act" —— 行内按钮位:只出按钮(含二次确认),外壳走 `.dph_instInline`,
2791
+ 与同排按钮同高同基线;运行中/已装完时让位给块位,避免重复。
2792
+ · mode="block" —— 行下状态位:只出进度/结果/失败这类**长文案**,空闲时不出。
2793
+ · 默认(无 mode)—— 历史行为,目录卡/套装/每日推荐照旧用「一块包全部」。
2794
+ 失败是例外:块位出原因,行内恢复「升级」按钮让用户重试。 */
2795
+ const mode = props.mode === "act" ? "act" : props.mode === "block" ? "block" : "all";
2796
+ const inline = mode === "act";
2797
+ const shell = (children) => h("div", { className: "dph_instRow" + (inline ? " dph_instInline" : "") }, children);
2798
+ const colShell = (children) => h("div", { className: "dph_instRow dph_instCol" + (inline ? " dph_instInline" : "") }, children);
2799
+ if (mode === "act" && (running || finished)) return null;
2800
+ if (mode === "block" && !running && !finished && !failed) return null;
2801
+
2802
+ if (running) {
2803
+ return shell([
2767
2804
  h("span", { className: "dph_instMsg", key: "msg" }, job.message),
2768
2805
  ]);
2769
2806
  }
2770
2807
 
2771
- if (mine && (job.phase === "okMarket" || job.phase === "okLocal")) {
2808
+ if (finished) {
2772
2809
  /* 三态(host 读盘得出):changed 装上了 / same **本来就是目标版本**(这是成功)/
2773
2810
  none 真的什么都没发生。把 same 说成"什么都没装"会让人以为安装失败
2774
2811
  (2026-10-12 实测被这句误导:用户对着早就装好的插件点安装)。 */
2775
2812
  const outcome = job.outcome || (job.changed === false ? "same" : "changed");
2776
2813
  const needsRestart = outcome === "changed" && job.phase === "okLocal";
2777
- return h("div", { className: "dph_instRow" }, [
2814
+ return shell([
2778
2815
  h("span", { className: "dph_instMsg " + (outcome === "none" ? "dph_instBad" : "dph_instOk"), key: "msg" },
2779
2816
  outcome === "none" ? t("updates.noChangeTitle") : outcome === "same" ? t("updates.alreadyTitle") : job.message),
2780
2817
  outcome === "none" ? h("span", { className: "dph_instHint", key: "nochange" }, format(t("updates.noChange"), { v: String(job.after || job.before || "?") })) : null,
@@ -2806,7 +2843,7 @@ window.__ModuleLoader__.load({
2806
2843
  ]);
2807
2844
  }
2808
2845
 
2809
- if (mine && job.phase === "failed") {
2846
+ if (failed && mode !== "act") {
2810
2847
  /* 供应链策略暂停:给出被拦的条目 + 还要等多久 + 两条通路。
2811
2848
  只回一句英文错误码,用户会以为"插件坏了"(2026-10-14 用户实际撞到)。 */
2812
2849
  if (job.why === "release-age" && job.reject) {
@@ -2820,7 +2857,7 @@ window.__ModuleLoader__.load({
2820
2857
  const hoursLeft = latest > 0
2821
2858
  ? Math.max(1, Math.ceil((latest + 24 * 60 * 60 * 1000 - Date.now()) / (60 * 60 * 1000)))
2822
2859
  : 0;
2823
- return h("div", { className: "dph_instRow dph_instCol" }, [
2860
+ return colShell([
2824
2861
  h("span", { className: "dph_instMsg dph_instBad", key: "title" }, t("updates.releaseAgeTitle")),
2825
2862
  h("span", { className: "dph_instHint", key: "body" }, format(t("updates.releaseAgeBody"), {
2826
2863
  n: String(aged.count || agedEntries.length),
@@ -2835,7 +2872,7 @@ window.__ModuleLoader__.load({
2835
2872
  必须把原因、两端版本与放行通道说清楚 —— 只说"失败"用户只会觉得功能坏了
2836
2873
  (实测踩到:通用错误提取抓不到这句话,界面只剩 "dsh: nothing was installed.")。 */
2837
2874
  if (job.why === "incompatible" && job.reject) {
2838
- return h("div", { className: "dph_instRow dph_instCol" }, [
2875
+ return colShell([
2839
2876
  h("span", { className: "dph_instMsg dph_instBad", key: "title" }, t("updates.blockedTitle")),
2840
2877
  h("span", { className: "dph_instHint", key: "body" }, format(t("updates.blockedBody"), { spec: job.reject.spec || "", dsh: job.reject.dsh || "" })),
2841
2878
  h("span", { className: "dph_instHint", key: "how" }, t("updates.blockedHow")),
@@ -2850,39 +2887,52 @@ window.__ModuleLoader__.load({
2850
2887
  }, copiedRaw ? t("action.copied") : t("updates.copyRaw")),
2851
2888
  ]);
2852
2889
  }
2853
- return h("div", { className: "dph_instRow" }, [
2890
+ return shell([
2854
2891
  h("span", { className: "dph_instMsg dph_instBad", key: "msg" }, t("install.failed") + ":" + job.message),
2855
2892
  ]);
2856
2893
  }
2857
2894
 
2858
2895
  if (confirming) {
2859
- return h("div", { className: "dph_instRow" }, [
2860
- h("span", { className: "dph_instHint", key: "hint" }, t(upgrading ? "updates.upgradeHint" : "install.hint")),
2861
- h("button", {
2862
- className: "dph_btn dph_btnPrimary",
2863
- key: "go",
2864
- type: "button",
2865
- onClick: () => {
2866
- setConfirming(false);
2867
- runInstall(item, t, kind);
2868
- },
2869
- }, confirmLabel),
2870
- h("button", {
2871
- className: "dph_btn",
2872
- key: "cancel",
2873
- type: "button",
2874
- onClick: () => {
2875
- setConfirming(false);
2876
- /* 取消单独记一次:只埋 install(确认后)的话,
2877
- 「想装但被确认框劝退」的人会整段消失,
2878
- 而他们恰恰是文案/门槛该优化的对象。 */
2879
- track("plugin_hub", { action: upgrading ? "upgrade_cancel" : "install_cancel", via: "confirm" });
2880
- },
2881
- }, t("install.cancel")),
2896
+ /* 确认段固定两行:说明一行、两个按钮一组。
2897
+ 为什么不让它跟说明同排平铺 —— 372px 浮窗里说明 + 两个按钮放不下,
2898
+ 平铺时「取消」会被单独换到下一行最左(与本次修的主问题同一种病)。
2899
+ 收进 `.dph_logCmd` 后一组按钮只会在右端整体换行,不会散开。 */
2900
+ return colShell([
2901
+ /* 二次确认的两行字分工:**问句**(要不要升)在正文,
2902
+ 全量说明(具体命令 / 需要重启)挂 title。原来把一句 48 字
2903
+ 说明书塞在这行,按钮反而是个问句 —— 问答错位,且宽度一超就换行。 */
2904
+ h("span", {
2905
+ className: "dph_instHint",
2906
+ key: "hint",
2907
+ title: upgrading ? t("updates.upgradeHint") : t("install.hint"),
2908
+ }, t(upgrading ? "updates.upgradeAsk" : "install.hint")),
2909
+ h("span", { className: "dph_logCmd", key: "acts" }, [
2910
+ h("button", {
2911
+ className: "dph_btn dph_btnPrimary",
2912
+ key: "go",
2913
+ type: "button",
2914
+ onClick: () => {
2915
+ setConfirming(false);
2916
+ runInstall(item, t, kind);
2917
+ },
2918
+ }, confirmLabel),
2919
+ h("button", {
2920
+ className: "dph_btn",
2921
+ key: "cancel",
2922
+ type: "button",
2923
+ onClick: () => {
2924
+ setConfirming(false);
2925
+ /* 取消单独记一次:只埋 install(确认后)的话,
2926
+ 「想装但被确认框劝退」的人会整段消失,
2927
+ 而他们恰恰是文案/门槛该优化的对象。 */
2928
+ track("plugin_hub", { action: upgrading ? "upgrade_cancel" : "install_cancel", via: "confirm" });
2929
+ },
2930
+ }, t("install.cancel")),
2931
+ ]),
2882
2932
  ]);
2883
2933
  }
2884
2934
 
2885
- return h("div", { className: "dph_instRow" }, [
2935
+ return shell([
2886
2936
  h("button", {
2887
2937
  className: "dph_btn dph_btnPrimary",
2888
2938
  key: "install",
@@ -3913,35 +3963,52 @@ window.__ModuleLoader__.load({
3913
3963
  if (nameZh) sub.push(String(item.name));
3914
3964
  if (pinned) sub.push(format(t("updates.pinnedNote"), { v: String(item.current || "") }));
3915
3965
  usageSubLines(item).forEach((line) => sub.push(line));
3966
+ /* 动作全部收进**一个** flex 项(`.dph_updActs`):放不下时整组换行并右对齐,
3967
+ 不会再出现"最后一个按钮被单独甩到下一行最左"(2026-10-22 用户截图)。 */
3968
+ const acts = verdictActions(item, key, copied, mark);
3969
+ if (removable) {
3970
+ /* 「保留」标注:人工高于机器 —— 标了就不再进清理建议;再点一次取消 */
3971
+ acts.push(h("button", {
3972
+ className: "dph_btn",
3973
+ key: "keep",
3974
+ type: "button",
3975
+ title: t("usage.keepHint"),
3976
+ onClick: () => {
3977
+ const on = !kept;
3978
+ toggleKeep(item.name);
3979
+ track("plugin_hub", { action: "keep_toggle", on: on, scope: "updates" });
3980
+ },
3981
+ }, kept ? t("usage.kept") : t("usage.keep")));
3982
+ /* 启用/禁用:可逆的「观察」动作(宿主提供启停能力时才有这一项) */
3983
+ if (typeof item.enabled === "boolean") acts.push(h(ToggleButton, { key: "toggle", item: item }));
3984
+ /* 卸载入口:破坏性操作,自己带两步确认;本插件自己那一行不给
3985
+ (卸自己等于把管理界面卸掉)。外面那层 `.dph_actDanger` 只负责
3986
+ 与可逆动作拉一道分界,降低误触。 */
3987
+ acts.push(h("span", { className: "dph_actDanger", key: "remove" },
3988
+ h(RemoveButton, { key: "rm", item: { pkg: String(item.name || ""), name: item.nameZh || String(item.name || "") } })));
3989
+ }
3916
3990
  return h("div", { className: "dph_updItem" + (item.outdated === true ? " dph_updOn" : ""), key: key }, [
3917
3991
  h("div", { className: "dph_upd", key: "row" }, [
3918
- h("span", { className: "dph_updName", key: "n" }, (prefix ? prefix + " · " : "") + (nameZh || String(item.name))),
3919
- untranslated ? h("span", { className: "dph_tag", key: "raw" }, t("label.untranslated")) : null,
3920
- blocked ? h("span", { className: "dph_tag", key: "blocked" }, t("updates.blocked")) : null,
3921
- pinned ? h("span", { className: "dph_tag", key: "pinned" }, t("updates.pinned")) : null,
3922
- tier ? h("span", { className: "dph_tag", key: "usage" }, tierLabel(tier)) : null,
3923
- h("span", { className: "dph_updVer", key: "v" }, "v" + String(item.current || "?") + (item.outdated === true ? " → v" + String(item.latest || "") : "")),
3924
- h("span", { className: "dph_spacer", key: "gap" }),
3925
- updateVerdict(item, key, copied, mark),
3926
- /* 「保留」标注:人工高于机器 —— 标了就不再进清理建议;再点一次取消 */
3927
- removable ? h("button", {
3928
- className: "dph_btn",
3929
- key: "keep",
3930
- type: "button",
3931
- title: t("usage.keepHint"),
3932
- onClick: () => {
3933
- const on = !kept;
3934
- toggleKeep(item.name);
3935
- track("plugin_hub", { action: "keep_toggle", on: on, scope: "updates" });
3936
- },
3937
- }, kept ? t("usage.kept") : t("usage.keep")) : null,
3938
- /* 启用/禁用:可逆的「观察」动作(宿主提供启停能力时才有这一项) */
3939
- removable && typeof item.enabled === "boolean" ? h(ToggleButton, { key: "toggle", item: item }) : null,
3940
- /* 卸载入口:与"该不该升"并排。破坏性操作,自己带两步确认;
3941
- 本插件自己那一行不给(卸自己等于把管理界面卸掉)。 */
3942
- removable ? h(RemoveButton, { key: "remove", item: { pkg: String(item.name || ""), name: item.nameZh || String(item.name || "") } }) : null,
3992
+ h("div", { className: "dph_updInfo", key: "info" }, [
3993
+ h("span", { className: "dph_updName", key: "n" }, (prefix ? prefix + " · " : "") + (nameZh || String(item.name))),
3994
+ untranslated ? h("span", { className: "dph_tag", key: "raw" }, t("label.untranslated")) : null,
3995
+ blocked ? h("span", { className: "dph_tag", key: "blocked" }, t("updates.blocked")) : null,
3996
+ pinned ? h("span", { className: "dph_tag", key: "pinned" }, t("updates.pinned")) : null,
3997
+ tier ? h("span", { className: "dph_tag", key: "usage" }, tierLabel(tier)) : null,
3998
+ h("span", { className: "dph_updVer", key: "v" }, "v" + String(item.current || "?") + (item.outdated === true ? " → v" + String(item.latest || "") : "")),
3999
+ ]),
4000
+ h("div", { className: "dph_updActs", key: "acts" }, [verdictStatus(item, key)].concat(acts)),
3943
4001
  ]),
3944
4002
  sub.length ? h("div", { className: "dph_updSub", key: "sub" }, sub.join(" · ")) : null,
4003
+ /* 进度 / 已装完 / 失败这类**长文案**走在行下方的块位实例上:
4004
+ 一行里塞长句必然把整个布局挤崩(用户 2026-10-22 点完升级后的截图)。
4005
+ 以具体版本号作 target,与行内按钮构造的 pkg 完全一致,两处才认得出是同一个任务。 */
4006
+ h(InstallRow, {
4007
+ key: "inst",
4008
+ mode: "block",
4009
+ item: { pkg: String(item.name) + "@" + String(item.latest || ""), current: item.current },
4010
+ kind: "upgrade",
4011
+ }),
3945
4012
  ]);
3946
4013
  }
3947
4014
 
@@ -4126,10 +4193,14 @@ window.__ModuleLoader__.load({
4126
4193
  }
4127
4194
 
4128
4195
  /**
4129
- * 一行的结论。三态必须三句话:可升级(一键升级 + 复制命令)/已是最新/查不到 ——
4196
+ * 一行的**结论**(只读,不含按钮)。三态必须三句话:可升级/已是最新/查不到 ——
4130
4197
  * 把「查不到」显示成「已是最新」是本插件明确禁止的那类错误。
4198
+ *
4199
+ * 2026-10-22 与按钮拆开:结论留在行的右段,动作另起一组(verdictActions)。
4200
+ * 原因是状态与动作混在同一条 flex 行里时,元素一多,换行就按**单个元素**发生,
4201
+ * 尾部按钮被甩到下一行最左 —— 用户截图上「卸载」孤零零掉下去正是这样来的。
4131
4202
  */
4132
- function updateVerdict(item, key, copied, mark) {
4203
+ function verdictStatus(item, key) {
4133
4204
  if (!item || item.outdated === null) {
4134
4205
  return h("span", { className: "dph_updNote", key: key + ":unknown" }, t("updates.unknown"));
4135
4206
  }
@@ -4138,29 +4209,43 @@ window.__ModuleLoader__.load({
4138
4209
  }
4139
4210
  if (isIgnored(item)) {
4140
4211
  /* 忽略记的是**具体目标版本**:出了更新的版本(latest 变了)提醒会自己回来 ——
4141
- 所以这里显示"忽略了哪一版"并给取消,而不是一句模糊的「已忽略」。 */
4142
- return h("span", { className: "dph_logCmd", key: key + ":ignored" }, [
4143
- h("span", { className: "dph_updNote", key: "note" }, format(t("updates.ignored"), { v: String(item.latest || "") })),
4144
- h("button", {
4145
- className: "dph_btn",
4146
- key: "undo",
4147
- type: "button",
4148
- onClick: () => {
4149
- setIgnored(item.name, null);
4150
- track("plugin_hub", { action: "ignore_off", pkg: String(item.name || "") });
4151
- },
4152
- }, t("updates.unignore")),
4153
- ]);
4212
+ 所以这里显示"忽略了哪一版",并给一个取消入口。 */
4213
+ return h("span", { className: "dph_updNote", key: key + ":ignored" }, format(t("updates.ignored"), { v: String(item.latest || "") }));
4154
4214
  }
4155
- return h("span", { className: "dph_logCmd", key: key + ":out" }, [
4156
- h("span", { className: "dph_tag dph_tagBad", key: "tag" }, t("updates.outdated")),
4215
+ return h("span", { className: "dph_tag dph_tagBad", key: key + ":out" }, t("updates.outdated"));
4216
+ }
4217
+
4218
+ /**
4219
+ * 一行的**动作**(可交互):升级 + 复制命令 + 忽略此版本;已忽略时只剩「取消忽略」。
4220
+ * 返回数组,由 updateRow 与保留/禁用/卸载拼成同一组(`.dph_updActs`)。
4221
+ */
4222
+ function verdictActions(item, key, copied, mark) {
4223
+ if (!item || item.outdated !== true) return [];
4224
+ if (isIgnored(item)) {
4225
+ return [h("button", {
4226
+ className: "dph_btn",
4227
+ key: key + ":undo",
4228
+ type: "button",
4229
+ onClick: () => {
4230
+ setIgnored(item.name, null);
4231
+ track("plugin_hub", { action: "ignore_off", pkg: String(item.name || "") });
4232
+ },
4233
+ }, t("updates.unignore"))];
4234
+ }
4235
+ return [
4157
4236
  /* 一键升级**复用目录项那条安装通道**(二次确认 → 进度 → 失败原因 → 重启提示):
4158
4237
  一条路径两处使用,行为才不会分叉。
4159
- 目标用**具体版本号**(更新检查已经知道它)—— 实测 `@latest` 在 dsh 上会静默空转。 */
4160
- h(InstallRow, { key: "do", item: { pkg: String(item.name) + "@" + String(item.latest), current: item.current }, kind: "upgrade" }),
4238
+ 目标用**具体版本号**(更新检查已经知道它)—— 实测 `@latest` 在 dsh 上会静默空转。
4239
+ mode="act":只出行内按钮,外壳不带块级的 padding/border,与同排按钮同基线。 */
4240
+ h(InstallRow, {
4241
+ key: key + ":do",
4242
+ mode: "act",
4243
+ item: { pkg: String(item.name) + "@" + String(item.latest), current: item.current },
4244
+ kind: "upgrade",
4245
+ }),
4161
4246
  h("button", {
4162
4247
  className: "dph_btn",
4163
- key: "copy",
4248
+ key: key + ":copy",
4164
4249
  type: "button",
4165
4250
  title: item.upgrade || "",
4166
4251
  onClick: () => copyText(item.upgrade || "", () => {
@@ -4172,7 +4257,7 @@ window.__ModuleLoader__.load({
4172
4257
  否则用户每次打开都被同一个红点提醒一遍,久了就学会无视红点(那才是真损失)。 */
4173
4258
  h("button", {
4174
4259
  className: "dph_btn",
4175
- key: "ignore",
4260
+ key: key + ":ignore",
4176
4261
  type: "button",
4177
4262
  title: format(t("updates.ignoreHint"), { v: String(item.latest || "") }),
4178
4263
  onClick: () => {
@@ -4180,7 +4265,7 @@ window.__ModuleLoader__.load({
4180
4265
  track("plugin_hub", { action: "ignore_on", pkg: String(item.name || ""), v: String(item.latest || "") });
4181
4266
  },
4182
4267
  }, t("updates.ignore")),
4183
- ]);
4268
+ ];
4184
4269
  }
4185
4270
 
4186
4271
  /**
package/lib/index.js CHANGED
@@ -48,7 +48,7 @@ export const name = "dpharness";
48
48
  /** The dsh web server service used to register HTTP routes. */
49
49
  export const inject = ["webServer"];
50
50
 
51
- export const VERSION = "0.6.6";
51
+ export const VERSION = "0.6.8";
52
52
 
53
53
  /**
54
54
  * 本插件在 npm 上的包名 —— 与 dsh 的插件 id(上面的 `name = "dpharness"`)**不是一回事**,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-dpharness",
3
3
  "icon": "./icon.svg",
4
- "version": "0.6.6",
4
+ "version": "0.6.8",
5
5
  "description": "Curated dpharness.com plugin catalog inside the DeepSeek Harness Web GUI: a conversation-view tab, a sidebar entry and a dismissible site-wide floating panel, offering a searchable full catalog, a monthly by-category shortlist, a daily pick and an update check (this plugin plus every installed plugin) with a red-dot reminder, with one-click install via dshmarket or the dsh CLI. Includes a settings page (General row + Plugins tab) for the widget visibility, the daily pick, the update check and the opt-out telemetry relay covering the full install funnel.",
6
6
  "author": "zhanghao3693 <zhanghao3693@qq.com>",
7
7
  "repository": {