@d86e/hive-panel 1.0.15 → 1.0.16
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/package.json +1 -1
- package/public/panel.css +0 -5
- package/public/panel.js +0 -74
package/package.json
CHANGED
package/public/panel.css
CHANGED
|
@@ -1320,9 +1320,4 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
|
|
|
1320
1320
|
.hive-event-list { flex: 1 1 auto; min-height: 0; max-height: none; padding: 8px 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: auto; }
|
|
1321
1321
|
.hive-event-error { color: var(--hive-danger); font-size: 11px; line-height: 1.5; }
|
|
1322
1322
|
|
|
1323
|
-
.hive-settings-reinit { margin-top: 4px; }
|
|
1324
|
-
.hive-reinit-result { margin-top: 4px; }
|
|
1325
|
-
.hive-reinit-result.is-hidden { display: none; }
|
|
1326
|
-
.hive-reinit-result.is-success { color: var(--hive-ok); }
|
|
1327
|
-
.hive-reinit-result.is-error { color: var(--hive-danger); }
|
|
1328
1323
|
|
package/public/panel.js
CHANGED
|
@@ -2141,11 +2141,6 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
|
|
|
2141
2141
|
.hive-events-recycle.is-hidden { display: none; }
|
|
2142
2142
|
.hive-event-list { flex: 1 1 auto; min-height: 0; max-height: none; padding: 8px 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: auto; }
|
|
2143
2143
|
.hive-event-error { color: var(--hive-danger); font-size: 11px; line-height: 1.5; }
|
|
2144
|
-
.hive-settings-reinit { margin-top: 4px; }
|
|
2145
|
-
.hive-reinit-result { margin-top: 4px; }
|
|
2146
|
-
.hive-reinit-result.is-hidden { display: none; }
|
|
2147
|
-
.hive-reinit-result.is-success { color: var(--hive-ok); }
|
|
2148
|
-
.hive-reinit-result.is-error { color: var(--hive-danger); }
|
|
2149
2144
|
`;
|
|
2150
2145
|
|
|
2151
2146
|
const LANE_LABEL_KEYS = Object.freeze({
|
|
@@ -2368,14 +2363,6 @@ export const messages = Object.freeze({
|
|
|
2368
2363
|
"settings.saveLimits": "Save limits",
|
|
2369
2364
|
"settings.close": "Close",
|
|
2370
2365
|
"settings.closeAria": "Close settings",
|
|
2371
|
-
"settings.reinitTitle": "Reinitialise",
|
|
2372
|
-
"settings.reinitDescription": "Rewrite .hive/roles and the skill files so older repositories pick up the latest contract.",
|
|
2373
|
-
"settings.reinitButton": "Reinitialise",
|
|
2374
|
-
"settings.reinitConfirm": "Reinitialising overwrites .hive/roles and skill files. Continue?",
|
|
2375
|
-
"settings.reinitBusy": "Reinitialising…",
|
|
2376
|
-
"settings.reinitSuccess": "Reinitialised; the snapshot has been refreshed.",
|
|
2377
|
-
"settings.reinitFailed": "Reinitialisation failed",
|
|
2378
|
-
"settings.reinitReadOnly": "Read-only mode cannot reinitialise.",
|
|
2379
2366
|
"event.unknown": "event",
|
|
2380
2367
|
"add.dialogTitle": "New task",
|
|
2381
2368
|
"add.title": "Title",
|
|
@@ -2690,14 +2677,6 @@ export const messages = Object.freeze({
|
|
|
2690
2677
|
"settings.saveLimits": "保存限额",
|
|
2691
2678
|
"settings.close": "关闭",
|
|
2692
2679
|
"settings.closeAria": "关闭设置",
|
|
2693
|
-
"settings.reinitTitle": "重新初始化",
|
|
2694
|
-
"settings.reinitDescription": "重新写入 .hive/roles 与 skill,用于老仓库更新到最新契约。",
|
|
2695
|
-
"settings.reinitButton": "重新初始化",
|
|
2696
|
-
"settings.reinitConfirm": "重新初始化会覆盖 .hive/roles 与 skill,确定继续?",
|
|
2697
|
-
"settings.reinitBusy": "初始化中…",
|
|
2698
|
-
"settings.reinitSuccess": "重新初始化完成,快照已刷新。",
|
|
2699
|
-
"settings.reinitFailed": "重新初始化失败",
|
|
2700
|
-
"settings.reinitReadOnly": "只读模式不能重新初始化。",
|
|
2701
2680
|
"event.unknown": "事件",
|
|
2702
2681
|
"add.dialogTitle": "新建任务",
|
|
2703
2682
|
"add.title": "标题",
|
|
@@ -5247,59 +5226,6 @@ export function mount(root, options = {}) {
|
|
|
5247
5226
|
body.appendChild(panelWrap);
|
|
5248
5227
|
selectSettingsTab(settingsActiveTab, false);
|
|
5249
5228
|
body.appendChild(queenSection);
|
|
5250
|
-
|
|
5251
|
-
const reinitSection = element(doc, "section", "hive-settings-section hive-settings-reinit");
|
|
5252
|
-
reinitSection.appendChild(element(doc, "div", "hive-settings-section-title", translate("settings.reinitTitle")));
|
|
5253
|
-
reinitSection.appendChild(
|
|
5254
|
-
element(doc, "div", "hive-help-desc", translate("settings.reinitDescription")),
|
|
5255
|
-
);
|
|
5256
|
-
if (!writable) {
|
|
5257
|
-
reinitSection.appendChild(element(doc, "div", "hive-settings-note", translate("settings.reinitReadOnly")));
|
|
5258
|
-
}
|
|
5259
|
-
const reinitResult = element(doc, "div", "hive-settings-note hive-reinit-result is-hidden", "");
|
|
5260
|
-
const reinitButton = element(
|
|
5261
|
-
doc,
|
|
5262
|
-
"button",
|
|
5263
|
-
"hive-btn hive-settings-secondary hive-settings-reinit-button",
|
|
5264
|
-
translate("settings.reinitButton"),
|
|
5265
|
-
);
|
|
5266
|
-
setAttr(reinitButton, "type", "button");
|
|
5267
|
-
setAttr(reinitButton, "title", translate("settings.reinitButton"));
|
|
5268
|
-
setAttr(reinitButton, "aria-label", translate("settings.reinitButton"));
|
|
5269
|
-
reinitButton.disabled = !writable;
|
|
5270
|
-
let reinitBusy = false;
|
|
5271
|
-
reinitButton.addEventListener("click", () => {
|
|
5272
|
-
if (reinitBusy || !writable) return;
|
|
5273
|
-
if (!askConfirm(translate("settings.reinitConfirm"))) return;
|
|
5274
|
-
reinitBusy = true;
|
|
5275
|
-
reinitButton.disabled = true;
|
|
5276
|
-
reinitButton.textContent = translate("settings.reinitBusy");
|
|
5277
|
-
reinitResult.className = "hive-settings-note hive-reinit-result is-hidden";
|
|
5278
|
-
reinitResult.textContent = "";
|
|
5279
|
-
void (async () => {
|
|
5280
|
-
const result = await requestAction("init", { force: true });
|
|
5281
|
-
if (destroyed || limitsDialogNode !== dialog) return;
|
|
5282
|
-
reinitBusy = false;
|
|
5283
|
-
reinitButton.disabled = !writable;
|
|
5284
|
-
reinitButton.textContent = translate("settings.reinitButton");
|
|
5285
|
-
if (result.ok) {
|
|
5286
|
-
reinitResult.className = "hive-settings-note hive-reinit-result is-success";
|
|
5287
|
-
reinitResult.textContent = translate("settings.reinitSuccess");
|
|
5288
|
-
showToast("success", translate("settings.reinitSuccess"), "");
|
|
5289
|
-
await forceRefresh();
|
|
5290
|
-
} else {
|
|
5291
|
-
const detail = actionErrorDetail(result.error) || translate("settings.reinitFailed");
|
|
5292
|
-
reinitResult.className = "hive-settings-note hive-reinit-result is-error";
|
|
5293
|
-
reinitResult.textContent = translate("settings.reinitFailed") + ": " + detail;
|
|
5294
|
-
showToast("error", translate("settings.reinitFailed"), detail);
|
|
5295
|
-
}
|
|
5296
|
-
})();
|
|
5297
|
-
});
|
|
5298
|
-
const reinitActions = element(doc, "div", "hive-settings-form-actions");
|
|
5299
|
-
reinitActions.appendChild(reinitButton);
|
|
5300
|
-
reinitSection.appendChild(reinitActions);
|
|
5301
|
-
reinitSection.appendChild(reinitResult);
|
|
5302
|
-
body.appendChild(reinitSection);
|
|
5303
5229
|
dialog.appendChild(body);
|
|
5304
5230
|
|
|
5305
5231
|
showModalDialog(dialog);
|