dsh-life-pack 0.3.70 → 0.3.71
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/dist/client.js +452 -39
- package/dist/client.js.map +1 -1
- package/package.json +2 -2
package/dist/client.js
CHANGED
|
@@ -471,7 +471,7 @@ window.__ModuleLoader__.load({
|
|
|
471
471
|
path: "/api/ilife-manager"
|
|
472
472
|
};
|
|
473
473
|
//#endregion
|
|
474
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
474
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/config.js
|
|
475
475
|
const DEFAULT_PANEL_POLL_MS = 1e3;
|
|
476
476
|
function assertPrefix(value, role) {
|
|
477
477
|
if (typeof value !== "string" || value.length === 0) throw new Error("[dsh-plugin-update] " + role + " 非法:须为非空字符串(收到 " + JSON.stringify(value) + ")");
|
|
@@ -493,7 +493,7 @@ window.__ModuleLoader__.load({
|
|
|
493
493
|
return buildPhoneNames(prefix).logAppend;
|
|
494
494
|
}
|
|
495
495
|
//#endregion
|
|
496
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
496
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/version-judgment.js
|
|
497
497
|
function updateError(code) {
|
|
498
498
|
return Object.assign(new Error(code), { code });
|
|
499
499
|
}
|
|
@@ -580,7 +580,7 @@ window.__ModuleLoader__.load({
|
|
|
580
580
|
return 0;
|
|
581
581
|
}
|
|
582
582
|
//#endregion
|
|
583
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
583
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/lang.js
|
|
584
584
|
function normalizeLangTag(tag) {
|
|
585
585
|
if (typeof tag !== "string") return "zh";
|
|
586
586
|
const s = tag.trim().toLowerCase().replace(/_/g, "-");
|
|
@@ -722,7 +722,7 @@ window.__ModuleLoader__.load({
|
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
724
|
//#endregion
|
|
725
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
725
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/bilingual.js
|
|
726
726
|
const BILINGUAL_STRINGS = {
|
|
727
727
|
"entry.label.idle": {
|
|
728
728
|
en: "Check for updates",
|
|
@@ -1650,8 +1650,78 @@ window.__ModuleLoader__.load({
|
|
|
1650
1650
|
draft: true
|
|
1651
1651
|
},
|
|
1652
1652
|
"panel.manual.absent": {
|
|
1653
|
-
en: "No manual command available
|
|
1654
|
-
zh: "
|
|
1653
|
+
en: "No manual command is available right now.",
|
|
1654
|
+
zh: "当前没有可用的手工命令。",
|
|
1655
|
+
draft: true
|
|
1656
|
+
},
|
|
1657
|
+
"panel.manual.absent.unknown-profile": {
|
|
1658
|
+
en: "The plugin scope cannot be recognized, so there is no scope name for the command. Restart the host and check again; if it still cannot be recognized, send the copied diagnostics to the plugin author.",
|
|
1659
|
+
zh: "认不出插件所在的使用范围,命令没有可指向的范围名。重启宿主后重新查询;若仍认不出来,请把复制诊断发给插件作者。",
|
|
1660
|
+
draft: true
|
|
1661
|
+
},
|
|
1662
|
+
"panel.manual.absent.source-install": {
|
|
1663
|
+
en: "This plugin was installed from source; installing by version would overwrite the source. To update, reinstall it by package name@version.",
|
|
1664
|
+
zh: "这是源码安装的插件,按版本安装会覆盖源码。如需更新,请按包名@版本号重新安装。",
|
|
1665
|
+
draft: true
|
|
1666
|
+
},
|
|
1667
|
+
"panel.manual.absent.dev-source": {
|
|
1668
|
+
en: "This is a dev-mode mount (source link); the update center only serves version installs. Edit the repo and restart the host to see the changes.",
|
|
1669
|
+
zh: "这是开发态挂载(源码链接),更新中心只服务按版本安装。改完仓库代码后重启宿主再看效果。",
|
|
1670
|
+
draft: true
|
|
1671
|
+
},
|
|
1672
|
+
"panel.manual.absent.running-unknown": {
|
|
1673
|
+
en: "The running version cannot be read, so no command can be guaranteed not to downgrade. Restart the host and check again; if it still cannot be read, send the copied diagnostics to the plugin author.",
|
|
1674
|
+
zh: "读不到正在运行的版本号,无法保证给出的命令不会降级。重启宿主后再查一次;若仍读不到,请把复制诊断发给插件作者。",
|
|
1675
|
+
draft: true
|
|
1676
|
+
},
|
|
1677
|
+
"panel.manual.absent.no-safe-candidate": {
|
|
1678
|
+
en: "No safe target version or argument set: candidates may all be older than the running version, outside the current channel, or the scope name/registry cannot be safely embedded in a command. Check again after a newer version ships, or fix the blocked reason in section 5.2 first.",
|
|
1679
|
+
zh: "没有可安全执行的目标版本或参数:可能候选都低于运行版、不在当前通道,或范围名/源地址无法安全拼进命令。请等新版发布后再查,或先按第 5.2 节的受阻原因修好环境。",
|
|
1680
|
+
draft: true
|
|
1681
|
+
},
|
|
1682
|
+
"panel.manual.stale": {
|
|
1683
|
+
en: "This manual command has not been confirmed against the current reading. Re-query before copying.",
|
|
1684
|
+
zh: "手工命令尚未按当帧读数确认,重新查询后再复制。",
|
|
1685
|
+
draft: true
|
|
1686
|
+
},
|
|
1687
|
+
"panel.lastresort.badge": {
|
|
1688
|
+
en: "Last resort",
|
|
1689
|
+
zh: "最后手段",
|
|
1690
|
+
draft: true
|
|
1691
|
+
},
|
|
1692
|
+
"panel.lastresort.status": {
|
|
1693
|
+
en: "No automatic recovery left",
|
|
1694
|
+
zh: "自动恢复不可用",
|
|
1695
|
+
draft: true
|
|
1696
|
+
},
|
|
1697
|
+
"panel.lastresort.reason": {
|
|
1698
|
+
en: "There is no automatic data path left; copying this command is the only way forward.",
|
|
1699
|
+
zh: "没有可用的自动数据路径;复制这条命令是唯一出路。",
|
|
1700
|
+
draft: true
|
|
1701
|
+
},
|
|
1702
|
+
"panel.lastresort.copy": {
|
|
1703
|
+
en: "Copy manual command",
|
|
1704
|
+
zh: "复制手工命令",
|
|
1705
|
+
draft: true
|
|
1706
|
+
},
|
|
1707
|
+
"panel.lastresort.copied": {
|
|
1708
|
+
en: "Copied",
|
|
1709
|
+
zh: "已复制",
|
|
1710
|
+
draft: true
|
|
1711
|
+
},
|
|
1712
|
+
"batch.lastresort.row-badge": {
|
|
1713
|
+
en: "Last resort",
|
|
1714
|
+
zh: "最后手段",
|
|
1715
|
+
draft: true
|
|
1716
|
+
},
|
|
1717
|
+
"panel.manual.absent-comment": {
|
|
1718
|
+
en: "no manual command ({reason})",
|
|
1719
|
+
zh: "无手工命令({reason})",
|
|
1720
|
+
draft: true
|
|
1721
|
+
},
|
|
1722
|
+
"panel.manual.absent-comment-unknown": {
|
|
1723
|
+
en: "no manual command (cause unknown)",
|
|
1724
|
+
zh: "无手工命令(原因未知)",
|
|
1655
1725
|
draft: true
|
|
1656
1726
|
},
|
|
1657
1727
|
"panel.manual.updater-nested": {
|
|
@@ -2619,7 +2689,7 @@ window.__ModuleLoader__.load({
|
|
|
2619
2689
|
}
|
|
2620
2690
|
const BILINGUAL_CSS = [".dsh-upd-bi{display:inline;overflow-wrap:anywhere}", ".dsh-upd-bi [lang]{overflow-wrap:anywhere}"].join("\n");
|
|
2621
2691
|
//#endregion
|
|
2622
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
2692
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/changelog.js
|
|
2623
2693
|
const CHANGELOG_MAX_CHARS = 65536;
|
|
2624
2694
|
const CHANGELOG_ALL_CATEGORIES = [
|
|
2625
2695
|
"Added",
|
|
@@ -3727,7 +3797,7 @@ ${note}${blocks.join("\n")}
|
|
|
3727
3797
|
}
|
|
3728
3798
|
}
|
|
3729
3799
|
//#endregion
|
|
3730
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
3800
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/log-events.js
|
|
3731
3801
|
const LOG_EVENT_CALL = "host.call";
|
|
3732
3802
|
const LOG_EVENT_CALL_FAIL = "host.call.fail";
|
|
3733
3803
|
const LOG_EVENT_INSTALL_EXEC = "update.install.exec";
|
|
@@ -3978,7 +4048,7 @@ ${note}${blocks.join("\n")}
|
|
|
3978
4048
|
};
|
|
3979
4049
|
}
|
|
3980
4050
|
//#endregion
|
|
3981
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
4051
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/codes.js
|
|
3982
4052
|
const BLOCKED_REASONS = [
|
|
3983
4053
|
"unknown-profile",
|
|
3984
4054
|
"channel-mismatch",
|
|
@@ -4014,7 +4084,153 @@ ${note}${blocks.join("\n")}
|
|
|
4014
4084
|
return typeof code === "string" && isOneOf(CHECK_SIDE_FAILURE_CODES, code.trim());
|
|
4015
4085
|
}
|
|
4016
4086
|
//#endregion
|
|
4017
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
4087
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/commands.js
|
|
4088
|
+
const MANUAL_SUPPRESSING_REASONS = [
|
|
4089
|
+
"source-install",
|
|
4090
|
+
"unknown-profile",
|
|
4091
|
+
"dev-source"
|
|
4092
|
+
];
|
|
4093
|
+
function manualCommandSuppressedBy(reason) {
|
|
4094
|
+
return reason !== null && reason !== void 0 && MANUAL_SUPPRESSING_REASONS.includes(reason);
|
|
4095
|
+
}
|
|
4096
|
+
//#endregion
|
|
4097
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/manual-absent.js
|
|
4098
|
+
const REASON_KEYS = {
|
|
4099
|
+
"unknown-profile": "panel.manual.absent.unknown-profile",
|
|
4100
|
+
"source-install": "panel.manual.absent.source-install",
|
|
4101
|
+
"dev-source": "panel.manual.absent.dev-source",
|
|
4102
|
+
"running-unknown": "panel.manual.absent.running-unknown",
|
|
4103
|
+
"no-safe-candidate": "panel.manual.absent.no-safe-candidate"
|
|
4104
|
+
};
|
|
4105
|
+
function manualAbsentReasonOf(snapshot) {
|
|
4106
|
+
if (!snapshot || typeof snapshot !== "object") return null;
|
|
4107
|
+
const blocked = snapshot.blockedReason;
|
|
4108
|
+
if (manualCommandSuppressedBy(blocked)) return blocked;
|
|
4109
|
+
const running = snapshot.runningVersion;
|
|
4110
|
+
if (running === null || running === "") return "running-unknown";
|
|
4111
|
+
if (typeof running !== "string") return null;
|
|
4112
|
+
return "no-safe-candidate";
|
|
4113
|
+
}
|
|
4114
|
+
const MANUAL_APPLICABLE_BANNER_KINDS = [
|
|
4115
|
+
"failed",
|
|
4116
|
+
"restart",
|
|
4117
|
+
"blocked",
|
|
4118
|
+
"update"
|
|
4119
|
+
];
|
|
4120
|
+
function manualAppliesToBanner(kind) {
|
|
4121
|
+
return MANUAL_APPLICABLE_BANNER_KINDS.includes(kind);
|
|
4122
|
+
}
|
|
4123
|
+
function manualAbsentReasonTextOf(reason, lang) {
|
|
4124
|
+
if (!reason) return copyText("panel.manual.absent", lang);
|
|
4125
|
+
return copyText(REASON_KEYS[reason], lang);
|
|
4126
|
+
}
|
|
4127
|
+
function manualAbsentTextOf(reason, lang) {
|
|
4128
|
+
if (!reason) return manualAbsentReasonTextOf(null, lang);
|
|
4129
|
+
const joiner = normalizeLangTag(lang) === "en" ? " " : "";
|
|
4130
|
+
return manualAbsentReasonTextOf(null, lang) + joiner + manualAbsentReasonTextOf(reason, lang);
|
|
4131
|
+
}
|
|
4132
|
+
//#endregion
|
|
4133
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/last-resort.js
|
|
4134
|
+
const STAGES = [
|
|
4135
|
+
"install",
|
|
4136
|
+
"check",
|
|
4137
|
+
"busy",
|
|
4138
|
+
"restart",
|
|
4139
|
+
"blocked",
|
|
4140
|
+
"unknown"
|
|
4141
|
+
];
|
|
4142
|
+
const BLOCKED_RESCUE = {
|
|
4143
|
+
"unknown-profile": [],
|
|
4144
|
+
"source-install": [],
|
|
4145
|
+
"dev-source": [],
|
|
4146
|
+
"invalid-installation": [],
|
|
4147
|
+
"recovery-required": [],
|
|
4148
|
+
"installation-changed": ["recheck"],
|
|
4149
|
+
"pending-restart": ["restart-host"],
|
|
4150
|
+
"channel-mismatch": ["switch-channel"],
|
|
4151
|
+
"registry-conflict": ["fix-manifest"],
|
|
4152
|
+
"incompatible-node": ["upgrade-runtime"],
|
|
4153
|
+
"incompatible-dsh": ["upgrade-runtime"]
|
|
4154
|
+
};
|
|
4155
|
+
function asRecord(value) {
|
|
4156
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
4157
|
+
}
|
|
4158
|
+
function firstText(value) {
|
|
4159
|
+
if (typeof value !== "string") return null;
|
|
4160
|
+
const trimmed = value.trim();
|
|
4161
|
+
return trimmed ? trimmed : null;
|
|
4162
|
+
}
|
|
4163
|
+
function isBlockedReason(value) {
|
|
4164
|
+
return value !== null && BLOCKED_REASONS.includes(value);
|
|
4165
|
+
}
|
|
4166
|
+
function isStage(value) {
|
|
4167
|
+
return typeof value === "string" && STAGES.includes(value);
|
|
4168
|
+
}
|
|
4169
|
+
function stageOfCode(code, blocked) {
|
|
4170
|
+
if (isBlockedReason(blocked)) return "blocked";
|
|
4171
|
+
if (isBlockedReason(code)) return "blocked";
|
|
4172
|
+
if (code === null) return "unknown";
|
|
4173
|
+
if (code === "install-failed") return "install";
|
|
4174
|
+
if (CHECK_SIDE_FAILURE_CODES.includes(code)) return "check";
|
|
4175
|
+
if (code === "update-busy") return "busy";
|
|
4176
|
+
if (code === "internal") return "unknown";
|
|
4177
|
+
return "unknown";
|
|
4178
|
+
}
|
|
4179
|
+
function lastResortSubjectOf(input) {
|
|
4180
|
+
const rec = asRecord(input);
|
|
4181
|
+
const blocked = firstText(rec["blockedReason"]);
|
|
4182
|
+
const code = isBlockedReason(blocked) ? blocked : firstText(rec["code"]);
|
|
4183
|
+
const derived = stageOfCode(code, blocked);
|
|
4184
|
+
const explicit = isStage(rec["stage"]) ? rec["stage"] : null;
|
|
4185
|
+
const stage = derived === "unknown" && explicit !== null ? explicit : derived;
|
|
4186
|
+
const registeredRaw = rec["registered"];
|
|
4187
|
+
return {
|
|
4188
|
+
code,
|
|
4189
|
+
stage,
|
|
4190
|
+
registered: typeof registeredRaw === "boolean" ? registeredRaw : null
|
|
4191
|
+
};
|
|
4192
|
+
}
|
|
4193
|
+
function rescueRoutesOf(subject) {
|
|
4194
|
+
const s = asRecord(subject);
|
|
4195
|
+
const code = firstText(s["code"]);
|
|
4196
|
+
const stage = isStage(s["stage"]) ? s["stage"] : "unknown";
|
|
4197
|
+
if (stage === "blocked") {
|
|
4198
|
+
if (!isBlockedReason(code)) return [];
|
|
4199
|
+
if (code === "pending-restart" && s["registered"] === false) return ["select-in-host"];
|
|
4200
|
+
return [...BLOCKED_RESCUE[code]];
|
|
4201
|
+
}
|
|
4202
|
+
if (stage === "check") return ["recheck"];
|
|
4203
|
+
if (stage === "busy") return ["wait-retry"];
|
|
4204
|
+
if (stage === "restart") return [s["registered"] === false ? "select-in-host" : "restart-host"];
|
|
4205
|
+
return [];
|
|
4206
|
+
}
|
|
4207
|
+
function manualSourceOf(value) {
|
|
4208
|
+
return value === "frame" || value === "carried-over" ? value : null;
|
|
4209
|
+
}
|
|
4210
|
+
function lastResortVerdictOf(input) {
|
|
4211
|
+
const rec = asRecord(input);
|
|
4212
|
+
const subject = lastResortSubjectOf(input);
|
|
4213
|
+
const manualSource = manualSourceOf(rec["manualSource"]);
|
|
4214
|
+
const manual = firstText(rec["manual"]);
|
|
4215
|
+
const routes = rescueRoutesOf(subject);
|
|
4216
|
+
const verdict = (kind, rs = routes) => ({
|
|
4217
|
+
kind,
|
|
4218
|
+
subject,
|
|
4219
|
+
routes: [...rs],
|
|
4220
|
+
manualSource
|
|
4221
|
+
});
|
|
4222
|
+
if (subject.stage === "unknown") return verdict("unknown", []);
|
|
4223
|
+
if (manualSource === "carried-over") return verdict("unknown");
|
|
4224
|
+
if (subject.stage === "blocked") return verdict(routes.length > 0 ? "salvageable" : "dead-end");
|
|
4225
|
+
if (routes.length > 0) return verdict("salvageable");
|
|
4226
|
+
if (rec["fallbackAvailable"] === true) return verdict("salvageable", ["install-compliant"]);
|
|
4227
|
+
if (rec["runningVersionKnown"] === false) return verdict("salvageable", ["recheck"]);
|
|
4228
|
+
if (manual !== null && manualSource === "frame") return verdict("last-resort");
|
|
4229
|
+
if (manualSource === null && manual === null) return verdict("dead-end");
|
|
4230
|
+
return verdict("unknown");
|
|
4231
|
+
}
|
|
4232
|
+
//#endregion
|
|
4233
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/install-cause.js
|
|
4018
4234
|
const CAUSE_KINDS = ["minimum-release-age"];
|
|
4019
4235
|
const CAUSE_SIGNATURES = [{
|
|
4020
4236
|
kind: "minimum-release-age",
|
|
@@ -4134,7 +4350,7 @@ ${note}${blocks.join("\n")}
|
|
|
4134
4350
|
}
|
|
4135
4351
|
}
|
|
4136
4352
|
//#endregion
|
|
4137
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
4353
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/redaction.js
|
|
4138
4354
|
const COPY_BUDGET_CHARS = 1500;
|
|
4139
4355
|
const REDACTED_PATH = "<路径>";
|
|
4140
4356
|
const REDACTED_SECRET = "<脱敏>";
|
|
@@ -4214,7 +4430,7 @@ ${note}${blocks.join("\n")}
|
|
|
4214
4430
|
return userinfo.masked ? truncateWithMaskNote(scrubbed, COPY_BUDGET_CHARS) : truncateForCopy(scrubbed);
|
|
4215
4431
|
}
|
|
4216
4432
|
//#endregion
|
|
4217
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
4433
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/panel-copy.js
|
|
4218
4434
|
const BLOCKED_KEYS = {
|
|
4219
4435
|
"unknown-profile": {
|
|
4220
4436
|
title: "panel.blocked.unknown-profile.title",
|
|
@@ -4550,7 +4766,7 @@ ${note}${blocks.join("\n")}
|
|
|
4550
4766
|
].join("\n");
|
|
4551
4767
|
}
|
|
4552
4768
|
//#endregion
|
|
4553
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
4769
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/panel.js
|
|
4554
4770
|
function normalizePanelTheme(value) {
|
|
4555
4771
|
return value === "archive" ? "archive" : "default";
|
|
4556
4772
|
}
|
|
@@ -5073,6 +5289,16 @@ ${note}${blocks.join("\n")}
|
|
|
5073
5289
|
".dsh-upd-banner[data-kind=\"failed\"],.dsh-upd-banner[data-kind=\"blocked\"]{border-color:var(--dsh-update-bad-border);background:var(--dsh-update-bad-bg)}",
|
|
5074
5290
|
".dsh-upd-banner[data-kind=\"update\"]{border-color:var(--dsh-update-ok-border);background:var(--dsh-update-ok-bg)}",
|
|
5075
5291
|
".dsh-upd-banner[data-kind=\"busy\"]{border-color:var(--dsh-update-busy-border);background:var(--dsh-update-busy-bg)}",
|
|
5292
|
+
".dsh-upd-lastresort{display:flex;align-items:flex-start;gap:9px;flex-wrap:wrap;border:1px solid var(--dsh-update-bad-border,#dc2626);border-left:4px solid var(--dsh-update-bad-text,#b91c1c);background:var(--dsh-update-bad-bg,#fef2f2);padding:8px 10px;margin:0 0 8px}",
|
|
5293
|
+
".dsh-upd-lr-ico{flex:none;width:18px;height:18px;color:var(--dsh-update-bad-border,#dc2626);margin-top:2px}",
|
|
5294
|
+
".dsh-upd-lr-main{flex:1 1 220px;min-width:0}",
|
|
5295
|
+
".dsh-upd-lr-line{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}",
|
|
5296
|
+
".dsh-upd-lr-badge{display:inline-block;font-size:var(--dsh-update-panel-small-font-size,11px);font-weight:700;letter-spacing:.08em;border:1px solid currentColor;color:var(--dsh-update-bad-border,#dc2626);border-radius:3px;padding:0 5px}",
|
|
5297
|
+
".dsh-upd-lr-status{font-weight:700}",
|
|
5298
|
+
".dsh-upd-lr-reason{font-size:var(--dsh-update-panel-log-font-size,13px);opacity:.9;margin-top:2px;overflow-wrap:anywhere}",
|
|
5299
|
+
".dsh-upd-lr-go{margin:0;padding:4px 10px;font-size:var(--dsh-update-panel-small-font-size,12.5px);align-self:center}",
|
|
5300
|
+
".dsh-upd-lr-chap-badge{flex:none;display:inline-block;font-size:var(--dsh-update-panel-small-font-size,11px);font-weight:700;border:1px solid currentColor;color:var(--dsh-update-bad-border,#dc2626);border-radius:3px;padding:0 5px;margin-left:6px;vertical-align:baseline}",
|
|
5301
|
+
".dsh-upd-copy-bubble{position:fixed;z-index:10000;transform:translate(-50%,-100%);background:var(--dsh-update-text,#1f2937);color:var(--dsh-update-bg,#ffffff);border-radius:4px;padding:3px 9px;font-size:var(--dsh-update-panel-small-font-size,12px);line-height:1.5;pointer-events:none;animation:dsh-upd-fadein .12s ease}",
|
|
5076
5302
|
".dsh-upd code{font-family:Consolas,Menlo,monospace;font-size:var(--dsh-update-panel-log-font-size,12px);word-break:break-all}",
|
|
5077
5303
|
".dsh-upd-manual,.dsh-upd-queue,.dsh-upd-log{margin:4px 0;font-size:var(--dsh-update-panel-log-font-size,13px)}",
|
|
5078
5304
|
".dsh-upd-changelog-wrap{margin:4px 0 0;font-size:var(--dsh-update-panel-log-font-size,13px)}",
|
|
@@ -5159,9 +5385,9 @@ ${note}${blocks.join("\n")}
|
|
|
5159
5385
|
".dsh-upd-tag{display:inline-block;border:1px dashed currentColor;border-radius:3px;padding:1px 8px;margin-right:8px;font-family:Consolas,Menlo,monospace;font-size:var(--dsh-update-panel-small-font-size,12px)}",
|
|
5160
5386
|
".dsh-upd-err{font-size:var(--dsh-update-panel-log-font-size,13px);margin:0 0 6px}",
|
|
5161
5387
|
".dsh-upd-log,.dsh-upd-err{overflow-wrap:anywhere}",
|
|
5162
|
-
".dsh-upd button{transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .06s ease}",
|
|
5163
|
-
".dsh-upd button:hover:not(:disabled){border-color:var(--dsh-update-
|
|
5164
|
-
".dsh-upd button[data-primary=\"1\"]:hover:not(:disabled){
|
|
5388
|
+
".dsh-upd button{transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .06s ease,box-shadow .15s ease}",
|
|
5389
|
+
".dsh-upd button:hover:not(:disabled){border-color:var(--dsh-update-primary,#2563eb);box-shadow:0 0 0 2px var(--dsh-update-primary,#2563eb)}",
|
|
5390
|
+
".dsh-upd button[data-primary=\"1\"]:hover:not(:disabled){border-color:var(--dsh-update-focus,#2563eb);box-shadow:0 0 0 2px var(--dsh-update-primary,#2563eb)}",
|
|
5165
5391
|
".dsh-upd button:active:not(:disabled){transform:translateY(1px)}",
|
|
5166
5392
|
".dsh-upd button[aria-busy=\"true\"]{cursor:wait;animation:dsh-upd-pulse 1s ease-in-out infinite}",
|
|
5167
5393
|
"@keyframes dsh-upd-pulse{0%,100%{opacity:1}50%{opacity:.55}}",
|
|
@@ -5173,8 +5399,8 @@ ${note}${blocks.join("\n")}
|
|
|
5173
5399
|
".dsh-upd button[aria-busy=\"true\"]::after{content:\"\";display:inline-block;width:11px;height:11px;margin-left:8px;vertical-align:-1px;",
|
|
5174
5400
|
"border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:dsh-upd-spin .8s linear infinite}",
|
|
5175
5401
|
"@keyframes dsh-upd-spin{to{transform:rotate(360deg)}}",
|
|
5176
|
-
"@media (prefers-reduced-motion: reduce){.dsh-upd button{transition:none}.dsh-upd button:active:not(:disabled){transform:none}.dsh-upd button[aria-busy=\"true\"]{animation:none}.dsh-upd-skv{animation:none}.dsh-upd-banner{animation:none}.dsh-upd-changelog-foldbox{transition:none}}",
|
|
5177
|
-
"@media (forced-colors: active){.dsh-upd-overlay .dsh-upd-body .dsh-upd-chap-head{background:Canvas}}",
|
|
5402
|
+
"@media (prefers-reduced-motion: reduce){.dsh-upd button{transition:none}.dsh-upd button:active:not(:disabled){transform:none}.dsh-upd button[aria-busy=\"true\"]{animation:none}.dsh-upd-skv{animation:none}.dsh-upd-banner{animation:none}.dsh-upd-changelog-foldbox{transition:none}.dsh-upd-copy-bubble{animation:none}}",
|
|
5403
|
+
"@media (forced-colors: active){.dsh-upd-overlay .dsh-upd-body .dsh-upd-chap-head{background:Canvas}.dsh-upd-lastresort{border-color:CanvasText}.dsh-upd-lr-badge,.dsh-upd-lr-chap-badge{border-color:CanvasText;color:CanvasText}.dsh-upd-copy-bubble{border:1px solid CanvasText;background:Canvas;color:CanvasText}}",
|
|
5178
5404
|
".dsh-upd{overflow-anchor:none}",
|
|
5179
5405
|
".dsh-upd-body{overflow-anchor:none}",
|
|
5180
5406
|
".dsh-upd-actions{display:flex;flex-wrap:wrap;align-items:center;min-height:34px}",
|
|
@@ -5495,6 +5721,31 @@ ${note}${blocks.join("\n")}
|
|
|
5495
5721
|
if (!profile) return null;
|
|
5496
5722
|
return `dsh plugin --profile ${profile} add --save-exact dsh-plugin-update@latest`;
|
|
5497
5723
|
}
|
|
5724
|
+
function manualSourceOfRender(input) {
|
|
5725
|
+
const value = input.manualSource;
|
|
5726
|
+
if (value === "carried-over") return "carried-over";
|
|
5727
|
+
if (value === null) return null;
|
|
5728
|
+
return "frame";
|
|
5729
|
+
}
|
|
5730
|
+
function manualTrustedOf(manual, source) {
|
|
5731
|
+
return typeof manual === "string" && manual.trim() !== "" && source === "frame";
|
|
5732
|
+
}
|
|
5733
|
+
function lastResortBarHTML(opts) {
|
|
5734
|
+
const verdict = opts.verdict;
|
|
5735
|
+
if (!verdict || verdict.kind !== "last-resort") return "";
|
|
5736
|
+
const l = normalizeLangTag(opts.lang ?? "zh");
|
|
5737
|
+
return "<div class=\"dsh-upd-lastresort\" data-last-resort=\"last-resort\"><svg class=\"dsh-upd-lr-ico\" viewBox=\"0 0 16 16\" width=\"18\" height=\"18\" aria-hidden=\"true\" focusable=\"false\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linejoin=\"round\"><path d=\"M8 1.8 12.4 3.6 14.2 8 12.4 12.4 8 14.2 3.6 12.4 1.8 8 3.6 3.6Z\"/><path d=\"M8 5.2v4\"/><circle cx=\"8\" cy=\"11.6\" r=\"0.85\" fill=\"currentColor\" stroke=\"none\"/></svg><div class=\"dsh-upd-lr-main\"><div class=\"dsh-upd-lr-line\"><span class=\"dsh-upd-lr-badge\">" + escapeHtml$3(copyText("panel.lastresort.badge", l)) + "</span><strong class=\"dsh-upd-lr-status\">" + escapeHtml$3(copyText("panel.lastresort.status", l)) + "</strong></div><div class=\"dsh-upd-lr-reason\">" + escapeHtml$3(copyText("panel.lastresort.reason", l)) + "</div></div>" + (opts.buttonHtml ?? "") + "</div>";
|
|
5738
|
+
}
|
|
5739
|
+
function lastResortCopyButtonHTML(lang) {
|
|
5740
|
+
const l = normalizeLangTag(lang ?? "zh");
|
|
5741
|
+
return "<button type=\"button\" class=\"dsh-upd-lr-go primary\" data-primary=\"1\" data-action=\"copy-manual\" data-copy-anchor=\"1\" title=\"" + escapeHtml$3(copyText("panel.lastresort.copy", l)) + "\"><svg class=\"dsh-upd-copy-ico\" viewBox=\"0 0 16 16\" width=\"13\" height=\"13\" aria-hidden=\"true\" focusable=\"false\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linejoin=\"round\"><rect x=\"5.5\" y=\"5.5\" width=\"7.5\" height=\"7.5\" rx=\"1\"/><path d=\"M10.5 5.5V4.2a1 1 0 0 0-1-1H4.2a1 1 0 0 0-1 1v5.3a1 1 0 0 0 1 1h1.3\"/></svg>" + escapeHtml$3(copyText("panel.lastresort.copy", l)) + "</button>";
|
|
5742
|
+
}
|
|
5743
|
+
function copyBubbleHTML(bubble) {
|
|
5744
|
+
if (!bubble) return "";
|
|
5745
|
+
const left = Number.isFinite(bubble.left) ? Math.round(bubble.left) : 0;
|
|
5746
|
+
const top = Number.isFinite(bubble.top) ? Math.round(bubble.top) : 0;
|
|
5747
|
+
return "<span class=\"dsh-upd-copy-bubble\" role=\"status\" style=\"position:fixed;left:" + left + "px;top:" + top + "px\">" + escapeHtml$3(bubble.text) + "</span>";
|
|
5748
|
+
}
|
|
5498
5749
|
function renderUpdatePanelKernel(input, view, lang) {
|
|
5499
5750
|
const { snapshot, manual, queue, mode, showOthers, pluginId, copyNotice } = input;
|
|
5500
5751
|
const l = normalizeLangTag(lang ?? input.lang ?? "zh");
|
|
@@ -5503,14 +5754,31 @@ ${note}${blocks.join("\n")}
|
|
|
5503
5754
|
const b = view.banner;
|
|
5504
5755
|
const seal = view.seal;
|
|
5505
5756
|
const parts = [];
|
|
5757
|
+
const manualSource = manualSourceOfRender(input);
|
|
5758
|
+
const manualTrusted = manualTrustedOf(manual, manualSource);
|
|
5759
|
+
const lastResort = lastResortVerdictOf({
|
|
5760
|
+
code: (typeof input.errorKind === "string" && input.errorKind.trim() ? input.errorKind.trim() : "") || (typeof input.lastError === "string" ? input.lastError.trim() : "") || null,
|
|
5761
|
+
blockedReason: snapshot ? snapshot.blockedReason : null,
|
|
5762
|
+
manual,
|
|
5763
|
+
manualSource,
|
|
5764
|
+
fallbackAvailable: input.fallbackAvailable === true || fallbackBlockedVersionOf(input.failure, pluginId) !== null,
|
|
5765
|
+
runningVersionKnown: typeof input.runningVersionKnown === "boolean" ? input.runningVersionKnown : snapshot ? snapshot.runningVersion !== null : null,
|
|
5766
|
+
registered: snapshot ? snapshot.registered ?? null : null
|
|
5767
|
+
});
|
|
5768
|
+
const showActions = input.actions !== "none";
|
|
5506
5769
|
parts.push("<div class=\"dsh-upd-masthead\"><span class=\"dsh-upd-masthead-kicker\">" + escapeHtml$3(copyText("panel.masthead.kicker", l)) + "</span><span class=\"dsh-upd-masthead-title\">" + escapeHtml$3(copyText("panel.masthead.title", l)) + " <i>" + escapeHtml$3(copyText("panel.masthead.volume", l)) + "</i></span></div>");
|
|
5507
5770
|
parts.push(`<div class="dsh-upd-head"><span class="dsh-upd-name">${escapeHtml$3(pluginId)}</span><span class="dsh-upd-meta">${escapeHtml$3(copyText("panel.meta.label", l))} <b>${escapeHtml$3(profileName ?? copyText("panel.meta.unknown", l))}</b><span class="dsh-upd-proftag">profile</span></span></div>`);
|
|
5771
|
+
const lastResortBarHtml = b.kind === "failed" || b.kind === "restart" || b.kind === "blocked" ? lastResortBarHTML({
|
|
5772
|
+
verdict: lastResort,
|
|
5773
|
+
lang: l,
|
|
5774
|
+
buttonHtml: showActions ? lastResortCopyButtonHTML(l) : ""
|
|
5775
|
+
}) : "";
|
|
5776
|
+
if (lastResortBarHtml) parts.push(lastResortBarHtml);
|
|
5508
5777
|
parts.push(`<div class="dsh-upd-banner" data-kind="${b.kind}" data-mini="${escapeHtml$3(seal.mini)}" role="status" aria-live="polite">`);
|
|
5509
5778
|
parts.push(`<div>${b.kind === "restart" ? "" : `<span class="dsh-upd-sealmini" aria-hidden="true">${escapeHtml$3(seal.mini)}</span>`}<strong>${escapeHtml$3(b.title)}</strong></div>`);
|
|
5510
5779
|
parts.push("</div>");
|
|
5511
5780
|
if (b.action) parts.push(`<div class="dsh-upd-banner-sub">${escapeHtml$3(b.action)}</div>`);
|
|
5512
5781
|
parts.push(snapshot ? versionStrip(snapshot, l) : skeletonStrip(view.banner.kind === "loading", l));
|
|
5513
|
-
const showActions = input.actions !== "none";
|
|
5514
5782
|
const actions = [];
|
|
5515
5783
|
if (showActions) {
|
|
5516
5784
|
const busyAct = input.busyAct;
|
|
@@ -5530,7 +5798,7 @@ ${note}${blocks.join("\n")}
|
|
|
5530
5798
|
if (snapshot?.latestVersion && !view.skippedLatest && view.banner.kind === "update") actions.push(`<button type="button" data-action="skip" title="${escapeHtml$3(copyText("panel.action.skip-title", l))}">${escapeHtml$3(copyText("panel.action.skip", l))}</button>`);
|
|
5531
5799
|
if (gatePrejudge) actions.push(gateCandidate ? `<button type="button" data-action="install-fallback-confirm" data-primary="1" title="${escapeHtml$3(copyText("panel.action.install-fallback-confirm-title", l))}"${macroBusy || fallbackBusy ? " disabled" : ""}>${escapeHtml$3(copyText("panel.action.install-fallback-confirm", l, { version: gateCandidate }))}</button>` : fallbackBusy ? `<button type="button" data-action="install-fallback" data-primary="1" disabled aria-busy="true" title="${escapeHtml$3(copyText("panel.action.install-fallback-title", l))}">${escapeHtml$3(copyText("panel.action.install-fallback", l))}</button>` : `<button type="button" data-action="install-fallback" data-primary="1" title="${escapeHtml$3(copyText("panel.action.install-fallback-title", l))}"${macroBusy ? " disabled" : ""}>${escapeHtml$3(copyText("panel.action.install-fallback", l))}</button>`);
|
|
5532
5800
|
if (view.showReset && snapshot?.latestVersion) actions.push(`<button type="button" data-action="reset-skip" title="${escapeHtml$3(copyText("panel.action.unskip-title", l))}">${escapeHtml$3(copyText("panel.action.unskip", l, { version: snapshot.latestVersion }))}</button>`);
|
|
5533
|
-
if (view.showManual &&
|
|
5801
|
+
if (view.showManual && manualTrusted && !lastResortBarHtml) actions.push(`<button type="button" data-action="copy-manual" title="${escapeHtml$3(copyText("panel.action.copy-manual-title", l))}">${escapeHtml$3(copyText("panel.action.copy-manual", l))}</button>`);
|
|
5534
5802
|
if (b.kind === "restart") actions.push(`<button type="button" data-action="restart-hint" title="${escapeHtml$3(copyText("panel.action.restart-host-title", l))}">${escapeHtml$3(copyText("panel.action.restart-host", l))}</button>`);
|
|
5535
5803
|
const failureForFallback = input.failure ?? null;
|
|
5536
5804
|
const fallbackBlocked = b.kind === "failed" ? fallbackBlockedVersionOf(failureForFallback, pluginId) : null;
|
|
@@ -5659,7 +5927,9 @@ ${changelogHTML}
|
|
|
5659
5927
|
else errLines.push("<div class=\"dsh-upd-copy dsh-upd-copy--empty\" aria-hidden=\"true\"></div>");
|
|
5660
5928
|
chapters.push(chapterOf(4, errLines.join(""), "", l));
|
|
5661
5929
|
}
|
|
5662
|
-
|
|
5930
|
+
const manualAbsentReason = !manual && manualAppliesToBanner(b.kind) ? manualAbsentReasonOf(snapshot) : null;
|
|
5931
|
+
const manualStale = manualSource === "carried-over" && Boolean(manual);
|
|
5932
|
+
let manualHtml = view.showManual && manualTrusted ? `<div class="dsh-upd-manual"><div>${escapeHtml$3(copyText("panel.manual.heading", l))}</div><code>${escapeHtml$3(manual ?? "")}</code></div>` : `<div class="dsh-upd-manual"><div class="dsh-upd-changelog-neutral">${manualStale ? escapeHtml$3(copyText("panel.manual.stale", l)) : escapeHtml$3(manualAbsentTextOf(manualAbsentReason, l))}</div></div>`;
|
|
5663
5933
|
const selfParts = updaterPartsOf(input.updater);
|
|
5664
5934
|
if (selfParts && selfParts.level === "nested") {
|
|
5665
5935
|
const command = selfUpgradeCommandOf(profileName);
|
|
@@ -5670,9 +5940,11 @@ ${changelogHTML}
|
|
|
5670
5940
|
}
|
|
5671
5941
|
const updaterIdentity = updaterIdentityOf(input);
|
|
5672
5942
|
if (updaterIdentity && !(showActions && mode === "dialog")) manualHtml += `<div class="dsh-upd-updater-id">${escapeHtml$3(updaterIdentity)}</div>`;
|
|
5673
|
-
|
|
5943
|
+
const manualChapNote = lastResortBarHtml && lastResort.kind === "last-resort" ? `<span class="dsh-upd-lr-chap-badge">${escapeHtml$3(copyText("panel.lastresort.badge", l))}</span>` : "";
|
|
5944
|
+
chapters.push(chapterOf(5, manualHtml, manualChapNote, l));
|
|
5674
5945
|
parts.push("<div class=\"dsh-upd-body\">" + chapters.join("\n") + "</div>");
|
|
5675
5946
|
if (showActions && mode === "dialog") parts.push("<div class=\"dsh-upd-footer\"><span class=\"dsh-upd-foot-note\">" + escapeHtml$3(copyText("panel.footer.note", l)) + "</span>" + (updaterIdentity ? `<span class="dsh-upd-updater-note">${escapeHtml$3(updaterIdentity)}</span>` : "") + `<button type="button" data-action="close-view" title="${escapeHtml$3(copyText("panel.footer.close-title", l))}">${escapeHtml$3(copyText("panel.footer.close", l))}</button></div>`);
|
|
5947
|
+
if (input.copyBubble) parts.push(copyBubbleHTML(input.copyBubble));
|
|
5676
5948
|
return parts.join("\n");
|
|
5677
5949
|
}
|
|
5678
5950
|
function renderUpdatePanelHTML(input, lang) {
|
|
@@ -5694,7 +5966,7 @@ ${UPDATE_PANEL_ARCHIVE_CSS}` : UPDATE_PANEL_CSS}</style>
|
|
|
5694
5966
|
${body}`;
|
|
5695
5967
|
}
|
|
5696
5968
|
//#endregion
|
|
5697
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
5969
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/entry.js
|
|
5698
5970
|
const UPDATE_ENTRY_CSS = [
|
|
5699
5971
|
".dsh-upd-entry{display:inline-flex;align-items:center;gap:8px;font:13px/1.6 var(--dsh-update-font-sans,system-ui,\"Microsoft YaHei\",sans-serif);font-size:var(--dsh-update-entry-font-size,13px);color:var(--dsh-update-text,#1f2937)}",
|
|
5700
5972
|
".dsh-upd-entry-btn{font:inherit;border:1px solid var(--dsh-update-border,#d1d5db);border-radius:var(--dsh-update-entry-border-radius,6px);",
|
|
@@ -5808,7 +6080,7 @@ ${body}`;
|
|
|
5808
6080
|
}
|
|
5809
6081
|
}
|
|
5810
6082
|
//#endregion
|
|
5811
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
6083
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/panel-batch.js
|
|
5812
6084
|
const BATCH_PANEL_POLL = {
|
|
5813
6085
|
defaultMs: 1500,
|
|
5814
6086
|
minMs: 250
|
|
@@ -6313,7 +6585,10 @@ ${body}`;
|
|
|
6313
6585
|
}).join("");
|
|
6314
6586
|
const failedAct = batchText("batch.banner.failed-action", l);
|
|
6315
6587
|
const manualAbsent = batchFailedManualText(failed, l, titles).commands === 0;
|
|
6316
|
-
|
|
6588
|
+
const absentReasons = failed.map((row) => manualAbsentReasonOf(asSnapshotLike(row.snapshot)));
|
|
6589
|
+
const absentReasonSet = new Set(absentReasons.filter((reason) => reason !== null));
|
|
6590
|
+
const absentTitle = absentReasonSet.size === 1 && absentReasons.every((reason) => reason !== null) ? manualAbsentTextOf([...absentReasonSet][0], l) : manualAbsentTextOf(null, l);
|
|
6591
|
+
parts.push("<div class=\"dsh-upd-banner\" data-kind=\"failed\" data-mini=\"阻\" role=\"status\"><div><span class=\"dsh-upd-sealmini\" aria-hidden=\"true\">阻</span><strong>" + escapeHtml$2(batchText("batch.banner.failed-title", l, { n: String(failed.length) })) + "</strong></div><div class=\"dsh-upd-blist\">" + lines + "</div><div class=\"dsh-upd-browline\"><span class=\"dsh-upd-bcopy\"><button type=\"button\" data-act=\"copy-all-diag\">" + escapeHtml$2(batchText("batch.row-action.copy-diag", l)) + "</button><button type=\"button\" data-act=\"copy-all-manual\"" + (manualAbsent ? " disabled title=\"" + escapeHtml$2(absentTitle) + "\"" : "") + ">" + escapeHtml$2(batchText("batch.row-action.copy-manual", l)) + "</button></span></div></div>");
|
|
6317
6592
|
if (failedAct) parts.push("<div class=\"dsh-upd-banner-sub\">" + escapeHtml$2(failedAct) + "</div>");
|
|
6318
6593
|
}
|
|
6319
6594
|
if (confirmList) parts.push("<div class=\"dsh-upd-banner\" data-kind=\"update\" role=\"status\"><div><strong>" + escapeHtml$2(batchText("batch.banner.compliant-confirm", l, { list: confirmList })) + "</strong></div><div class=\"dsh-upd-browline\"><span class=\"dsh-upd-blist\">" + escapeHtml$2(confirmList) + "</span><button type=\"button\" data-act=\"batch-fallback-confirm\" data-primary=\"1\"" + (compliantBusy ? " disabled" : "") + ">" + escapeHtml$2(batchText("batch.action.install-compliant-confirm", l, { n: String(confirmCount) })) + "</button></div></div>");
|
|
@@ -6361,6 +6636,25 @@ ${body}`;
|
|
|
6361
6636
|
return "";
|
|
6362
6637
|
}
|
|
6363
6638
|
}
|
|
6639
|
+
function batchManualSourceOf(row) {
|
|
6640
|
+
return row.manualSource === "carried-over" ? "carried-over" : row.manualSource === null ? null : "frame";
|
|
6641
|
+
}
|
|
6642
|
+
function batchRowLastResortOf(row) {
|
|
6643
|
+
const snap = asSnapshotLike(row.snapshot);
|
|
6644
|
+
const manualSource = batchManualSourceOf(row);
|
|
6645
|
+
return lastResortVerdictOf({
|
|
6646
|
+
code: asBatchPhase(row.phase) === "failed" && typeof row.error === "string" && row.error ? row.error : null,
|
|
6647
|
+
blockedReason: snap && typeof snap.blockedReason === "string" ? snap.blockedReason : null,
|
|
6648
|
+
manual: typeof row.manual === "string" ? row.manual : null,
|
|
6649
|
+
manualSource,
|
|
6650
|
+
runningVersionKnown: snap ? snap.runningVersion !== null : null,
|
|
6651
|
+
fallbackAvailable: batchFallbackCauseOf(row) !== null,
|
|
6652
|
+
registered: snap && typeof snap.registered === "boolean" ? snap.registered : null
|
|
6653
|
+
});
|
|
6654
|
+
}
|
|
6655
|
+
function batchRowManualTrusted(row) {
|
|
6656
|
+
return typeof row.manual === "string" && row.manual.trim() !== "" && batchManualSourceOf(row) === "frame";
|
|
6657
|
+
}
|
|
6364
6658
|
function rowSetHTML(row, ctx) {
|
|
6365
6659
|
const phase = asBatchPhase(row.phase);
|
|
6366
6660
|
const keyAttr = escapeHtml$2(row.key);
|
|
@@ -6370,6 +6664,7 @@ ${body}`;
|
|
|
6370
6664
|
const rowDone = phase === "failed" && !queued ? compliantInstalledOf(row) : null;
|
|
6371
6665
|
const versionHTML = batchRowVersionHTML(row, ctx.knowledge, ctx.lang);
|
|
6372
6666
|
const rowStatusText = rowDone !== null ? rowDone.needsRestart ? batchText("batch.row.done-restart", ctx.lang) : batchText("batch.row.done", ctx.lang) : queued ? batchQueuedStatus(position, ctx.lang) : ctx.worldLatest !== null ? batchText("batch.row.update", ctx.lang, { version: ctx.worldLatest }) : ctx.inRound ? batchRowKnowledgeText(row, ctx.knowledge, ctx.lang) ?? batchRowStatus(row, skipped, ctx.lang) : batchRowPendingStatus(row, ctx.knowledge, ctx.lang) ?? batchRowStatus(row, skipped, ctx.lang);
|
|
6667
|
+
const lastResortBadge = batchRowLastResortOf(row).kind === "last-resort" ? "<span class=\"dsh-upd-lr-rowbadge\" data-last-resort=\"last-resort\">" + escapeHtml$2(batchText("batch.lastresort.row-badge", ctx.lang)) + "</span>" : "";
|
|
6373
6668
|
const actions = [];
|
|
6374
6669
|
const off = ctx.inFlight ? " disabled" : "";
|
|
6375
6670
|
if (phase === "installing") actions.push("<button type=\"button\" data-act=\"row-install\" data-key=\"" + keyAttr + "\" disabled>" + escapeHtml$2(batchText("batch.row-action.installing", ctx.lang)) + "</button>");
|
|
@@ -6399,7 +6694,7 @@ ${body}`;
|
|
|
6399
6694
|
const codeEsc = escapeHtml$2(failCode);
|
|
6400
6695
|
return "<span class=\"dsh-upd-bfail\">" + (escaped.includes(codeEsc) ? escaped.replace(codeEsc, "<code>" + codeEsc + "</code>") : escaped) + "</span>";
|
|
6401
6696
|
})() : "";
|
|
6402
|
-
const main = "<button type=\"button\" class=\"dsh-upd-brow-main\" data-act=\"toggle-details\" data-key=\"" + keyAttr + "\" aria-expanded=\"" + (ctx.expanded ? "true" : "false") + "\"><span class=\"dsh-upd-updot\" data-tone=\"" + dotToneOf(row, phase, skipped, queued, ctx.worldLatest, rowDone === null ? null : rowDone.needsRestart) + "\"></span><span class=\"dsh-upd-bname\">" + escapeHtml$2(titleOf(row, ctx.titles)) + "</span>" + versionHTML + "<span class=\"dsh-upd-bstat\">" + escapeHtml$2(rowStatusText) + (ctx.inRound && !queued ? "(" + escapeHtml$2(batchText("batch.row.unfinished-tag", ctx.lang)) + ")" : "") + "</span>" + failLine + "</button>";
|
|
6697
|
+
const main = "<button type=\"button\" class=\"dsh-upd-brow-main\" data-act=\"toggle-details\" data-key=\"" + keyAttr + "\" aria-expanded=\"" + (ctx.expanded ? "true" : "false") + "\"><span class=\"dsh-upd-updot\" data-tone=\"" + dotToneOf(row, phase, skipped, queued, ctx.worldLatest, rowDone === null ? null : rowDone.needsRestart) + "\"></span><span class=\"dsh-upd-bname\">" + escapeHtml$2(titleOf(row, ctx.titles)) + "</span>" + versionHTML + "<span class=\"dsh-upd-bstat\">" + lastResortBadge + escapeHtml$2(rowStatusText) + (ctx.inRound && !queued ? "(" + escapeHtml$2(batchText("batch.row.unfinished-tag", ctx.lang)) + ")" : "") + "</span>" + failLine + "</button>";
|
|
6403
6698
|
return "<div class=\"dsh-upd-brow-set\" data-key=\"" + keyAttr + "\"><div class=\"dsh-upd-brow\" data-phase=\"" + escapeHtml$2(phase) + "\" data-key=\"" + keyAttr + "\"" + (queued ? " data-queued=\"1\"" : "") + ">" + main + "<span class=\"dsh-upd-brow-actions\">" + actions.join("") + "</span></div></div>";
|
|
6404
6699
|
}
|
|
6405
6700
|
function detailActionsHTML(row, ctx) {
|
|
@@ -6422,7 +6717,7 @@ ${body}`;
|
|
|
6422
6717
|
if (phase !== "installing" && singleCheckPhoneOf(row) !== null) buttons.push("<button type=\"button\" data-act=\"row-check\" data-key=\"" + keyAttr + "\"" + off + ">" + escapeHtml$2(batchText("batch.action.check", ctx.lang)) + "</button>");
|
|
6423
6718
|
if (!queued && phase === "ready" && ctx.skipped === null && version !== null) buttons.push("<button type=\"button\" data-act=\"row-skip\" data-key=\"" + keyAttr + "\"" + off + ">" + escapeHtml$2(batchText("batch.row-action.skip", ctx.lang)) + "</button>");
|
|
6424
6719
|
if (ctx.skipped !== null) buttons.push("<button type=\"button\" data-act=\"row-resume-skip\" data-key=\"" + keyAttr + "\"" + off + ">" + escapeHtml$2(batchText("batch.row-action.unskip", ctx.lang, { version: ctx.skipped })) + "</button>");
|
|
6425
|
-
if (
|
|
6720
|
+
if (batchRowManualTrusted(row)) buttons.push("<button type=\"button\" data-act=\"row-copy-manual\" data-key=\"" + keyAttr + "\"" + off + ">" + escapeHtml$2(batchText("batch.row-action.copy-manual", ctx.lang)) + "</button>");
|
|
6426
6721
|
buttons.push("<button type=\"button\" data-act=\"row-copy-diag\" data-key=\"" + keyAttr + "\"" + off + ">" + escapeHtml$2(batchText("batch.row-action.copy-diag", ctx.lang)) + "</button>");
|
|
6427
6722
|
return "<span class=\"dsh-upd-bdetail-actions\">" + buttons.join("") + "</span>";
|
|
6428
6723
|
}
|
|
@@ -6438,6 +6733,7 @@ ${body}`;
|
|
|
6438
6733
|
const withoutStyle = stripActionButtons(renderUpdatePanelHTML({
|
|
6439
6734
|
snapshot: asSnapshotLike(row.snapshot),
|
|
6440
6735
|
manual: typeof row.manual === "string" ? row.manual : null,
|
|
6736
|
+
manualSource: batchManualSourceOf(row),
|
|
6441
6737
|
changelogMarkdown: typeof ctx.changelogMarkdown === "string" ? ctx.changelogMarkdown : null,
|
|
6442
6738
|
queue: asQueueLike(row.queue),
|
|
6443
6739
|
skippedLatest: ctx.skipped !== null,
|
|
@@ -6501,6 +6797,8 @@ ${body}`;
|
|
|
6501
6797
|
".dsh-upd-bver-new{color:var(--dsh-update-new-text,#dc2626);font-weight:700}",
|
|
6502
6798
|
".dsh-upd-bver-new-ok{color:var(--dsh-update-new-ok-text,#047857);font-weight:700}",
|
|
6503
6799
|
".dsh-upd-bstat{font-size:var(--dsh-update-panel-small-font-size,12.5px);opacity:.9;min-width:0;overflow-wrap:anywhere}",
|
|
6800
|
+
".dsh-upd-lr-rowbadge{display:inline-block;margin-right:5px;font-size:var(--dsh-update-panel-small-font-size,11px);font-weight:700;letter-spacing:.06em;border:1px solid currentColor;border-radius:3px;padding:0 4px;color:var(--dsh-update-bad-text,#b91c1c)}",
|
|
6801
|
+
".dsh-upd-bdetail-dialog .dsh-upd-lr-ico{width:22px;height:22px}",
|
|
6504
6802
|
".dsh-upd-bfail{grid-column:1/-1;display:block;font-size:var(--dsh-update-panel-small-font-size,12.5px);color:var(--dsh-update-bad-border,#dc2626)}",
|
|
6505
6803
|
"/* #156 finishing fact: ledger phase failed but the newest installable build did get installed — green, not red. */",
|
|
6506
6804
|
".dsh-upd-bdone{color:var(--dsh-update-ok-border,#059669)}",
|
|
@@ -6827,7 +7125,9 @@ ${body}`;
|
|
|
6827
7125
|
commands += 1;
|
|
6828
7126
|
continue;
|
|
6829
7127
|
}
|
|
6830
|
-
|
|
7128
|
+
const reason = manualAbsentReasonOf(asSnapshotLike(row.snapshot));
|
|
7129
|
+
const comment = reason ? batchText("panel.manual.absent-comment", l, { reason: manualAbsentReasonTextOf(reason, l) }) : batchText("panel.manual.absent-comment-unknown", l);
|
|
7130
|
+
lines.push("# " + titleOf(row, titles) + ":" + comment);
|
|
6831
7131
|
}
|
|
6832
7132
|
return {
|
|
6833
7133
|
text: lines.join("\n"),
|
|
@@ -7969,7 +8269,7 @@ ${body}`;
|
|
|
7969
8269
|
};
|
|
7970
8270
|
}
|
|
7971
8271
|
//#endregion
|
|
7972
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
8272
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.25/node_modules/dsh-plugin-update/dist/entry-batch.js
|
|
7973
8273
|
function isObject$1(value) {
|
|
7974
8274
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
7975
8275
|
}
|
|
@@ -8352,11 +8652,21 @@ ${body}`;
|
|
|
8352
8652
|
".dsh-upd-ib-status{font-weight:600;overflow-wrap:anywhere}",
|
|
8353
8653
|
".dsh-upd-ib-sub{opacity:.85;overflow-wrap:anywhere}",
|
|
8354
8654
|
".dsh-upd-ib-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}",
|
|
8355
|
-
".dsh-upd-ib button{cursor:pointer}",
|
|
8655
|
+
".dsh-upd-ib button{cursor:pointer;transition:border-color 120ms ease,box-shadow 120ms ease,transform 80ms ease}",
|
|
8356
8656
|
".dsh-upd-ib button[disabled]{cursor:default}",
|
|
8657
|
+
".dsh-upd-ib button:hover:not(:disabled){border-color:var(--dsh-update-primary,#2563eb);box-shadow:0 0 0 2px var(--dsh-update-primary,#2563eb)}",
|
|
8658
|
+
".dsh-upd-ib button:active:not(:disabled){transform:translateY(1px)}",
|
|
8659
|
+
".dsh-upd-ib button:focus-visible{outline:2px solid var(--dsh-update-primary,#2563eb);outline-offset:2px}",
|
|
8660
|
+
"@media (prefers-reduced-motion: reduce){.dsh-upd-ib button{transition:none}}",
|
|
8357
8661
|
".dsh-upd-ib-manual summary{cursor:pointer}",
|
|
8358
8662
|
".dsh-upd-ib-manual code{display:block;white-space:pre-wrap;overflow-wrap:anywhere}",
|
|
8663
|
+
".dsh-upd-ib-manual .dsh-upd-lastresort{margin-top:6px}",
|
|
8664
|
+
".dsh-upd-ib-manual .dsh-upd-lr-go{margin:0}",
|
|
8665
|
+
".dsh-upd-ib-stale{color:var(--dsh-update-text-muted,inherit);font-size:var(--dsh-update-panel-small-font-size,12px)}",
|
|
8359
8666
|
".dsh-upd-ib-notice{opacity:.8}",
|
|
8667
|
+
".dsh-upd-ib .dsh-upd-copy-bubble{position:fixed;z-index:10000;transform:translate(-50%,-100%);background:var(--dsh-update-text,#1f2937);color:var(--dsh-update-bg,#ffffff);border-radius:4px;padding:3px 9px;font-size:var(--dsh-update-panel-small-font-size,12px);line-height:1.5;pointer-events:none}",
|
|
8668
|
+
"@media (prefers-reduced-motion: reduce){.dsh-upd-ib .dsh-upd-copy-bubble{animation:none}}",
|
|
8669
|
+
"@media (forced-colors: active){.dsh-upd-ib .dsh-upd-copy-bubble{border:1px solid CanvasText;background:Canvas;color:CanvasText}}",
|
|
8360
8670
|
".dsh-upd-ib[data-theme=\"archive\"] .dsh-upd-ib-status{font-family:serif}"
|
|
8361
8671
|
].join("\n");
|
|
8362
8672
|
function isObject(value) {
|
|
@@ -8557,6 +8867,16 @@ ${body}`;
|
|
|
8557
8867
|
}
|
|
8558
8868
|
function renderInstallButtonHTML(view, opts) {
|
|
8559
8869
|
const l = opts.lang;
|
|
8870
|
+
const manualSource = opts.manualSource === "carried-over" ? "carried-over" : opts.manualSource === null ? null : "frame";
|
|
8871
|
+
const manualTrusted = typeof opts.manual === "string" && opts.manual.trim() !== "" && manualSource === "frame";
|
|
8872
|
+
const lastResort = lastResortVerdictOf({
|
|
8873
|
+
code: opts.failureCode ?? null,
|
|
8874
|
+
blockedReason: null,
|
|
8875
|
+
manual: typeof opts.manual === "string" ? opts.manual : null,
|
|
8876
|
+
manualSource,
|
|
8877
|
+
fallbackAvailable: opts.fallbackAvailable === true,
|
|
8878
|
+
registered: opts.registered ?? null
|
|
8879
|
+
});
|
|
8560
8880
|
const parts = [];
|
|
8561
8881
|
parts.push("<style>" + INSTALL_BUTTON_CSS + "</style>");
|
|
8562
8882
|
parts.push("<div class=\"dsh-upd-ib\" data-theme=\"" + opts.theme + "\">");
|
|
@@ -8577,8 +8897,16 @@ ${body}`;
|
|
|
8577
8897
|
parts.push("<div class=\"dsh-upd-ib-row\"><button type=\"button\" data-action=\"install-fallback\" data-primary=\"1\" title=\"" + escapeHtml(copyText("panel.action.install-fallback-title", l)) + "\"" + busy + ">" + escapeHtml(copyText("panel.action.install-fallback", l)) + "</button><button type=\"button\" data-action=\"wait-latest\" title=\"" + escapeHtml(copyText("panel.action.wait-latest-title", l)) + "\"" + (view.fallbackBusy || view.buttonBusy ? " disabled" : "") + ">" + escapeHtml(copyText("panel.action.wait-latest", l)) + "</button></div>");
|
|
8578
8898
|
}
|
|
8579
8899
|
if (view.bannerKind === "failed") parts.push("<div class=\"dsh-upd-ib-row\"><button type=\"button\" data-action=\"copy-diag\" title=\"" + escapeHtml(copyText("panel.action.copy-diag-title", l)) + "\">" + escapeHtml(copyText("panel.action.copy-diag", l)) + "</button></div>");
|
|
8580
|
-
if (view.showManual &&
|
|
8900
|
+
if (view.showManual && manualTrusted) {
|
|
8901
|
+
const bar = lastResortBarHTML({
|
|
8902
|
+
verdict: lastResort,
|
|
8903
|
+
lang: l,
|
|
8904
|
+
buttonHtml: lastResortCopyButtonHTML(l)
|
|
8905
|
+
});
|
|
8906
|
+
parts.push("<details class=\"dsh-upd-ib-manual\"><summary>" + escapeHtml(copyText("panel.chapter.manual", l)) + "</summary>" + bar + "<code>" + escapeHtml(opts.manual ?? "") + "</code>" + (bar ? "" : "<button type=\"button\" data-action=\"copy-manual\" title=\"" + escapeHtml(copyText("panel.action.copy-manual-title", l)) + "\">" + escapeHtml(copyText("panel.action.copy-manual", l)) + "</button>") + "</details>");
|
|
8907
|
+
} else if (view.showManual && manualSource === "carried-over" && opts.manual) parts.push("<details class=\"dsh-upd-ib-manual\"><summary>" + escapeHtml(copyText("panel.chapter.manual", l)) + "</summary><div class=\"dsh-upd-ib-stale\">" + escapeHtml(copyText("panel.manual.stale", l)) + "</div></details>");
|
|
8581
8908
|
if (opts.notice) parts.push("<div class=\"dsh-upd-ib-notice\" role=\"status\">" + escapeHtml(opts.notice) + "</div>");
|
|
8909
|
+
parts.push(copyBubbleHTML(opts.bubble ?? null));
|
|
8582
8910
|
parts.push("</div>");
|
|
8583
8911
|
return parts.join("");
|
|
8584
8912
|
}
|
|
@@ -8676,6 +9004,8 @@ ${body}`;
|
|
|
8676
9004
|
let mounted = true;
|
|
8677
9005
|
let snapshot = null;
|
|
8678
9006
|
let manual = null;
|
|
9007
|
+
let manualSource = null;
|
|
9008
|
+
let failureRereadDone = false;
|
|
8679
9009
|
let queue = null;
|
|
8680
9010
|
let receipt = null;
|
|
8681
9011
|
let requestId = null;
|
|
@@ -8689,6 +9019,9 @@ ${body}`;
|
|
|
8689
9019
|
let envProfileName = null;
|
|
8690
9020
|
let copyNotice = null;
|
|
8691
9021
|
let noticeExpiresAt = 0;
|
|
9022
|
+
let copyBubble = null;
|
|
9023
|
+
let copyBubbleTimer = null;
|
|
9024
|
+
let copyAnchorEl = null;
|
|
8692
9025
|
let actionBytes = -1;
|
|
8693
9026
|
let actionTruncated = false;
|
|
8694
9027
|
function latchNow() {
|
|
@@ -8808,6 +9141,8 @@ ${body}`;
|
|
|
8808
9141
|
const s = asSnapshot(reply["snapshot"]);
|
|
8809
9142
|
if (s) snapshot = s;
|
|
8810
9143
|
manual = typeof reply["manual"] === "string" ? reply["manual"] : null;
|
|
9144
|
+
manualSource = manual !== null ? "frame" : null;
|
|
9145
|
+
failureRereadDone = false;
|
|
8811
9146
|
if (reply["receipt"] && isObject(reply["receipt"]) && typeof reply["receipt"]["checkId"] === "string") receipt = { checkId: reply["receipt"]["checkId"] };
|
|
8812
9147
|
const q = asQueue(reply["queue"]);
|
|
8813
9148
|
if (q) queue = q;
|
|
@@ -8830,7 +9165,11 @@ ${body}`;
|
|
|
8830
9165
|
} else {
|
|
8831
9166
|
const kindText = typeof reply["errorKind"] === "string" ? reply["errorKind"].trim() : "";
|
|
8832
9167
|
const errText = typeof reply["error"] === "string" ? reply["error"].trim() : "";
|
|
8833
|
-
if ((kindText || errText) !== "update-busy")
|
|
9168
|
+
if ((kindText || errText) !== "update-busy") {
|
|
9169
|
+
setLatch(latchFromReply(reply, via === "install" ? "install" : "check"));
|
|
9170
|
+
manualSource = manual ? "carried-over" : null;
|
|
9171
|
+
scheduleFailureReread();
|
|
9172
|
+
}
|
|
8834
9173
|
try {
|
|
8835
9174
|
const env = reply["env"];
|
|
8836
9175
|
if (isObject(env)) {
|
|
@@ -8846,6 +9185,24 @@ ${body}`;
|
|
|
8846
9185
|
} catch {}
|
|
8847
9186
|
}
|
|
8848
9187
|
}
|
|
9188
|
+
function scheduleFailureReread() {
|
|
9189
|
+
if (failureRereadDone || !mounted) return;
|
|
9190
|
+
failureRereadDone = true;
|
|
9191
|
+
(async () => {
|
|
9192
|
+
try {
|
|
9193
|
+
const reply = await call(phoneNames.updateStatus, queueArgs());
|
|
9194
|
+
if (!mounted) return;
|
|
9195
|
+
if (!isObject(reply) || reply["ok"] !== true) return;
|
|
9196
|
+
const s = asSnapshot(reply["snapshot"]);
|
|
9197
|
+
if (s) snapshot = s;
|
|
9198
|
+
manual = typeof reply["manual"] === "string" ? reply["manual"] : null;
|
|
9199
|
+
manualSource = manual !== null ? "frame" : null;
|
|
9200
|
+
const q = asQueue(reply["queue"]);
|
|
9201
|
+
if (q) queue = q;
|
|
9202
|
+
paint();
|
|
9203
|
+
} catch {}
|
|
9204
|
+
})();
|
|
9205
|
+
}
|
|
8849
9206
|
function queueArgs() {
|
|
8850
9207
|
return {
|
|
8851
9208
|
includeQueue: true,
|
|
@@ -8881,11 +9238,17 @@ ${body}`;
|
|
|
8881
9238
|
noticeExpiresAt = 0;
|
|
8882
9239
|
}
|
|
8883
9240
|
const lang = currentLang();
|
|
8884
|
-
const
|
|
9241
|
+
const view = currentView();
|
|
9242
|
+
const html = renderInstallButtonHTML(view, {
|
|
8885
9243
|
manual,
|
|
8886
9244
|
notice: copyNotice,
|
|
8887
9245
|
theme,
|
|
8888
|
-
lang
|
|
9246
|
+
lang,
|
|
9247
|
+
manualSource,
|
|
9248
|
+
failureCode: latch?.code ?? null,
|
|
9249
|
+
fallbackAvailable: view.fallbackStage !== null,
|
|
9250
|
+
registered: snapshot?.registered ?? null,
|
|
9251
|
+
bubble: copyBubble
|
|
8889
9252
|
});
|
|
8890
9253
|
try {
|
|
8891
9254
|
container.innerHTML = html;
|
|
@@ -8903,6 +9266,48 @@ ${body}`;
|
|
|
8903
9266
|
noticeExpiresAt = 0;
|
|
8904
9267
|
}
|
|
8905
9268
|
}
|
|
9269
|
+
function showCopyBubble(anchor) {
|
|
9270
|
+
if (copyBubbleTimer !== null) {
|
|
9271
|
+
try {
|
|
9272
|
+
clearTimeout(copyBubbleTimer);
|
|
9273
|
+
} catch {}
|
|
9274
|
+
copyBubbleTimer = null;
|
|
9275
|
+
}
|
|
9276
|
+
let left = 0;
|
|
9277
|
+
let top = 0;
|
|
9278
|
+
try {
|
|
9279
|
+
const el = anchor;
|
|
9280
|
+
const rect = el && typeof el.getBoundingClientRect === "function" ? el.getBoundingClientRect() : null;
|
|
9281
|
+
if (rect) {
|
|
9282
|
+
const l = Number(rect.left);
|
|
9283
|
+
const t = Number(rect.top);
|
|
9284
|
+
const w = Number(rect.width);
|
|
9285
|
+
if (Number.isFinite(l)) left = l + (Number.isFinite(w) ? w / 2 : 0);
|
|
9286
|
+
if (Number.isFinite(t)) top = t - 6;
|
|
9287
|
+
}
|
|
9288
|
+
} catch {
|
|
9289
|
+
left = 0;
|
|
9290
|
+
top = 0;
|
|
9291
|
+
}
|
|
9292
|
+
try {
|
|
9293
|
+
copyBubble = {
|
|
9294
|
+
text: copyText("panel.lastresort.copied", currentLang()),
|
|
9295
|
+
left,
|
|
9296
|
+
top
|
|
9297
|
+
};
|
|
9298
|
+
} catch {
|
|
9299
|
+
copyBubble = null;
|
|
9300
|
+
}
|
|
9301
|
+
try {
|
|
9302
|
+
copyBubbleTimer = setTimeout(() => {
|
|
9303
|
+
copyBubbleTimer = null;
|
|
9304
|
+
copyBubble = null;
|
|
9305
|
+
if (mounted) paint();
|
|
9306
|
+
}, 1400);
|
|
9307
|
+
} catch {
|
|
9308
|
+
copyBubbleTimer = null;
|
|
9309
|
+
}
|
|
9310
|
+
}
|
|
8906
9311
|
async function refresh() {
|
|
8907
9312
|
if (!mounted) return;
|
|
8908
9313
|
try {
|
|
@@ -9078,8 +9483,9 @@ ${body}`;
|
|
|
9078
9483
|
return null;
|
|
9079
9484
|
}
|
|
9080
9485
|
}
|
|
9081
|
-
async function act(kind) {
|
|
9486
|
+
async function act(kind, anchor = null) {
|
|
9082
9487
|
if (!mounted) return;
|
|
9488
|
+
copyAnchorEl = anchor;
|
|
9083
9489
|
actionBytes = -1;
|
|
9084
9490
|
actionTruncated = false;
|
|
9085
9491
|
try {
|
|
@@ -9240,12 +9646,13 @@ ${body}`;
|
|
|
9240
9646
|
paint();
|
|
9241
9647
|
return;
|
|
9242
9648
|
case "copy-manual":
|
|
9243
|
-
if (manual) try {
|
|
9649
|
+
if (manual && manualSource === "frame") try {
|
|
9244
9650
|
await copyTextOut(manual);
|
|
9245
|
-
|
|
9651
|
+
showCopyBubble(copyAnchorEl);
|
|
9246
9652
|
} catch {
|
|
9247
9653
|
sayCopyKey("panel.toast.copy-manual-fail");
|
|
9248
9654
|
}
|
|
9655
|
+
copyAnchorEl = null;
|
|
9249
9656
|
paint();
|
|
9250
9657
|
return;
|
|
9251
9658
|
case "copy-diag": {
|
|
@@ -9285,7 +9692,7 @@ ${body}`;
|
|
|
9285
9692
|
const btn = t?.target && typeof t.target.closest === "function" ? t.target.closest("[data-action]") : null;
|
|
9286
9693
|
const kind = btn?.getAttribute ? btn.getAttribute("data-action") : null;
|
|
9287
9694
|
if (kind !== "install" && kind !== "check" && kind !== "copy-manual" && kind !== "copy-diag" && kind !== "install-fallback" && kind !== "install-fallback-confirm" && kind !== "wait-latest") return;
|
|
9288
|
-
act(kind);
|
|
9695
|
+
act(kind, btn ?? null);
|
|
9289
9696
|
} catch {}
|
|
9290
9697
|
}
|
|
9291
9698
|
function unmount() {
|
|
@@ -9297,6 +9704,12 @@ ${body}`;
|
|
|
9297
9704
|
try {
|
|
9298
9705
|
timer.clear(handle);
|
|
9299
9706
|
} catch {}
|
|
9707
|
+
if (copyBubbleTimer !== null) {
|
|
9708
|
+
try {
|
|
9709
|
+
clearTimeout(copyBubbleTimer);
|
|
9710
|
+
} catch {}
|
|
9711
|
+
copyBubbleTimer = null;
|
|
9712
|
+
}
|
|
9300
9713
|
try {
|
|
9301
9714
|
container.removeEventListener?.("click", onClick);
|
|
9302
9715
|
} catch {}
|
|
@@ -12141,7 +12554,7 @@ ${body}`;
|
|
|
12141
12554
|
}, react.createElement("span", { style: S.morePkg }, row.pkg), react.createElement("span", { style: S.moreDesc }, row.desc), react.createElement("span", { style: S.moreIcon }, react.createElement(ExternalIcon, null)))));
|
|
12142
12555
|
}
|
|
12143
12556
|
/** 版本胶囊那一行字:只在这里拼一次,屏上与用例读的是同一串。 */
|
|
12144
|
-
const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.
|
|
12557
|
+
const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.71";
|
|
12145
12558
|
/** 右下角那本书离面板两沿的距离:用户口径「一直处于面板右下角、不随列表滑动消失」
|
|
12146
12559
|
* ⇒ sticky 吸附(面板相对,视口多大都落在面板角上);INSET=右沿,BOTTOM=底沿。 */
|
|
12147
12560
|
const MANUAL_ENTRY_INSET = 16;
|