@marktowin/prototype-core 1.2.18 → 1.2.20
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as an, computed as x, openBlock as v, createBlock as He, resolveDynamicComponent as bo, createElementBlock as f, Fragment as D, renderList as R, normalizeClass as E, createTextVNode as z, toDisplayString as c, createElementVNode as t, normalizeStyle as Be, createCommentVNode as C, ref as w, watch as ze, createVNode as
|
|
2
|
-
import { Save as $d, CloudUpload as _d, Download as Pd, X as hn, Plus as Bn, ChevronDown as Dd, ChevronRight as Ad, Trash2 as
|
|
3
|
-
import { g as xo, a as ca, s as Gd } from "./index-
|
|
1
|
+
import { defineComponent as an, computed as x, openBlock as v, createBlock as He, resolveDynamicComponent as bo, createElementBlock as f, Fragment as D, renderList as R, normalizeClass as E, createTextVNode as z, toDisplayString as c, createElementVNode as t, normalizeStyle as Be, createCommentVNode as C, ref as w, watch as ze, createVNode as V, Transition as nl, withCtx as ol, unref as i, withModifiers as Ie, withDirectives as N, vModelText as G, createStaticVNode as ji, reactive as yo, onBeforeUnmount as us, onMounted as ml, vModelSelect as lt, nextTick as Ha, isRef as go, vModelCheckbox as Id, withKeys as Ka } from "vue";
|
|
2
|
+
import { Save as $d, CloudUpload as _d, Download as Pd, X as hn, Plus as Bn, ChevronDown as Dd, ChevronRight as Ad, Trash2 as Un, RefreshCw as rr, FileSpreadsheet as ur, AlertTriangle as Ed, CheckCircle2 as Td, CircleDot as Mi, Bug as Nd, ImagePlus as Vi, Filter as Rd, Search as sl, ArrowLeft as Li, FileJson as cr, ArrowUp as Od, ArrowDown as Bd, Check as dr, CircleAlert as pr, Clipboard as vr, SunMedium as Ud, RotateCcw as jd, PanelTop as fr, BookOpen as Fi, Cloud as Md, Database as Gi, PanelLeft as Vd, MessageSquare as Ld, Keyboard as Fd } from "@lucide/vue";
|
|
3
|
+
import { g as xo, a as ca, s as Gd } from "./index-xlX5FPCA.js";
|
|
4
4
|
const Qo = /* @__PURE__ */ an({
|
|
5
5
|
__name: "ScreenRenderer",
|
|
6
6
|
props: {
|
|
@@ -89,14 +89,14 @@ const Qo = /* @__PURE__ */ an({
|
|
|
89
89
|
}, Tp = {
|
|
90
90
|
class: "screen-content",
|
|
91
91
|
style: { height: "100%", overflow: "hidden", "padding-bottom": "20px" }
|
|
92
|
-
}, Np = ["onClick"], Rp = { class: "flex items-center justify-center gap-1 max-w-full" }, Op = { class: "text-center text-[11px] text-ink leading-tight truncate" }, Bp = { class: "text-center text-[10px] text-muted" },
|
|
92
|
+
}, Np = ["onClick"], Rp = { class: "flex items-center justify-center gap-1 max-w-full" }, Op = { class: "text-center text-[11px] text-ink leading-tight truncate" }, Bp = { class: "text-center text-[10px] text-muted" }, Up = {
|
|
93
93
|
key: 1,
|
|
94
94
|
class: "flex flex-col items-center justify-center w-full h-48 text-muted relative"
|
|
95
|
-
},
|
|
95
|
+
}, jp = {
|
|
96
96
|
key: 0,
|
|
97
97
|
class: "absolute inset-x-6 top-0 h-[3px] rounded-full bg-ocean pointer-events-none z-20",
|
|
98
98
|
style: { "box-shadow": "0 0 10px rgb(var(--color-ocean)), 0 0 4px rgb(var(--color-ocean))" }
|
|
99
|
-
}, Mp = { class: "h-16 w-16 rounded-full border-2 border-dashed border-line flex items-center justify-center mb-3" },
|
|
99
|
+
}, Mp = { class: "h-16 w-16 rounded-full border-2 border-dashed border-line flex items-center justify-center mb-3" }, Vp = { class: "min-w-[200px] border-l border-line bg-panel flex flex-col overflow-hidden" }, Lp = { class: "flex-1 overflow-y-auto p-3 space-y-4" }, Fp = { key: 0 }, Gp = { class: "grid grid-cols-2 gap-3" }, zp = ["onDragstart"], Hp = {
|
|
100
100
|
class: "phone-screen",
|
|
101
101
|
style: { width: "393px", height: "852px" }
|
|
102
102
|
}, Kp = {
|
|
@@ -149,7 +149,7 @@ const Qo = /* @__PURE__ */ an({
|
|
|
149
149
|
function $e(_) {
|
|
150
150
|
return o.screens.find((P) => P.id === _);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function je() {
|
|
153
153
|
const _ = `flow-${Date.now()}`;
|
|
154
154
|
r.value.push({
|
|
155
155
|
id: _,
|
|
@@ -293,15 +293,15 @@ const Qo = /* @__PURE__ */ an({
|
|
|
293
293
|
st.value = null;
|
|
294
294
|
}, 2500);
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const U = w(!1), le = w(!1);
|
|
297
297
|
function Ce() {
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
U.value || (U.value = !0, s("save", JSON.parse(JSON.stringify(r.value)), (_) => {
|
|
299
|
+
U.value = !1, At(_ ? "保存成功,流程模式已更新" : "保存失败,已保留当前编辑", _ ? "success" : "error");
|
|
300
300
|
}));
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
|
|
304
|
-
|
|
302
|
+
function jt() {
|
|
303
|
+
le.value || !o.canPushRemote || (le.value = !0, s("push", JSON.parse(JSON.stringify(r.value)), (_) => {
|
|
304
|
+
le.value = !1, At(_ ? "已推送到 Gitee,流程模式已更新" : "推送失败,本地编辑已保留", _ ? "success" : "error");
|
|
305
305
|
}));
|
|
306
306
|
}
|
|
307
307
|
function yt() {
|
|
@@ -322,7 +322,7 @@ const Qo = /* @__PURE__ */ an({
|
|
|
322
322
|
P[4] || (P[4] = t("h2", { class: "text-lg font-semibold text-ink" }, "流程编排", -1)),
|
|
323
323
|
t("span", np, c((K = h.value) == null ? void 0 : K.title) + " · 子流程 " + c(g.value + 1) + " / " + c((be = h.value) == null ? void 0 : be.rows.length), 1)
|
|
324
324
|
]),
|
|
325
|
-
|
|
325
|
+
V(nl, { name: "toast" }, {
|
|
326
326
|
default: ol(() => [
|
|
327
327
|
st.value ? (v(), f("div", {
|
|
328
328
|
key: 0,
|
|
@@ -334,33 +334,33 @@ const Qo = /* @__PURE__ */ an({
|
|
|
334
334
|
t("div", op, [
|
|
335
335
|
t("button", {
|
|
336
336
|
class: "flex items-center gap-1.5 rounded-lg bg-soft px-3 py-1.5 text-sm font-medium text-ink hover:bg-canvas transition",
|
|
337
|
-
disabled:
|
|
337
|
+
disabled: U.value,
|
|
338
338
|
onClick: Ce
|
|
339
339
|
}, [
|
|
340
|
-
|
|
341
|
-
z(" " + c(
|
|
340
|
+
V(i($d), { class: "h-4 w-4" }),
|
|
341
|
+
z(" " + c(U.value ? "保存中…" : "保存到当前会话"), 1)
|
|
342
342
|
], 8, sp),
|
|
343
343
|
t("button", {
|
|
344
344
|
class: "flex items-center gap-1.5 rounded-lg bg-ink px-3 py-1.5 text-sm font-medium text-white transition hover:bg-ocean disabled:cursor-not-allowed disabled:opacity-40",
|
|
345
|
-
disabled:
|
|
345
|
+
disabled: le.value || !e.canPushRemote,
|
|
346
346
|
title: e.canPushRemote ? "推送到当前代码分支的 Gitee 流程文件" : "Gitee 未配置或当前代码分支不可识别",
|
|
347
|
-
onClick:
|
|
347
|
+
onClick: jt
|
|
348
348
|
}, [
|
|
349
|
-
|
|
350
|
-
z(" " + c(
|
|
349
|
+
V(i(_d), { class: "h-4 w-4" }),
|
|
350
|
+
z(" " + c(le.value ? "推送中…" : "推送到 Gitee"), 1)
|
|
351
351
|
], 8, ap),
|
|
352
352
|
t("button", {
|
|
353
353
|
class: "flex items-center gap-1.5 rounded-lg bg-ocean px-3 py-1.5 text-sm font-medium text-white hover:opacity-90 transition",
|
|
354
354
|
onClick: yt
|
|
355
355
|
}, [
|
|
356
|
-
|
|
356
|
+
V(i(Pd), { class: "h-4 w-4" }),
|
|
357
357
|
P[5] || (P[5] = z(" 导出 JSON ", -1))
|
|
358
358
|
]),
|
|
359
359
|
t("button", {
|
|
360
360
|
class: "flex h-8 w-8 items-center justify-center rounded-full bg-soft text-ink hover:bg-canvas transition",
|
|
361
361
|
onClick: Jt
|
|
362
362
|
}, [
|
|
363
|
-
|
|
363
|
+
V(i(hn), { class: "h-4 w-4" })
|
|
364
364
|
])
|
|
365
365
|
])
|
|
366
366
|
]),
|
|
@@ -369,9 +369,9 @@ const Qo = /* @__PURE__ */ an({
|
|
|
369
369
|
t("div", rp, [
|
|
370
370
|
t("button", {
|
|
371
371
|
class: "flex w-full items-center justify-center gap-2 rounded-xl bg-ocean py-2.5 text-sm font-medium text-white hover:opacity-90 transition",
|
|
372
|
-
onClick:
|
|
372
|
+
onClick: je
|
|
373
373
|
}, [
|
|
374
|
-
|
|
374
|
+
V(i(Bn), { class: "h-4 w-4" }),
|
|
375
375
|
P[6] || (P[6] = z(" 新建主流程 ", -1))
|
|
376
376
|
])
|
|
377
377
|
]),
|
|
@@ -397,7 +397,7 @@ const Qo = /* @__PURE__ */ an({
|
|
|
397
397
|
title: "删除主流程",
|
|
398
398
|
onClick: Ie((Ye) => H(q), ["stop"])
|
|
399
399
|
}, [
|
|
400
|
-
|
|
400
|
+
V(i(Un), { class: "h-3.5 w-3.5" })
|
|
401
401
|
], 8, pp)
|
|
402
402
|
], 8, cp),
|
|
403
403
|
we.value.has(q) ? (v(), f("div", vp, [
|
|
@@ -422,14 +422,14 @@ const Qo = /* @__PURE__ */ an({
|
|
|
422
422
|
title: "删除子流程",
|
|
423
423
|
onClick: Ie((Xe) => _e(q, W), ["stop"])
|
|
424
424
|
}, [
|
|
425
|
-
|
|
425
|
+
V(i(Un), { class: "h-3 w-3" })
|
|
426
426
|
], 8, mp)
|
|
427
427
|
], 10, fp))), 128)),
|
|
428
428
|
t("button", {
|
|
429
429
|
class: "flex w-full items-center gap-1.5 px-3 py-2 text-xs text-ocean hover:bg-canvas transition",
|
|
430
430
|
onClick: (Ye) => ue(q)
|
|
431
431
|
}, [
|
|
432
|
-
|
|
432
|
+
V(i(Bn), { class: "h-3 w-3" }),
|
|
433
433
|
P[7] || (P[7] = z(" 添加子流程 ", -1))
|
|
434
434
|
], 8, gp)
|
|
435
435
|
])) : C("", !0)
|
|
@@ -473,7 +473,7 @@ const Qo = /* @__PURE__ */ an({
|
|
|
473
473
|
class: "flex items-center gap-1.5 rounded-lg bg-soft px-3 py-1.5 text-xs font-medium text-ink hover:bg-canvas transition",
|
|
474
474
|
onClick: he
|
|
475
475
|
}, [
|
|
476
|
-
|
|
476
|
+
V(i(Bn), { class: "h-3.5 w-3.5" }),
|
|
477
477
|
P[10] || (P[10] = z(" 新增空行 ", -1))
|
|
478
478
|
])) : C("", !0)
|
|
479
479
|
])
|
|
@@ -519,7 +519,7 @@ const Qo = /* @__PURE__ */ an({
|
|
|
519
519
|
}, null, 8, ["screen"])) : C("", !0)
|
|
520
520
|
])
|
|
521
521
|
])) : (v(), f("div", Ep, [
|
|
522
|
-
P[11] || (P[11] =
|
|
522
|
+
P[11] || (P[11] = ji('<div class="status-bar" data-v-f5226710><span data-v-f5226710>9:41</span><span class="flex items-center gap-1" data-v-f5226710><svg class="h-3 w-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-f5226710><path d="M12 2a4 4 0 0 0-4 4c0 2.5 3 5.5 4 9 1-3.5 4-6.5 4-9a4 4 0 0 0-4-4Z" data-v-f5226710></path><circle cx="12" cy="6" r="1.5" data-v-f5226710></circle></svg> 86% </span></div>', 1)),
|
|
523
523
|
t("div", Tp, [
|
|
524
524
|
T.screenId ? (v(), He(Qo, {
|
|
525
525
|
key: 0,
|
|
@@ -533,7 +533,7 @@ const Qo = /* @__PURE__ */ an({
|
|
|
533
533
|
class: "absolute -right-1.5 -top-1.5 flex h-5 w-5 items-center justify-center rounded-full bg-danger text-white shadow-sm transition hover:scale-110",
|
|
534
534
|
onClick: (Xe) => Re(g.value, q)
|
|
535
535
|
}, [
|
|
536
|
-
|
|
536
|
+
V(i(hn), { class: "h-3 w-3" })
|
|
537
537
|
], 8, Np)
|
|
538
538
|
]),
|
|
539
539
|
t("div", Rp, [
|
|
@@ -549,23 +549,23 @@ const Qo = /* @__PURE__ */ an({
|
|
|
549
549
|
], 64)) : C("", !0)
|
|
550
550
|
])
|
|
551
551
|
], 46, Ip);
|
|
552
|
-
}), 128)) : (v(), f("div",
|
|
553
|
-
Je.value ? (v(), f("div",
|
|
552
|
+
}), 128)) : (v(), f("div", Up, [
|
|
553
|
+
Je.value ? (v(), f("div", jp)) : C("", !0),
|
|
554
554
|
t("div", Mp, [
|
|
555
|
-
|
|
555
|
+
V(i(Bn), { class: "h-6 w-6" })
|
|
556
556
|
]),
|
|
557
557
|
P[12] || (P[12] = t("p", { class: "text-sm" }, "从右侧拖拽页面到此处", -1))
|
|
558
558
|
]))
|
|
559
559
|
])
|
|
560
560
|
], 32)
|
|
561
561
|
]),
|
|
562
|
-
t("aside",
|
|
562
|
+
t("aside", Vp, [
|
|
563
563
|
P[18] || (P[18] = t("div", { class: "p-4 border-b border-line" }, [
|
|
564
564
|
t("h3", { class: "text-sm font-semibold text-ink" }, "状态库"),
|
|
565
565
|
t("p", { class: "text-xs text-muted mt-1" }, "拖拽页面状态到中间画布")
|
|
566
566
|
], -1)),
|
|
567
567
|
t("div", Lp, [
|
|
568
|
-
Qe.value.length ? (v(), f("div",
|
|
568
|
+
Qe.value.length ? (v(), f("div", Fp, [
|
|
569
569
|
P[15] || (P[15] = t("p", { class: "mb-2 text-xs font-semibold text-muted" }, "移动端", -1)),
|
|
570
570
|
t("div", Gp, [
|
|
571
571
|
(v(!0), f(D, null, R(Qe.value, (T) => (v(), f("div", {
|
|
@@ -586,9 +586,9 @@ const Qo = /* @__PURE__ */ an({
|
|
|
586
586
|
style: Be({ transform: `scale(${I.value})` })
|
|
587
587
|
}, [
|
|
588
588
|
t("div", Hp, [
|
|
589
|
-
P[13] || (P[13] =
|
|
589
|
+
P[13] || (P[13] = ji('<div class="status-bar" data-v-f5226710><span data-v-f5226710>9:41</span><span class="flex items-center gap-1" data-v-f5226710><svg class="h-3 w-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-f5226710><path d="M12 2a4 4 0 0 0-4 4c0 2.5 3 5.5 4 9 1-3.5 4-6.5 4-9a4 4 0 0 0-4-4Z" data-v-f5226710></path><circle cx="12" cy="6" r="1.5" data-v-f5226710></circle></svg> 86% </span></div>', 1)),
|
|
590
590
|
t("div", Kp, [
|
|
591
|
-
|
|
591
|
+
V(Qo, {
|
|
592
592
|
screen: ct(T)
|
|
593
593
|
}, null, 8, ["screen"])
|
|
594
594
|
])
|
|
@@ -626,7 +626,7 @@ const Qo = /* @__PURE__ */ an({
|
|
|
626
626
|
}, [
|
|
627
627
|
t("div", ev, [
|
|
628
628
|
t("div", tv, [
|
|
629
|
-
|
|
629
|
+
V(Qo, {
|
|
630
630
|
screen: ct(T)
|
|
631
631
|
}, null, 8, ["screen"])
|
|
632
632
|
])
|
|
@@ -1070,23 +1070,23 @@ function Ov(e, n, o = -1) {
|
|
|
1070
1070
|
const s = na(n);
|
|
1071
1071
|
return e.some((r, d) => d !== o && na(r.id) === s);
|
|
1072
1072
|
}
|
|
1073
|
-
const
|
|
1073
|
+
const Ur = ["功能异常", "UI/文案", "流程阻塞", "数据/报告", "设备/蓝牙", "性能/稳定性", "兼容性", "其他"], jr = ["P0", "P1", "P2", "P3", "P4"], Mr = ["安卓侧", "iOS 侧", "后端"], Vr = ["后端开发", "iOS 开发", "安卓开发", "产品经理", "算法开发", "硬件嵌入式开发"], Lr = ["待处理", "已确认", "修复中", "已修复", "已验证", "无需处理"], Fr = ["待处理", "已确认", "修复中"];
|
|
1074
1074
|
function Bv(e) {
|
|
1075
|
-
return typeof e == "string" && jr.includes(e);
|
|
1076
|
-
}
|
|
1077
|
-
function jv(e) {
|
|
1078
1075
|
return typeof e == "string" && Ur.includes(e);
|
|
1079
1076
|
}
|
|
1080
1077
|
function Uv(e) {
|
|
1078
|
+
return typeof e == "string" && jr.includes(e);
|
|
1079
|
+
}
|
|
1080
|
+
function jv(e) {
|
|
1081
1081
|
return typeof e == "string" && Mr.includes(e);
|
|
1082
1082
|
}
|
|
1083
1083
|
function Mv(e) {
|
|
1084
|
-
return typeof e == "string" &&
|
|
1084
|
+
return typeof e == "string" && Vr.includes(e);
|
|
1085
1085
|
}
|
|
1086
1086
|
function Ja(e) {
|
|
1087
1087
|
return typeof e == "string" && Lr.includes(e);
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function Vv(e) {
|
|
1090
1090
|
if (!e || typeof e != "object") return null;
|
|
1091
1091
|
const n = e;
|
|
1092
1092
|
return typeof n.id != "string" || !n.id.trim() || typeof n.name != "string" || !n.name.trim() || typeof n.objectKey != "string" || !n.objectKey.trim() || typeof n.url != "string" || !n.url.trim() || typeof n.mimeType != "string" || !n.mimeType.startsWith("image/") || typeof n.uploaderName != "string" || !n.uploaderName.trim() ? null : {
|
|
@@ -1110,8 +1110,8 @@ function Lv(e) {
|
|
|
1110
1110
|
id: n.id,
|
|
1111
1111
|
title: n.title.trim(),
|
|
1112
1112
|
type: n.type,
|
|
1113
|
-
severity:
|
|
1114
|
-
sourceSide:
|
|
1113
|
+
severity: Uv(n.severity) ? n.severity : "P2",
|
|
1114
|
+
sourceSide: jv(n.sourceSide) ? n.sourceSide : "后端",
|
|
1115
1115
|
sourceSideVersion: typeof n.sourceSideVersion == "string" && n.sourceSideVersion.trim() ? n.sourceSideVersion.trim() : void 0,
|
|
1116
1116
|
ownerRole: n.ownerRole,
|
|
1117
1117
|
status: n.status,
|
|
@@ -1120,14 +1120,14 @@ function Lv(e) {
|
|
|
1120
1120
|
fixerName: typeof n.fixerName == "string" ? n.fixerName.trim() : void 0,
|
|
1121
1121
|
createdAt: o,
|
|
1122
1122
|
updatedAt: s,
|
|
1123
|
-
attachments: Array.isArray(n.attachments) ? n.attachments.map(
|
|
1123
|
+
attachments: Array.isArray(n.attachments) ? n.attachments.map(Vv).filter((r) => !!r) : [],
|
|
1124
1124
|
history: Array.isArray(n.history) ? n.history.filter((r) => r && typeof r == "object").map((r) => r).filter((r) => typeof r.id == "string" && Ja(r.fromStatus) && Ja(r.toStatus) && typeof r.operatorName == "string" && typeof r.createdAt == "string") : []
|
|
1125
1125
|
};
|
|
1126
1126
|
}
|
|
1127
1127
|
function wo(e) {
|
|
1128
1128
|
return Array.isArray(e) ? e.map(Lv).filter((n) => !!n).sort((n, o) => o.updatedAt.localeCompare(n.updatedAt)) : [];
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1130
|
+
function Fv(e, n = !0) {
|
|
1131
1131
|
if (!n) throw new Error("未启用 Gitee Bug 协作,无法导出远端最新数据");
|
|
1132
1132
|
if (!(e != null && e.exists)) throw new Error("Gitee Bug 文件不存在,无法导出远端最新数据");
|
|
1133
1133
|
const o = wo(e.value);
|
|
@@ -1146,22 +1146,22 @@ function Gv(e) {
|
|
|
1146
1146
|
const n = en("bugs");
|
|
1147
1147
|
tn("bugs", e, (n == null ? void 0 : n.revision) ?? null, (n == null ? void 0 : n.lastRemoteSyncAt) ?? null, "pending");
|
|
1148
1148
|
}
|
|
1149
|
-
function
|
|
1149
|
+
function Vt(e, n = "") {
|
|
1150
1150
|
Gr.value = e, wl.value = n;
|
|
1151
1151
|
}
|
|
1152
1152
|
async function zr() {
|
|
1153
1153
|
var e;
|
|
1154
1154
|
if (wr("bugs"), ns.value)
|
|
1155
1155
|
try {
|
|
1156
|
-
|
|
1156
|
+
Vt("loading", "正在同步 Gitee Bug 数据");
|
|
1157
1157
|
const n = await bl();
|
|
1158
|
-
Ot.value = wo((n == null ? void 0 : n.value) ?? []), tn("bugs", Ot.value, (n == null ? void 0 : n.sha) ?? null, (/* @__PURE__ */ new Date()).toISOString(), "synced"),
|
|
1158
|
+
Ot.value = wo((n == null ? void 0 : n.value) ?? []), tn("bugs", Ot.value, (n == null ? void 0 : n.sha) ?? null, (/* @__PURE__ */ new Date()).toISOString(), "synced"), Vt("success", "已同步 Gitee Bug 数据");
|
|
1159
1159
|
return;
|
|
1160
1160
|
} catch (n) {
|
|
1161
1161
|
const o = en("bugs");
|
|
1162
|
-
o && tn("bugs", o.value, o.revision, o.lastRemoteSyncAt, "stale", n instanceof Error ? n.message : "Gitee Bug 数据同步失败"),
|
|
1162
|
+
o && tn("bugs", o.value, o.revision, o.lastRemoteSyncAt, "stale", n instanceof Error ? n.message : "Gitee Bug 数据同步失败"), Vt("error", n instanceof Error ? n.message : "Gitee Bug 数据同步失败,已切换本地兜底");
|
|
1163
1163
|
}
|
|
1164
|
-
Ot.value = wo(((e = en("bugs")) == null ? void 0 : e.value) ?? []), wl.value ||
|
|
1164
|
+
Ot.value = wo(((e = en("bugs")) == null ? void 0 : e.value) ?? []), wl.value || Vt("idle", "当前使用本地 Bug 数据");
|
|
1165
1165
|
}
|
|
1166
1166
|
async function zv() {
|
|
1167
1167
|
if (!Xi) {
|
|
@@ -1169,7 +1169,7 @@ async function zv() {
|
|
|
1169
1169
|
try {
|
|
1170
1170
|
await zr();
|
|
1171
1171
|
} catch {
|
|
1172
|
-
Ot.value = [],
|
|
1172
|
+
Ot.value = [], Vt("error", "Bug 数据初始化失败");
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
@@ -1182,32 +1182,32 @@ async function Hv(e, n, o) {
|
|
|
1182
1182
|
};
|
|
1183
1183
|
if (ns.value)
|
|
1184
1184
|
try {
|
|
1185
|
-
|
|
1185
|
+
Vt("loading", "正在提交 Gitee Bug 数据");
|
|
1186
1186
|
const d = await Nv(e, n, s);
|
|
1187
|
-
return Ot.value = wo((d == null ? void 0 : d.value) ?? []), tn("bugs", Ot.value, (d == null ? void 0 : d.sha) ?? null, (/* @__PURE__ */ new Date()).toISOString(), "synced"),
|
|
1187
|
+
return Ot.value = wo((d == null ? void 0 : d.value) ?? []), tn("bugs", Ot.value, (d == null ? void 0 : d.sha) ?? null, (/* @__PURE__ */ new Date()).toISOString(), "synced"), Vt("success", "Bug 数据已提交"), !0;
|
|
1188
1188
|
} catch (d) {
|
|
1189
|
-
return
|
|
1189
|
+
return Vt(d instanceof Cn ? "conflict" : "error", d instanceof Error ? d.message : "Bug 数据提交失败"), !1;
|
|
1190
1190
|
}
|
|
1191
1191
|
try {
|
|
1192
|
-
return r(),
|
|
1192
|
+
return r(), Vt("success", "Bug 数据已保存到本地"), !0;
|
|
1193
1193
|
} catch (d) {
|
|
1194
|
-
return
|
|
1194
|
+
return Vt("error", d instanceof Error ? d.message : "Bug 数据保存失败"), !1;
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
1197
|
async function Kv() {
|
|
1198
1198
|
const e = ns.value ? await bl() : null;
|
|
1199
|
-
return
|
|
1199
|
+
return Fv(e, ns.value);
|
|
1200
1200
|
}
|
|
1201
|
-
const Jv = x(() => Ot.value.filter((e) =>
|
|
1201
|
+
const Jv = x(() => Ot.value.filter((e) => Fr.includes(e.status)).length);
|
|
1202
1202
|
function Hr() {
|
|
1203
1203
|
return {
|
|
1204
1204
|
bugs: Ot,
|
|
1205
|
-
bugTypes:
|
|
1206
|
-
bugSeverities:
|
|
1205
|
+
bugTypes: Ur,
|
|
1206
|
+
bugSeverities: jr,
|
|
1207
1207
|
bugSourceSides: Mr,
|
|
1208
|
-
bugOwnerRoles:
|
|
1208
|
+
bugOwnerRoles: Vr,
|
|
1209
1209
|
bugStatuses: Lr,
|
|
1210
|
-
unresolvedBugStatuses:
|
|
1210
|
+
unresolvedBugStatuses: Fr,
|
|
1211
1211
|
unresolvedBugCount: Jv,
|
|
1212
1212
|
bugRemoteReady: ns,
|
|
1213
1213
|
bugSyncStatus: Gr,
|
|
@@ -1437,10 +1437,10 @@ async function gf(e, n = {}) {
|
|
|
1437
1437
|
ff()
|
|
1438
1438
|
), { bugCount: e.length, attachmentCount: s, thumbnailFailureCount: r };
|
|
1439
1439
|
}
|
|
1440
|
-
const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class: "bug-head-actions" }, wf = ["disabled"], Sf = { class: "bug-refresh-main" }, Cf = ["disabled"], kf = { class: "bug-refresh-main" }, xf = { class: "bug-stat-grid" }, If = { class: "bug-stat-card danger" }, $f = { class: "bug-stat-card success" }, _f = { class: "bug-stat-card muted" }, Pf = { class: "bug-workspace" }, Df = { id: "bug-source-side-version-options" }, Af = ["value"], Ef = { class: "bug-section-title" }, Tf = { class: "bug-form-row" }, Nf = ["value"], Rf = ["value"], Of = ["value"], Bf = ["value"],
|
|
1440
|
+
const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class: "bug-head-actions" }, wf = ["disabled"], Sf = { class: "bug-refresh-main" }, Cf = ["disabled"], kf = { class: "bug-refresh-main" }, xf = { class: "bug-stat-grid" }, If = { class: "bug-stat-card danger" }, $f = { class: "bug-stat-card success" }, _f = { class: "bug-stat-card muted" }, Pf = { class: "bug-workspace" }, Df = { id: "bug-source-side-version-options" }, Af = ["value"], Ef = { class: "bug-section-title" }, Tf = { class: "bug-form-row" }, Nf = ["value"], Rf = ["value"], Of = ["value"], Bf = ["value"], Uf = { class: "bug-image-uploader" }, jf = { class: "bug-section-title" }, Mf = ["disabled"], Vf = {
|
|
1441
1441
|
key: 0,
|
|
1442
1442
|
class: "bug-pending-images"
|
|
1443
|
-
}, Lf = ["src", "alt"],
|
|
1443
|
+
}, Lf = ["src", "alt"], Ff = { key: 0 }, Gf = ["disabled", "onClick"], zf = {
|
|
1444
1444
|
key: 1,
|
|
1445
1445
|
class: "bug-form-error"
|
|
1446
1446
|
}, Hf = {
|
|
@@ -1467,7 +1467,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1467
1467
|
}, Em = ["disabled"], Tm = {
|
|
1468
1468
|
key: 0,
|
|
1469
1469
|
class: "bug-id-warning"
|
|
1470
|
-
}, Nm = ["disabled"], Rm = { class: "bug-form-row" }, Om = ["disabled"], Bm = ["value"],
|
|
1470
|
+
}, Nm = ["disabled"], Rm = { class: "bug-form-row" }, Om = ["disabled"], Bm = ["value"], Um = ["disabled"], jm = ["value"], Mm = ["disabled"], Vm = ["value"], Lm = ["disabled"], Fm = ["disabled"], Gm = ["value"], zm = ["disabled"], Hm = { class: "bug-edit-images" }, Km = { class: "bug-section-title" }, Jm = ["disabled"], Wm = {
|
|
1471
1471
|
key: 0,
|
|
1472
1472
|
class: "bug-edit-existing-images"
|
|
1473
1473
|
}, Ym = ["onClick"], Xm = ["src", "alt"], qm = ["disabled", "onClick"], Zm = {
|
|
@@ -1531,7 +1531,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1531
1531
|
P2: 2,
|
|
1532
1532
|
P3: 3,
|
|
1533
1533
|
P4: 4
|
|
1534
|
-
},
|
|
1534
|
+
}, je = [
|
|
1535
1535
|
{ value: "createdDesc", label: "创建时间 新→旧" },
|
|
1536
1536
|
{ value: "createdAsc", label: "创建时间 旧→新" },
|
|
1537
1537
|
{ value: "updatedDesc", label: "更新时间 新→旧" },
|
|
@@ -1564,7 +1564,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1564
1564
|
sourceSideVersion: "",
|
|
1565
1565
|
ownerRole: "后端开发",
|
|
1566
1566
|
description: ""
|
|
1567
|
-
}), ge = w(
|
|
1567
|
+
}), ge = w(le()), Me = w([]), Qe = w(""), Ke = w(null), L = yo({
|
|
1568
1568
|
type: "全部",
|
|
1569
1569
|
severity: "全部",
|
|
1570
1570
|
sourceSide: "全部",
|
|
@@ -1587,10 +1587,10 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1587
1587
|
ownerRole: "后端开发",
|
|
1588
1588
|
description: ""
|
|
1589
1589
|
}), de = w([]), kt = w(null), k = w([]), $ = w(""), se = w(!1), Re = w(""), st = w("success"), Pe = w(null), At = Zv();
|
|
1590
|
-
function
|
|
1590
|
+
function U(y) {
|
|
1591
1591
|
y.key !== "Escape" || !Pe.value || (y.preventDefault(), y.stopPropagation(), Pe.value = null);
|
|
1592
1592
|
}
|
|
1593
|
-
function
|
|
1593
|
+
function le() {
|
|
1594
1594
|
var y;
|
|
1595
1595
|
return ((y = crypto.randomUUID) == null ? void 0 : y.call(crypto)) ?? `submission-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
1596
1596
|
}
|
|
@@ -1601,7 +1601,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1601
1601
|
"bug-submit-draft"
|
|
1602
1602
|
);
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function jt(y) {
|
|
1605
1605
|
if (!y || typeof y != "object") return !1;
|
|
1606
1606
|
const p = y;
|
|
1607
1607
|
return typeof p.id == "string" && typeof p.name == "string" && typeof p.objectKey == "string" && typeof p.url == "string" && typeof p.mimeType == "string" && typeof p.size == "number" && typeof p.originalSize == "number" && typeof p.uploaderName == "string" && typeof p.createdAt == "string";
|
|
@@ -1613,7 +1613,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1613
1613
|
version: Wa,
|
|
1614
1614
|
submissionId: y.submissionId,
|
|
1615
1615
|
form: { ...p },
|
|
1616
|
-
attachments: Array.isArray(y.attachments) ? y.attachments.filter(
|
|
1616
|
+
attachments: Array.isArray(y.attachments) ? y.attachments.filter(jt) : [],
|
|
1617
1617
|
updatedAt: typeof y.updatedAt == "string" ? y.updatedAt : ""
|
|
1618
1618
|
};
|
|
1619
1619
|
} catch {
|
|
@@ -1645,7 +1645,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1645
1645
|
window.localStorage.removeItem(Ce());
|
|
1646
1646
|
} catch {
|
|
1647
1647
|
}
|
|
1648
|
-
Me.value = [], ge.value =
|
|
1648
|
+
Me.value = [], ge.value = le();
|
|
1649
1649
|
}
|
|
1650
1650
|
const K = yt();
|
|
1651
1651
|
K && (Object.assign(A, K.form), ge.value = K.submissionId, Me.value = K.attachments, k.value = K.attachments.map((y) => ({
|
|
@@ -1663,8 +1663,8 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1663
1663
|
return y.id === p.id && y.createdAt === p.createdAt && y.title === p.title && y.reporterName === p.reporterName;
|
|
1664
1664
|
}
|
|
1665
1665
|
function T(y, p = s.value) {
|
|
1666
|
-
const
|
|
1667
|
-
return { ...
|
|
1666
|
+
const F = { id: y.id, createdAt: y.createdAt, title: y.title, reporterName: y.reporterName }, m = p.filter((J) => be(J, F));
|
|
1667
|
+
return { ...F, occurrence: Math.max(0, m.indexOf(y)) };
|
|
1668
1668
|
}
|
|
1669
1669
|
function q(y, p) {
|
|
1670
1670
|
var m;
|
|
@@ -1680,15 +1680,15 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1680
1680
|
}), Xe = x(() => {
|
|
1681
1681
|
const y = W.value;
|
|
1682
1682
|
return !!(y && s.value.filter((p) => na(p.id) === na(y.id)).length > 1);
|
|
1683
|
-
}), Oe = x(() => !!(W.value && !["已验证", "无需处理"].includes(W.value.status))), Et = x(() => Oe.value || Xe.value),
|
|
1683
|
+
}), Oe = x(() => !!(W.value && !["已验证", "无需处理"].includes(W.value.status))), Et = x(() => Oe.value || Xe.value), Ve = x(() => s.value.filter((y) => y.status === "已修复" || y.status === "已验证").length), ba = x(() => s.value.filter((y) => y.status === "无需处理").length), gs = x(
|
|
1684
1684
|
() => Array.from(new Set(s.value.map((y) => {
|
|
1685
1685
|
var p;
|
|
1686
1686
|
return (p = y.sourceSideVersion) == null ? void 0 : p.trim();
|
|
1687
1687
|
}).filter((y) => !!y))).sort((y, p) => y.localeCompare(p))
|
|
1688
1688
|
), Jn = x(() => {
|
|
1689
1689
|
const y = L.keyword.trim().toLowerCase();
|
|
1690
|
-
return s.value.filter((p) => L.type !== "全部" && p.type !== L.type || L.severity !== "全部" && p.severity !== L.severity || L.sourceSide !== "全部" && p.sourceSide !== L.sourceSide || L.sourceSideVersion !== "全部" && p.sourceSideVersion !== L.sourceSideVersion || L.ownerRole !== "全部" && p.ownerRole !== L.ownerRole || L.status === "未修复" && !I.includes(p.status) || L.status !== "全部" && L.status !== "未修复" && p.status !== L.status ? !1 : y ? [p.id, p.title, p.description, p.reporterName, p.fixerName, p.type, p.severity, p.sourceSide, p.sourceSideVersion, p.ownerRole, p.status].filter(Boolean).some((
|
|
1691
|
-
}), bt = x(() => [...Jn.value].sort((p,
|
|
1690
|
+
return s.value.filter((p) => L.type !== "全部" && p.type !== L.type || L.severity !== "全部" && p.severity !== L.severity || L.sourceSide !== "全部" && p.sourceSide !== L.sourceSide || L.sourceSideVersion !== "全部" && p.sourceSideVersion !== L.sourceSideVersion || L.ownerRole !== "全部" && p.ownerRole !== L.ownerRole || L.status === "未修复" && !I.includes(p.status) || L.status !== "全部" && L.status !== "未修复" && p.status !== L.status ? !1 : y ? [p.id, p.title, p.description, p.reporterName, p.fixerName, p.type, p.severity, p.sourceSide, p.sourceSideVersion, p.ownerRole, p.status].filter(Boolean).some((F) => String(F).toLowerCase().includes(y)) : !0);
|
|
1691
|
+
}), bt = x(() => [...Jn.value].sort((p, F) => ct.value === "createdAsc" ? new Date(p.createdAt).getTime() - new Date(F.createdAt).getTime() : ct.value === "updatedDesc" ? new Date(F.updatedAt).getTime() - new Date(p.updatedAt).getTime() : ct.value === "updatedAsc" ? new Date(p.updatedAt).getTime() - new Date(F.updatedAt).getTime() : ct.value === "severityAsc" ? $e[p.severity] - $e[F.severity] || new Date(F.createdAt).getTime() - new Date(p.createdAt).getTime() : ct.value === "severityDesc" ? $e[F.severity] - $e[p.severity] || new Date(F.createdAt).getTime() - new Date(p.createdAt).getTime() : new Date(F.createdAt).getTime() - new Date(p.createdAt).getTime())), xn = x(() => Math.max(1, Math.ceil(bt.value.length / Se.value))), M = x(() => bt.value.slice((he.value - 1) * Se.value, he.value * Se.value)), Wn = x(() => bt.value.length ? (he.value - 1) * Se.value + 1 : 0), hs = x(() => Math.min(he.value * Se.value, bt.value.length));
|
|
1692
1692
|
ze(
|
|
1693
1693
|
() => [L.type, L.severity, L.sourceSide, L.sourceSideVersion, L.ownerRole, L.status, L.keyword, ct.value, Se.value],
|
|
1694
1694
|
() => {
|
|
@@ -1712,13 +1712,13 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1712
1712
|
return p ? p[1].toLowerCase() : y.mimeType === "image/jpeg" ? "jpg" : y.mimeType === "image/png" ? "png" : y.mimeType === "image/webp" ? "webp" : "png";
|
|
1713
1713
|
}
|
|
1714
1714
|
function ys(y, p) {
|
|
1715
|
-
const
|
|
1716
|
-
return `bugs/${y}/${
|
|
1715
|
+
const F = (/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 14);
|
|
1716
|
+
return `bugs/${y}/${F}-${p.id}-${wa(p.name)}.${Sa(p)}`;
|
|
1717
1717
|
}
|
|
1718
1718
|
async function bs(y) {
|
|
1719
1719
|
if (!["image/png", "image/jpeg", "image/jpg", "image/webp"].includes(y.type)) throw new Error("仅支持 png、jpg、jpeg、webp 图片");
|
|
1720
1720
|
return {
|
|
1721
|
-
id: `pending-image-${
|
|
1721
|
+
id: `pending-image-${le()}`,
|
|
1722
1722
|
name: y.name || `clipboard-${Date.now()}.png`,
|
|
1723
1723
|
file: y,
|
|
1724
1724
|
previewUrl: URL.createObjectURL(y),
|
|
@@ -1732,7 +1732,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1732
1732
|
$.value = "";
|
|
1733
1733
|
const p = y.filter((J) => J.type.startsWith("image/"));
|
|
1734
1734
|
if (!p.length) return;
|
|
1735
|
-
const
|
|
1735
|
+
const F = et.value ? de.value.length : 0, m = Xo - k.value.length - F;
|
|
1736
1736
|
if (m <= 0) {
|
|
1737
1737
|
$.value = `每个 Bug 最多上传 ${Xo} 张图片`;
|
|
1738
1738
|
return;
|
|
@@ -1750,16 +1750,16 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1750
1750
|
Po(Array.from(p.files ?? [])), p.value = "";
|
|
1751
1751
|
}
|
|
1752
1752
|
function Do(y) {
|
|
1753
|
-
var
|
|
1754
|
-
const p = Array.from(((
|
|
1753
|
+
var F;
|
|
1754
|
+
const p = Array.from(((F = y.clipboardData) == null ? void 0 : F.items) ?? []).filter((m) => m.kind === "file" && m.type.startsWith("image/")).map((m) => m.getAsFile()).filter((m) => !!m);
|
|
1755
1755
|
p.length && (y.preventDefault(), Po(p));
|
|
1756
1756
|
}
|
|
1757
1757
|
function Ss(y) {
|
|
1758
|
-
const p = k.value.find((
|
|
1759
|
-
p && URL.revokeObjectURL(p.previewUrl), p != null && p.uploadedAttachment && !et.value && (Me.value = Me.value.filter((
|
|
1758
|
+
const p = k.value.find((F) => F.id === y);
|
|
1759
|
+
p && URL.revokeObjectURL(p.previewUrl), p != null && p.uploadedAttachment && !et.value && (Me.value = Me.value.filter((F) => {
|
|
1760
1760
|
var m;
|
|
1761
|
-
return
|
|
1762
|
-
})), k.value = k.value.filter((
|
|
1761
|
+
return F.id !== ((m = p.uploadedAttachment) == null ? void 0 : m.id);
|
|
1762
|
+
})), k.value = k.value.filter((F) => F.id !== y);
|
|
1763
1763
|
}
|
|
1764
1764
|
function Ca(y) {
|
|
1765
1765
|
de.value = de.value.filter((p) => p.id !== y);
|
|
@@ -1767,10 +1767,10 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1767
1767
|
async function Xn(y, p) {
|
|
1768
1768
|
if (!k.value.length) return [];
|
|
1769
1769
|
if (!At) throw new Error("缺少 OSS 上传配置,无法上传图片");
|
|
1770
|
-
const
|
|
1770
|
+
const F = [];
|
|
1771
1771
|
for (const m of k.value) {
|
|
1772
1772
|
if (m.uploadedAttachment) {
|
|
1773
|
-
|
|
1773
|
+
F.push(m.uploadedAttachment);
|
|
1774
1774
|
continue;
|
|
1775
1775
|
}
|
|
1776
1776
|
m.status = "uploading", m.error = "";
|
|
@@ -1786,20 +1786,20 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1786
1786
|
originalSize: m.originalSize,
|
|
1787
1787
|
uploaderName: p,
|
|
1788
1788
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1789
|
-
},
|
|
1789
|
+
}, F.push(m.uploadedAttachment);
|
|
1790
1790
|
} catch (J) {
|
|
1791
1791
|
throw m.status = "error", m.error = J instanceof Error ? J.message : "上传失败", J;
|
|
1792
1792
|
}
|
|
1793
1793
|
}
|
|
1794
|
-
return
|
|
1794
|
+
return F;
|
|
1795
1795
|
}
|
|
1796
1796
|
function xt() {
|
|
1797
1797
|
k.value.forEach((y) => URL.revokeObjectURL(y.previewUrl)), k.value = [];
|
|
1798
1798
|
}
|
|
1799
1799
|
async function ka() {
|
|
1800
1800
|
Qe.value = "", $.value = "";
|
|
1801
|
-
const y = A.reporterName.trim(), p = A.title.trim(),
|
|
1802
|
-
if (!y || !p || !
|
|
1801
|
+
const y = A.reporterName.trim(), p = A.title.trim(), F = A.description.trim(), m = A.sourceSideVersion.trim();
|
|
1802
|
+
if (!y || !p || !F) {
|
|
1803
1803
|
Qe.value = "请填写提报人姓名、标题和问题描述";
|
|
1804
1804
|
return;
|
|
1805
1805
|
}
|
|
@@ -1824,7 +1824,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1824
1824
|
sourceSideVersion: m || void 0,
|
|
1825
1825
|
ownerRole: A.ownerRole,
|
|
1826
1826
|
status: "待处理",
|
|
1827
|
-
description:
|
|
1827
|
+
description: F,
|
|
1828
1828
|
reporterName: y,
|
|
1829
1829
|
createdAt: It,
|
|
1830
1830
|
updatedAt: It,
|
|
@@ -1839,9 +1839,9 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1839
1839
|
xt(), P(), _e(y), A.reporterName = y, A.title = "", A.sourceSideVersion = m, A.description = "", Ke.value = Ee;
|
|
1840
1840
|
}
|
|
1841
1841
|
us(() => {
|
|
1842
|
-
window.removeEventListener("keydown",
|
|
1842
|
+
window.removeEventListener("keydown", U, !0), _(), xt();
|
|
1843
1843
|
}), ml(() => {
|
|
1844
|
-
window.addEventListener("keydown",
|
|
1844
|
+
window.addEventListener("keydown", U, !0);
|
|
1845
1845
|
});
|
|
1846
1846
|
function Cs(y) {
|
|
1847
1847
|
const p = ue();
|
|
@@ -1870,7 +1870,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1870
1870
|
Ne.value = "密钥不正确";
|
|
1871
1871
|
return;
|
|
1872
1872
|
}
|
|
1873
|
-
const
|
|
1873
|
+
const F = ce.operatorName.trim() || ue() || "管理员", m = await B(F, `删除 Bug ${y.id}`, (J) => {
|
|
1874
1874
|
const Ee = q(J, p);
|
|
1875
1875
|
if (Ee < 0) throw new Error("目标 Bug 已变化,请刷新后重试");
|
|
1876
1876
|
return J.filter((un, qe) => qe !== Ee);
|
|
@@ -1880,8 +1880,8 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1880
1880
|
async function Is() {
|
|
1881
1881
|
const y = W.value, p = Ke.value;
|
|
1882
1882
|
if (!y || !p || !Et.value) return;
|
|
1883
|
-
const
|
|
1884
|
-
if (!
|
|
1883
|
+
const F = X.id.trim(), m = X.title.trim(), J = X.description.trim(), Ee = X.sourceSideVersion.trim(), un = ce.operatorName.trim() || ue() || y.reporterName;
|
|
1884
|
+
if (!F || !m || !J) {
|
|
1885
1885
|
te.value = "请填写 Bug ID、标题和问题描述";
|
|
1886
1886
|
return;
|
|
1887
1887
|
}
|
|
@@ -1897,11 +1897,11 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1897
1897
|
if (!await B(un, "编辑 Bug 内容", (dt) => {
|
|
1898
1898
|
const Zn = q(dt, p);
|
|
1899
1899
|
if (Zn < 0) throw new Error("目标 Bug 已变化,请刷新后重试");
|
|
1900
|
-
if (Ov(dt,
|
|
1900
|
+
if (Ov(dt, F, Zn)) throw new Error(`Bug ID ${F} 已存在,请改为唯一 ID`);
|
|
1901
1901
|
return dt.map(
|
|
1902
1902
|
($t, Ds) => Ds === Zn ? {
|
|
1903
1903
|
...$t,
|
|
1904
|
-
id:
|
|
1904
|
+
id: F,
|
|
1905
1905
|
title: Oe.value ? m : $t.title,
|
|
1906
1906
|
type: Oe.value ? X.type : $t.type,
|
|
1907
1907
|
severity: Oe.value ? X.severity : $t.severity,
|
|
@@ -1923,8 +1923,8 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1923
1923
|
Je.value = "";
|
|
1924
1924
|
const y = W.value, p = Ke.value;
|
|
1925
1925
|
if (!y || !p) return;
|
|
1926
|
-
const
|
|
1927
|
-
if (!
|
|
1926
|
+
const F = ce.operatorName.trim(), m = ce.fixerName.trim();
|
|
1927
|
+
if (!F) {
|
|
1928
1928
|
Je.value = "请填写操作人姓名";
|
|
1929
1929
|
return;
|
|
1930
1930
|
}
|
|
@@ -1936,12 +1936,12 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1936
1936
|
id: `bug-history-${Date.now()}-${Math.random().toString(16).slice(2)}`,
|
|
1937
1937
|
fromStatus: y.status,
|
|
1938
1938
|
toStatus: ce.status,
|
|
1939
|
-
operatorName:
|
|
1939
|
+
operatorName: F,
|
|
1940
1940
|
fixerName: m || void 0,
|
|
1941
1941
|
note: ce.note.trim() || void 0,
|
|
1942
1942
|
createdAt: J
|
|
1943
1943
|
};
|
|
1944
|
-
if (!await B(
|
|
1944
|
+
if (!await B(F, "变更 Bug 状态", (qe) => {
|
|
1945
1945
|
const It = q(qe, p);
|
|
1946
1946
|
if (It < 0) throw new Error("目标 Bug 已变化,请刷新后重试");
|
|
1947
1947
|
return qe.map(
|
|
@@ -1971,7 +1971,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1971
1971
|
}
|
|
1972
1972
|
}
|
|
1973
1973
|
return (y, p) => {
|
|
1974
|
-
var
|
|
1974
|
+
var F;
|
|
1975
1975
|
return v(), f("main", hf, [
|
|
1976
1976
|
t("header", yf, [
|
|
1977
1977
|
t("div", null, [
|
|
@@ -1992,7 +1992,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
1992
1992
|
(...m) => i(ae) && i(ae)(...m))
|
|
1993
1993
|
}, [
|
|
1994
1994
|
t("span", Sf, [
|
|
1995
|
-
|
|
1995
|
+
V(i(rr), { class: "h-4 w-4" }),
|
|
1996
1996
|
p[42] || (p[42] = t("span", null, "刷新", -1))
|
|
1997
1997
|
]),
|
|
1998
1998
|
t("span", {
|
|
@@ -2006,7 +2006,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2006
2006
|
onClick: Eo
|
|
2007
2007
|
}, [
|
|
2008
2008
|
t("span", kf, [
|
|
2009
|
-
|
|
2009
|
+
V(i(ur), { class: "h-4 w-4" }),
|
|
2010
2010
|
t("span", null, c(se.value ? "导出中" : "导出 Excel"), 1)
|
|
2011
2011
|
]),
|
|
2012
2012
|
t("span", {
|
|
@@ -2017,24 +2017,24 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2017
2017
|
]),
|
|
2018
2018
|
t("section", xf, [
|
|
2019
2019
|
t("article", If, [
|
|
2020
|
-
|
|
2020
|
+
V(i(Ed), { class: "h-5 w-5" }),
|
|
2021
2021
|
p[43] || (p[43] = t("span", null, "未修复", -1)),
|
|
2022
2022
|
t("strong", null, c(i(ee)), 1)
|
|
2023
2023
|
]),
|
|
2024
2024
|
t("article", $f, [
|
|
2025
|
-
|
|
2025
|
+
V(i(Td), { class: "h-5 w-5" }),
|
|
2026
2026
|
p[44] || (p[44] = t("span", null, "已修复/验证", -1)),
|
|
2027
|
-
t("strong", null, c(
|
|
2027
|
+
t("strong", null, c(Ve.value), 1)
|
|
2028
2028
|
]),
|
|
2029
2029
|
t("article", _f, [
|
|
2030
|
-
|
|
2030
|
+
V(i(Mi), { class: "h-5 w-5" }),
|
|
2031
2031
|
p[45] || (p[45] = t("span", null, "无需处理", -1)),
|
|
2032
2032
|
t("strong", null, c(ba.value), 1)
|
|
2033
2033
|
]),
|
|
2034
2034
|
t("article", {
|
|
2035
2035
|
class: E(["bug-stat-card sync", `is-${i(oe)}`])
|
|
2036
2036
|
}, [
|
|
2037
|
-
|
|
2037
|
+
V(i(Nd), { class: "h-5 w-5" }),
|
|
2038
2038
|
t("span", null, c(i(me) ? "Gitee 同步" : "本地兜底"), 1),
|
|
2039
2039
|
t("strong", null, c(i(oe) === "loading" ? "同步中" : i(s).length), 1)
|
|
2040
2040
|
], 2)
|
|
@@ -2052,7 +2052,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2052
2052
|
}, null, 8, Af))), 128))
|
|
2053
2053
|
]),
|
|
2054
2054
|
t("div", Ef, [
|
|
2055
|
-
|
|
2055
|
+
V(i(Bn), { class: "h-4 w-4" }),
|
|
2056
2056
|
p[46] || (p[46] = t("span", null, "提报 Bug", -1))
|
|
2057
2057
|
]),
|
|
2058
2058
|
t("label", null, [
|
|
@@ -2149,9 +2149,9 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2149
2149
|
[G, A.description]
|
|
2150
2150
|
])
|
|
2151
2151
|
]),
|
|
2152
|
-
t("section",
|
|
2153
|
-
t("div",
|
|
2154
|
-
|
|
2152
|
+
t("section", Uf, [
|
|
2153
|
+
t("div", jf, [
|
|
2154
|
+
V(i(Vi), { class: "h-4 w-4" }),
|
|
2155
2155
|
p[55] || (p[55] = t("span", null, "问题截图", -1))
|
|
2156
2156
|
]),
|
|
2157
2157
|
t("button", {
|
|
@@ -2173,7 +2173,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2173
2173
|
onChange: ws
|
|
2174
2174
|
}, null, 544),
|
|
2175
2175
|
p[56] || (p[56] = t("p", { class: "bug-image-hint" }, "支持 png、jpg、webp;最多 10 张;图片将按原文件直接上传 OSS。", -1)),
|
|
2176
|
-
k.value.length ? (v(), f("div",
|
|
2176
|
+
k.value.length ? (v(), f("div", Vf, [
|
|
2177
2177
|
(v(!0), f(D, null, R(k.value, (m) => (v(), f("article", {
|
|
2178
2178
|
key: m.id,
|
|
2179
2179
|
class: E(`is-${m.status}`)
|
|
@@ -2190,14 +2190,14 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2190
2190
|
z(" / 原图 " + c(In(m.originalSize)), 1)
|
|
2191
2191
|
], 64)) : C("", !0)
|
|
2192
2192
|
]),
|
|
2193
|
-
m.error ? (v(), f("small",
|
|
2193
|
+
m.error ? (v(), f("small", Ff, c(m.error), 1)) : C("", !0)
|
|
2194
2194
|
]),
|
|
2195
2195
|
t("button", {
|
|
2196
2196
|
type: "button",
|
|
2197
2197
|
disabled: m.status === "uploading",
|
|
2198
2198
|
onClick: (J) => Ss(m.id)
|
|
2199
2199
|
}, [
|
|
2200
|
-
|
|
2200
|
+
V(i(Un), { class: "h-4 w-4" })
|
|
2201
2201
|
], 8, Gf)
|
|
2202
2202
|
], 2))), 128))
|
|
2203
2203
|
])) : C("", !0),
|
|
@@ -2213,7 +2213,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2213
2213
|
t("section", Jf, [
|
|
2214
2214
|
t("div", Wf, [
|
|
2215
2215
|
t("div", Yf, [
|
|
2216
|
-
|
|
2216
|
+
V(i(Rd), { class: "h-4 w-4" }),
|
|
2217
2217
|
p[57] || (p[57] = t("span", null, "筛选", -1))
|
|
2218
2218
|
]),
|
|
2219
2219
|
t("div", Xf, [
|
|
@@ -2285,7 +2285,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2285
2285
|
[lt, L.sourceSideVersion]
|
|
2286
2286
|
]),
|
|
2287
2287
|
t("label", om, [
|
|
2288
|
-
|
|
2288
|
+
V(i(sl), { class: "h-4 w-4" }),
|
|
2289
2289
|
N(t("input", {
|
|
2290
2290
|
"onUpdate:modelValue": p[17] || (p[17] = (m) => L.keyword = m),
|
|
2291
2291
|
type: "search",
|
|
@@ -2301,7 +2301,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2301
2301
|
N(t("select", {
|
|
2302
2302
|
"onUpdate:modelValue": p[18] || (p[18] = (m) => ct.value = m)
|
|
2303
2303
|
}, [
|
|
2304
|
-
(v(), f(D, null, R(
|
|
2304
|
+
(v(), f(D, null, R(je, (m) => t("option", {
|
|
2305
2305
|
key: m.value,
|
|
2306
2306
|
value: m.value
|
|
2307
2307
|
}, c(m.label), 9, am)), 64))
|
|
@@ -2427,7 +2427,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2427
2427
|
"aria-label": "关闭详情",
|
|
2428
2428
|
onClick: qn
|
|
2429
2429
|
}, [
|
|
2430
|
-
|
|
2430
|
+
V(i(hn), { class: "h-5 w-5" })
|
|
2431
2431
|
])
|
|
2432
2432
|
]),
|
|
2433
2433
|
t("div", $m, [
|
|
@@ -2457,7 +2457,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2457
2457
|
type: "button",
|
|
2458
2458
|
onClick: xa
|
|
2459
2459
|
}, [
|
|
2460
|
-
|
|
2460
|
+
V(i(Un), { class: "h-4 w-4" }),
|
|
2461
2461
|
p[67] || (p[67] = z(" 删除 Bug ", -1))
|
|
2462
2462
|
]))
|
|
2463
2463
|
]),
|
|
@@ -2544,8 +2544,8 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2544
2544
|
(v(!0), f(D, null, R(i(d), (m) => (v(), f("option", {
|
|
2545
2545
|
key: m,
|
|
2546
2546
|
value: m
|
|
2547
|
-
}, c(m), 9,
|
|
2548
|
-
], 8,
|
|
2547
|
+
}, c(m), 9, jm))), 128))
|
|
2548
|
+
], 8, Um), [
|
|
2549
2549
|
[lt, X.severity]
|
|
2550
2550
|
])
|
|
2551
2551
|
]),
|
|
@@ -2558,7 +2558,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2558
2558
|
(v(!0), f(D, null, R(i(g), (m) => (v(), f("option", {
|
|
2559
2559
|
key: m,
|
|
2560
2560
|
value: m
|
|
2561
|
-
}, c(m), 9,
|
|
2561
|
+
}, c(m), 9, Vm))), 128))
|
|
2562
2562
|
], 8, Mm), [
|
|
2563
2563
|
[lt, X.sourceSide]
|
|
2564
2564
|
])
|
|
@@ -2585,7 +2585,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2585
2585
|
key: m,
|
|
2586
2586
|
value: m
|
|
2587
2587
|
}, c(m), 9, Gm))), 128))
|
|
2588
|
-
], 8,
|
|
2588
|
+
], 8, Fm), [
|
|
2589
2589
|
[lt, X.ownerRole]
|
|
2590
2590
|
])
|
|
2591
2591
|
])
|
|
@@ -2601,7 +2601,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2601
2601
|
]),
|
|
2602
2602
|
t("section", Hm, [
|
|
2603
2603
|
t("div", Km, [
|
|
2604
|
-
|
|
2604
|
+
V(i(Vi), { class: "h-4 w-4" }),
|
|
2605
2605
|
p[78] || (p[78] = t("span", null, "问题截图", -1))
|
|
2606
2606
|
]),
|
|
2607
2607
|
t("button", {
|
|
@@ -2638,7 +2638,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2638
2638
|
disabled: !Oe.value,
|
|
2639
2639
|
onClick: (J) => Ca(m.id)
|
|
2640
2640
|
}, [
|
|
2641
|
-
|
|
2641
|
+
V(i(Un), { class: "h-4 w-4" })
|
|
2642
2642
|
], 8, qm)
|
|
2643
2643
|
]))), 128))
|
|
2644
2644
|
])) : C("", !0),
|
|
@@ -2661,7 +2661,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2661
2661
|
disabled: m.status === "uploading",
|
|
2662
2662
|
onClick: (J) => Ss(m.id)
|
|
2663
2663
|
}, [
|
|
2664
|
-
|
|
2664
|
+
V(i(Un), { class: "h-4 w-4" })
|
|
2665
2665
|
], 8, tg)
|
|
2666
2666
|
], 2))), 128))
|
|
2667
2667
|
])) : C("", !0),
|
|
@@ -2680,7 +2680,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2680
2680
|
])
|
|
2681
2681
|
], 32)) : (v(), f("p", lg, c(W.value.description), 1)),
|
|
2682
2682
|
t("p", ig, "提报人:" + c(W.value.reporterName) + " · " + c(Yn(W.value.createdAt)), 1),
|
|
2683
|
-
!et.value && ((
|
|
2683
|
+
!et.value && ((F = W.value.attachments) != null && F.length) ? (v(), f("section", rg, [
|
|
2684
2684
|
p[79] || (p[79] = t("h3", null, "问题截图", -1)),
|
|
2685
2685
|
t("div", null, [
|
|
2686
2686
|
(v(!0), f(D, null, R(W.value.attachments, (m) => (v(), f("button", {
|
|
@@ -2702,7 +2702,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2702
2702
|
onSubmit: Ie($s, ["prevent"])
|
|
2703
2703
|
}, [
|
|
2704
2704
|
t("div", dg, [
|
|
2705
|
-
|
|
2705
|
+
V(i(Mi), { class: "h-4 w-4" }),
|
|
2706
2706
|
p[80] || (p[80] = t("span", null, "状态变更", -1))
|
|
2707
2707
|
]),
|
|
2708
2708
|
t("label", null, [
|
|
@@ -2783,7 +2783,7 @@ const hf = { class: "bug-page" }, yf = { class: "bug-page-head" }, bf = { class:
|
|
|
2783
2783
|
"aria-label": "关闭图片预览",
|
|
2784
2784
|
onClick: p[38] || (p[38] = (m) => Pe.value = null)
|
|
2785
2785
|
}, [
|
|
2786
|
-
|
|
2786
|
+
V(i(hn), { class: "h-5 w-5" })
|
|
2787
2787
|
])
|
|
2788
2788
|
]),
|
|
2789
2789
|
t("img", {
|
|
@@ -3027,9 +3027,9 @@ async function Ag(e, n) {
|
|
|
3027
3027
|
const s = await (await Dg(e, n)).xlsx.writeBuffer();
|
|
3028
3028
|
Wr(new Blob([s], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), "test-cases.xlsx");
|
|
3029
3029
|
}
|
|
3030
|
-
const on = w([]), Lt = w(null), ko = w(""), os = w(!1), Yr = w(!1),
|
|
3030
|
+
const on = w([]), Lt = w(null), ko = w(""), os = w(!1), Yr = w(!1), Vn = w({ source: "local-seed", status: "idle" }), mn = ca(), Ut = We();
|
|
3031
3031
|
function gt(e, n, o = "", s) {
|
|
3032
|
-
|
|
3032
|
+
Vn.value = { source: e, status: n, ...o ? { message: o } : {}, ...s ? { syncedAt: s } : {} };
|
|
3033
3033
|
}
|
|
3034
3034
|
async function Eg() {
|
|
3035
3035
|
try {
|
|
@@ -3046,7 +3046,7 @@ function ss(e, n) {
|
|
|
3046
3046
|
];
|
|
3047
3047
|
}
|
|
3048
3048
|
function ll(e, n) {
|
|
3049
|
-
const o = (/* @__PURE__ */ new Date()).toISOString(), s = e.split("__")[0], r = Lt.value ?? { projectId:
|
|
3049
|
+
const o = (/* @__PURE__ */ new Date()).toISOString(), s = e.split("__")[0], r = Lt.value ?? { projectId: Ut.projectId, updatedAt: o, scopes: {}, screens: {} }, d = { ...r.scopes ?? {}, [e]: { count: n, updatedAt: o } }, g = Object.entries(d).reduce((h, [b, I]) => h + (b === s || b.startsWith(`${s}__`) ? I.count : 0), 0);
|
|
3050
3050
|
Lt.value = {
|
|
3051
3051
|
...r,
|
|
3052
3052
|
updatedAt: o,
|
|
@@ -3055,14 +3055,14 @@ function ll(e, n) {
|
|
|
3055
3055
|
};
|
|
3056
3056
|
}
|
|
3057
3057
|
async function Tg(e, n) {
|
|
3058
|
-
if (!
|
|
3058
|
+
if (!Ut.remoteWritable) return;
|
|
3059
3059
|
const o = /* @__PURE__ */ new Map();
|
|
3060
3060
|
e.forEach((s) => {
|
|
3061
3061
|
const r = nt(s.screenId, s.stateId);
|
|
3062
3062
|
o.set(r, [...o.get(r) ?? [], s]);
|
|
3063
3063
|
});
|
|
3064
3064
|
for (const [s, r] of o) await On("testCases", s, r, n);
|
|
3065
|
-
await On("testCases", void 0, Kr(
|
|
3065
|
+
await On("testCases", void 0, Kr(Ut.projectId, e), n);
|
|
3066
3066
|
}
|
|
3067
3067
|
async function Ng(e = "初始化工具") {
|
|
3068
3068
|
var h, b;
|
|
@@ -3070,8 +3070,8 @@ async function Ng(e = "初始化工具") {
|
|
|
3070
3070
|
const n = await Eg(), o = ut("testCases"), s = new Set(Object.keys(o.scopes)), r = Object.values(o.scopes).flatMap((I) => Co(I.value));
|
|
3071
3071
|
on.value = [...n.filter((I) => !s.has(nt(I.screenId, I.stateId))), ...r], gt(s.size ? "local-cache" : "local-seed", "idle", s.size ? "已加载测试用例本地缓存" : "");
|
|
3072
3072
|
const d = mn.pages[0], g = d ? (b = (h = mn.states[d.id]) == null ? void 0 : h[0]) == null ? void 0 : b.id : void 0;
|
|
3073
|
-
if (ko.value = d ? nt(d.id, g) : "", os.value = !0, !
|
|
3074
|
-
gt(s.size ? "local-cache" : "local-seed", "idle",
|
|
3073
|
+
if (ko.value = d ? nt(d.id, g) : "", os.value = !0, !Ut.remoteReadable) {
|
|
3074
|
+
gt(s.size ? "local-cache" : "local-seed", "idle", Ut.unavailableReason);
|
|
3075
3075
|
return;
|
|
3076
3076
|
}
|
|
3077
3077
|
try {
|
|
@@ -3081,16 +3081,16 @@ async function Ng(e = "初始化工具") {
|
|
|
3081
3081
|
}
|
|
3082
3082
|
}
|
|
3083
3083
|
async function Rg(e, n) {
|
|
3084
|
-
ko.value = nt(e, n), os.value &&
|
|
3084
|
+
ko.value = nt(e, n), os.value && Ut.remoteReadable && await kl(!1);
|
|
3085
3085
|
}
|
|
3086
3086
|
async function kl(e = !1) {
|
|
3087
3087
|
var o;
|
|
3088
|
-
if (!os.value || !
|
|
3088
|
+
if (!os.value || !Ut.remoteReadable || !ko.value) return;
|
|
3089
3089
|
if (pa(e, Yr.value)) {
|
|
3090
|
-
gt(
|
|
3090
|
+
gt(Vn.value.source, "idle", "检测到未保存编辑,已暂缓轮询覆盖");
|
|
3091
3091
|
return;
|
|
3092
3092
|
}
|
|
3093
|
-
gt(
|
|
3093
|
+
gt(Vn.value.source, "syncing");
|
|
3094
3094
|
const n = ko.value;
|
|
3095
3095
|
try {
|
|
3096
3096
|
const [s, r] = await Promise.all([Ar(), yl(n)]);
|
|
@@ -3113,35 +3113,35 @@ async function kl(e = !1) {
|
|
|
3113
3113
|
ot("testCases", n, b, r.sha, I, "synced"), ss(n, b), ll(n, b.length), gt("gitee", "success", "", I);
|
|
3114
3114
|
} catch (s) {
|
|
3115
3115
|
const r = ut("testCases").scopes[n];
|
|
3116
|
-
r && ot("testCases", n, r.value, r.revision, r.lastRemoteSyncAt, r.status === "pending" ? "pending" : "stale", s instanceof Error ? s.message : "测试用例同步失败"), gt(r ? "local-cache" :
|
|
3116
|
+
r && ot("testCases", n, r.value, r.revision, r.lastRemoteSyncAt, r.status === "pending" ? "pending" : "stale", s instanceof Error ? s.message : "测试用例同步失败"), gt(r ? "local-cache" : Vn.value.source, "error", s instanceof Error ? s.message : "测试用例同步失败");
|
|
3117
3117
|
}
|
|
3118
3118
|
}
|
|
3119
3119
|
async function Og(e, n) {
|
|
3120
3120
|
var r;
|
|
3121
3121
|
const o = nt(n.screenId, n.stateId), s = ((r = n.authorName) == null ? void 0 : r.trim()) || "未署名";
|
|
3122
|
-
if (!
|
|
3122
|
+
if (!Ut.remoteWritable) {
|
|
3123
3123
|
const d = Zi(on.value.filter((h) => nt(h.screenId, h.stateId) === o), e, n);
|
|
3124
3124
|
ss(o, d);
|
|
3125
3125
|
const g = ut("testCases").scopes[o];
|
|
3126
|
-
return ot("testCases", o, d, (g == null ? void 0 : g.revision) ?? null, (g == null ? void 0 : g.lastRemoteSyncAt) ?? null, "pending"), ll(o, d.length), gt("local-cache", "success", `${
|
|
3126
|
+
return ot("testCases", o, d, (g == null ? void 0 : g.revision) ?? null, (g == null ? void 0 : g.lastRemoteSyncAt) ?? null, "pending"), ll(o, d.length), gt("local-cache", "success", `${Ut.unavailableReason || "Gitee 当前不可写"},修改尚未同步`), !0;
|
|
3127
3127
|
}
|
|
3128
|
-
gt(
|
|
3128
|
+
gt(Vn.value.source, "syncing");
|
|
3129
3129
|
try {
|
|
3130
3130
|
const d = await xv(o, s, e, (I) => Zi(Co(I), e, n));
|
|
3131
3131
|
if (!d) throw new Error("测试用例写入后未能回读");
|
|
3132
3132
|
const g = Co(d.value).map((I) => ({ ...I, screenId: n.screenId, stateId: n.stateId })), h = (/* @__PURE__ */ new Date()).toISOString();
|
|
3133
|
-
ss(o, g), ll(o, g.length), ot("testCases", o, g, d.sha, h, "synced"), Lt.value || (Lt.value = Kr(
|
|
3133
|
+
ss(o, g), ll(o, g.length), ot("testCases", o, g, d.sha, h, "synced"), Lt.value || (Lt.value = Kr(Ut.projectId, on.value, h));
|
|
3134
3134
|
const b = await Iv(Lt.value, s, o);
|
|
3135
3135
|
if (!b) throw new Error(`测试用例 ${o} 已写入,但 manifest 回读失败`);
|
|
3136
3136
|
return Lt.value = b.value, gt("gitee", "success", "", h), !0;
|
|
3137
3137
|
} catch (d) {
|
|
3138
3138
|
const g = d instanceof Error ? d.message : "测试用例保存失败";
|
|
3139
|
-
return gt(
|
|
3139
|
+
return gt(Vn.value.source, d instanceof Cn ? "conflict" : "error", g), !1;
|
|
3140
3140
|
}
|
|
3141
3141
|
}
|
|
3142
3142
|
async function Bg() {
|
|
3143
3143
|
var r;
|
|
3144
|
-
if (!
|
|
3144
|
+
if (!Ut.remoteReadable) return Qi(on.value, Xr("zh"));
|
|
3145
3145
|
const e = await Ar();
|
|
3146
3146
|
if (!e) throw new Error("Gitee 测试用例 manifest 不存在,无法确认整体导出范围");
|
|
3147
3147
|
const n = [], o = [], s = ut("testCases");
|
|
@@ -3168,7 +3168,7 @@ function qr() {
|
|
|
3168
3168
|
testCaseManifest: Lt,
|
|
3169
3169
|
selectedScopeId: ko,
|
|
3170
3170
|
initialized: os,
|
|
3171
|
-
sourceState:
|
|
3171
|
+
sourceState: Vn,
|
|
3172
3172
|
selectedScopeCases: x(() => on.value.filter((e) => nt(e.screenId, e.stateId) === ko.value)),
|
|
3173
3173
|
scopes: Xr,
|
|
3174
3174
|
initializeTestCases: Ng,
|
|
@@ -3181,7 +3181,7 @@ function qr() {
|
|
|
3181
3181
|
}
|
|
3182
3182
|
};
|
|
3183
3183
|
}
|
|
3184
|
-
const
|
|
3184
|
+
const Ug = { class: "test-case-workbench" }, jg = { class: "test-case-toolbar" }, Mg = { class: "test-case-title-block" }, Vg = { class: "test-case-toolbar-actions" }, Lg = ["disabled"], Fg = ["disabled"], Gg = ["disabled"], zg = { class: "test-case-scope-panel" }, Hg = { class: "test-case-search" }, Kg = ["placeholder"], Jg = { class: "test-case-scope-list" }, Wg = { class: "test-case-screen-label" }, Yg = ["onClick"], Xg = { class: "test-case-list-panel" }, qg = { class: "test-case-list-head" }, Zg = { class: "test-case-filter-row" }, Qg = { class: "test-case-range-switch" }, eh = ["disabled"], th = { class: "test-case-search" }, nh = ["placeholder"], oh = { key: 0 }, sh = {
|
|
3185
3185
|
key: 0,
|
|
3186
3186
|
class: "test-case-notice"
|
|
3187
3187
|
}, ah = { class: "test-case-table-wrap" }, lh = { class: "test-case-table" }, ih = ["onClick"], rh = { key: 0 }, uh = ["aria-label", "onClick"], ch = {
|
|
@@ -3246,7 +3246,7 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3246
3246
|
moveDown: ve("testCaseMoveDown"),
|
|
3247
3247
|
removeStep: ve("testCaseRemoveStep"),
|
|
3248
3248
|
unknown: ve("testCaseUnknown")
|
|
3249
|
-
}, ke = w(""), we = w(""), Ae = w("current"), Y = w("cases"), $e = w(!1),
|
|
3249
|
+
}, ke = w(""), we = w(""), Ae = w("current"), Y = w("cases"), $e = w(!1), je = w(""), H = yo(Ya()), rt = w(""), ue = w(""), _e = w(!1), A = x(() => b(o.lang)), ge = x(() => A.value.find((k) => k.id === g.value) ?? A.value[0]), Me = x(() => {
|
|
3250
3250
|
const k = ke.value.trim().toLowerCase();
|
|
3251
3251
|
return k ? A.value.filter(($) => `${$.screenCode} ${$.screenTitle} ${$.stateLabel}`.toLowerCase().includes(k)) : A.value;
|
|
3252
3252
|
}), Qe = x(() => {
|
|
@@ -3273,10 +3273,10 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3273
3273
|
}
|
|
3274
3274
|
function Je() {
|
|
3275
3275
|
var k;
|
|
3276
|
-
|
|
3276
|
+
je.value = "", Se(Ya(((k = ge.value) == null ? void 0 : k.screenTitle) ?? "")), $e.value = !0;
|
|
3277
3277
|
}
|
|
3278
3278
|
function te(k) {
|
|
3279
|
-
|
|
3279
|
+
je.value = k.id, Se({
|
|
3280
3280
|
module: k.module,
|
|
3281
3281
|
testItem: k.testItem,
|
|
3282
3282
|
testPoint: k.testPoint,
|
|
@@ -3287,7 +3287,7 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3287
3287
|
}), $e.value = !0;
|
|
3288
3288
|
}
|
|
3289
3289
|
function Ne(k = !0) {
|
|
3290
|
-
k && !he() || ($e.value = !1,
|
|
3290
|
+
k && !he() || ($e.value = !1, je.value = "", Se(Ya()));
|
|
3291
3291
|
}
|
|
3292
3292
|
function xe(k, $) {
|
|
3293
3293
|
const se = k + $;
|
|
@@ -3298,7 +3298,7 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3298
3298
|
async function ye() {
|
|
3299
3299
|
var st;
|
|
3300
3300
|
if (ue.value = $g(H), ue.value || !ge.value) return;
|
|
3301
|
-
const k = r.value.find((Pe) => Pe.id ===
|
|
3301
|
+
const k = r.value.find((Pe) => Pe.id === je.value), $ = (/* @__PURE__ */ new Date()).toISOString(), se = {
|
|
3302
3302
|
id: (k == null ? void 0 : k.id) ?? ((st = crypto.randomUUID) == null ? void 0 : st.call(crypto)) ?? `test-case-${Date.now()}`,
|
|
3303
3303
|
screenId: ge.value.screenId,
|
|
3304
3304
|
stateId: ge.value.stateId,
|
|
@@ -3318,7 +3318,7 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3318
3318
|
async function et(k) {
|
|
3319
3319
|
if (!window.confirm(`确定删除测试用例“${k.testItem}”吗?`)) return;
|
|
3320
3320
|
const $ = await oe("删除", { ...k, authorName: o.authorName.trim() || k.authorName || "未署名", updatedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
3321
|
-
ue.value = $ ? "测试用例已删除" : h.value.message ?? "删除失败", $ &&
|
|
3321
|
+
ue.value = $ ? "测试用例已删除" : h.value.message ?? "删除失败", $ && je.value === k.id && Ne(!1);
|
|
3322
3322
|
}
|
|
3323
3323
|
async function X() {
|
|
3324
3324
|
if (he()) {
|
|
@@ -3356,15 +3356,15 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3356
3356
|
window.removeEventListener("beforeunload", kt), ae(!1);
|
|
3357
3357
|
}), (k, $) => {
|
|
3358
3358
|
var se, Re, st, Pe, At;
|
|
3359
|
-
return v(), f("section",
|
|
3360
|
-
t("header",
|
|
3359
|
+
return v(), f("section", Ug, [
|
|
3360
|
+
t("header", jg, [
|
|
3361
3361
|
t("div", Mg, [
|
|
3362
3362
|
t("button", {
|
|
3363
3363
|
class: "test-case-back",
|
|
3364
3364
|
type: "button",
|
|
3365
|
-
onClick: $[0] || ($[0] = (
|
|
3365
|
+
onClick: $[0] || ($[0] = (U) => he() && s("close"))
|
|
3366
3366
|
}, [
|
|
3367
|
-
|
|
3367
|
+
V(i(Li)),
|
|
3368
3368
|
z(c(B.back), 1)
|
|
3369
3369
|
]),
|
|
3370
3370
|
t("div", null, [
|
|
@@ -3372,30 +3372,30 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3372
3372
|
t("p", null, c(B.subtitle), 1)
|
|
3373
3373
|
])
|
|
3374
3374
|
]),
|
|
3375
|
-
t("div",
|
|
3375
|
+
t("div", Vg, [
|
|
3376
3376
|
t("button", {
|
|
3377
3377
|
type: "button",
|
|
3378
3378
|
disabled: _e.value,
|
|
3379
|
-
onClick: $[1] || ($[1] = (
|
|
3379
|
+
onClick: $[1] || ($[1] = (U) => i(me)(!1))
|
|
3380
3380
|
}, [
|
|
3381
|
-
|
|
3381
|
+
V(i(rr)),
|
|
3382
3382
|
z(c(B.refresh), 1)
|
|
3383
3383
|
], 8, Lg),
|
|
3384
3384
|
t("button", {
|
|
3385
3385
|
type: "button",
|
|
3386
3386
|
disabled: _e.value,
|
|
3387
|
-
onClick: $[2] || ($[2] = (
|
|
3387
|
+
onClick: $[2] || ($[2] = (U) => de("json"))
|
|
3388
3388
|
}, [
|
|
3389
|
-
|
|
3389
|
+
V(i(cr)),
|
|
3390
3390
|
z(c(B.json), 1)
|
|
3391
|
-
], 8,
|
|
3391
|
+
], 8, Fg),
|
|
3392
3392
|
t("button", {
|
|
3393
3393
|
class: "is-primary",
|
|
3394
3394
|
type: "button",
|
|
3395
3395
|
disabled: _e.value,
|
|
3396
|
-
onClick: $[3] || ($[3] = (
|
|
3396
|
+
onClick: $[3] || ($[3] = (U) => de("excel"))
|
|
3397
3397
|
}, [
|
|
3398
|
-
|
|
3398
|
+
V(i(ur)),
|
|
3399
3399
|
z(c(B.excel), 1)
|
|
3400
3400
|
], 8, Gg)
|
|
3401
3401
|
])
|
|
@@ -3405,9 +3405,9 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3405
3405
|
}, [
|
|
3406
3406
|
t("aside", zg, [
|
|
3407
3407
|
t("label", Hg, [
|
|
3408
|
-
|
|
3408
|
+
V(i(sl)),
|
|
3409
3409
|
N(t("input", {
|
|
3410
|
-
"onUpdate:modelValue": $[4] || ($[4] = (
|
|
3410
|
+
"onUpdate:modelValue": $[4] || ($[4] = (U) => ke.value = U),
|
|
3411
3411
|
type: "search",
|
|
3412
3412
|
placeholder: B.searchScope
|
|
3413
3413
|
}, null, 8, Kg), [
|
|
@@ -3415,23 +3415,23 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3415
3415
|
])
|
|
3416
3416
|
]),
|
|
3417
3417
|
t("div", Jg, [
|
|
3418
|
-
(v(!0), f(D, null, R(Qe.value, (
|
|
3419
|
-
key:
|
|
3418
|
+
(v(!0), f(D, null, R(Qe.value, (U) => (v(), f("section", {
|
|
3419
|
+
key: U.screenId
|
|
3420
3420
|
}, [
|
|
3421
3421
|
t("div", Wg, [
|
|
3422
|
-
t("b", null, c(
|
|
3423
|
-
t("span", null, c(
|
|
3422
|
+
t("b", null, c(U.code), 1),
|
|
3423
|
+
t("span", null, c(U.title), 1)
|
|
3424
3424
|
]),
|
|
3425
|
-
(v(!0), f(D, null, R(
|
|
3426
|
-
var Ce,
|
|
3425
|
+
(v(!0), f(D, null, R(U.scopes, (le) => {
|
|
3426
|
+
var Ce, jt, yt;
|
|
3427
3427
|
return v(), f("button", {
|
|
3428
|
-
key:
|
|
3428
|
+
key: le.id,
|
|
3429
3429
|
type: "button",
|
|
3430
|
-
class: E({ active:
|
|
3431
|
-
onClick: (Jt) => ce(
|
|
3430
|
+
class: E({ active: le.id === i(g), unknown: !le.known }),
|
|
3431
|
+
onClick: (Jt) => ce(le)
|
|
3432
3432
|
}, [
|
|
3433
|
-
t("span", null, c(
|
|
3434
|
-
t("small", null, c(((yt = (
|
|
3433
|
+
t("span", null, c(le.stateLabel), 1),
|
|
3434
|
+
t("small", null, c(((yt = (jt = (Ce = i(d)) == null ? void 0 : Ce.scopes) == null ? void 0 : jt[le.id]) == null ? void 0 : yt.count) ?? i(r).filter((Jt) => i(nt)(Jt.screenId, Jt.stateId) === le.id).length), 1)
|
|
3435
3435
|
], 10, Yg);
|
|
3436
3436
|
}), 128))
|
|
3437
3437
|
]))), 128))
|
|
@@ -3441,9 +3441,9 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3441
3441
|
t("button", {
|
|
3442
3442
|
class: "test-case-mobile-scope-back",
|
|
3443
3443
|
type: "button",
|
|
3444
|
-
onClick: $[5] || ($[5] = (
|
|
3444
|
+
onClick: $[5] || ($[5] = (U) => Y.value = "scopes")
|
|
3445
3445
|
}, [
|
|
3446
|
-
|
|
3446
|
+
V(i(Li)),
|
|
3447
3447
|
$[18] || ($[18] = z("页面与状态", -1))
|
|
3448
3448
|
]),
|
|
3449
3449
|
t("div", qg, [
|
|
@@ -3456,7 +3456,7 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3456
3456
|
type: "button",
|
|
3457
3457
|
onClick: Je
|
|
3458
3458
|
}, [
|
|
3459
|
-
|
|
3459
|
+
V(i(Bn)),
|
|
3460
3460
|
z(c(B.add), 1)
|
|
3461
3461
|
])
|
|
3462
3462
|
]),
|
|
@@ -3465,7 +3465,7 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3465
3465
|
t("button", {
|
|
3466
3466
|
type: "button",
|
|
3467
3467
|
class: E({ active: Ae.value === "current" }),
|
|
3468
|
-
onClick: $[6] || ($[6] = (
|
|
3468
|
+
onClick: $[6] || ($[6] = (U) => Ae.value = "current")
|
|
3469
3469
|
}, c(B.current), 3),
|
|
3470
3470
|
t("button", {
|
|
3471
3471
|
type: "button",
|
|
@@ -3475,9 +3475,9 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3475
3475
|
}, c(B.all), 11, eh)
|
|
3476
3476
|
]),
|
|
3477
3477
|
t("label", th, [
|
|
3478
|
-
|
|
3478
|
+
V(i(sl)),
|
|
3479
3479
|
N(t("input", {
|
|
3480
|
-
"onUpdate:modelValue": $[7] || ($[7] = (
|
|
3480
|
+
"onUpdate:modelValue": $[7] || ($[7] = (U) => we.value = U),
|
|
3481
3481
|
type: "search",
|
|
3482
3482
|
placeholder: B.searchCase
|
|
3483
3483
|
}, null, 8, nh), [
|
|
@@ -3507,33 +3507,33 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3507
3507
|
])
|
|
3508
3508
|
]),
|
|
3509
3509
|
t("tbody", null, [
|
|
3510
|
-
(v(!0), f(D, null, R(Ke.value, (
|
|
3511
|
-
var
|
|
3510
|
+
(v(!0), f(D, null, R(Ke.value, (U) => {
|
|
3511
|
+
var le;
|
|
3512
3512
|
return v(), f("tr", {
|
|
3513
|
-
key:
|
|
3514
|
-
onClick: (Ce) => te(
|
|
3513
|
+
key: U.id,
|
|
3514
|
+
onClick: (Ce) => te(U)
|
|
3515
3515
|
}, [
|
|
3516
3516
|
t("td", null, [
|
|
3517
|
-
t("b", null, c(
|
|
3518
|
-
Ae.value === "all" ? (v(), f("small", rh, c((
|
|
3517
|
+
t("b", null, c(U.module), 1),
|
|
3518
|
+
Ae.value === "all" ? (v(), f("small", rh, c((le = i(b)(e.lang).find((Ce) => Ce.id === i(nt)(U.screenId, U.stateId))) == null ? void 0 : le.stateLabel), 1)) : C("", !0)
|
|
3519
3519
|
]),
|
|
3520
|
-
t("td", null, c(
|
|
3521
|
-
t("td", null, c(
|
|
3522
|
-
t("td", null, c(
|
|
3520
|
+
t("td", null, c(U.testItem), 1),
|
|
3521
|
+
t("td", null, c(U.testPoint), 1),
|
|
3522
|
+
t("td", null, c(U.preconditions), 1),
|
|
3523
3523
|
t("td", null, [
|
|
3524
3524
|
t("ol", null, [
|
|
3525
|
-
(v(!0), f(D, null, R(
|
|
3525
|
+
(v(!0), f(D, null, R(U.steps, (Ce, jt) => (v(), f("li", { key: jt }, c(Ce), 1))), 128))
|
|
3526
3526
|
])
|
|
3527
3527
|
]),
|
|
3528
|
-
t("td", null, c(
|
|
3529
|
-
t("td", null, c(
|
|
3528
|
+
t("td", null, c(U.expectedResult), 1),
|
|
3529
|
+
t("td", null, c(U.actualResult), 1),
|
|
3530
3530
|
t("td", null, [
|
|
3531
3531
|
t("button", {
|
|
3532
3532
|
type: "button",
|
|
3533
3533
|
"aria-label": B.delete,
|
|
3534
|
-
onClick: Ie((Ce) => et(
|
|
3534
|
+
onClick: Ie((Ce) => et(U), ["stop"])
|
|
3535
3535
|
}, [
|
|
3536
|
-
|
|
3536
|
+
V(i(Un))
|
|
3537
3537
|
], 8, uh)
|
|
3538
3538
|
])
|
|
3539
3539
|
], 8, ih);
|
|
@@ -3550,14 +3550,14 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3550
3550
|
t("header", null, [
|
|
3551
3551
|
t("div", null, [
|
|
3552
3552
|
t("small", null, c((Pe = ge.value) == null ? void 0 : Pe.screenCode) + " · " + c((At = ge.value) == null ? void 0 : At.stateLabel), 1),
|
|
3553
|
-
t("h2", null, c(
|
|
3553
|
+
t("h2", null, c(je.value ? B.edit : B.create), 1)
|
|
3554
3554
|
]),
|
|
3555
3555
|
t("button", {
|
|
3556
3556
|
type: "button",
|
|
3557
3557
|
"aria-label": B.close,
|
|
3558
|
-
onClick: $[8] || ($[8] = (
|
|
3558
|
+
onClick: $[8] || ($[8] = (U) => Ne())
|
|
3559
3559
|
}, [
|
|
3560
|
-
|
|
3560
|
+
V(i(hn))
|
|
3561
3561
|
], 8, ph)
|
|
3562
3562
|
]),
|
|
3563
3563
|
t("div", vh, [
|
|
@@ -3566,13 +3566,13 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3566
3566
|
t("input", {
|
|
3567
3567
|
value: e.authorName,
|
|
3568
3568
|
type: "text",
|
|
3569
|
-
onInput: $[9] || ($[9] = (
|
|
3569
|
+
onInput: $[9] || ($[9] = (U) => s("update:authorName", U.target.value))
|
|
3570
3570
|
}, null, 40, fh)
|
|
3571
3571
|
]),
|
|
3572
3572
|
t("label", null, [
|
|
3573
3573
|
t("span", null, c(B.module) + " *", 1),
|
|
3574
3574
|
N(t("input", {
|
|
3575
|
-
"onUpdate:modelValue": $[10] || ($[10] = (
|
|
3575
|
+
"onUpdate:modelValue": $[10] || ($[10] = (U) => H.module = U),
|
|
3576
3576
|
type: "text"
|
|
3577
3577
|
}, null, 512), [
|
|
3578
3578
|
[G, H.module]
|
|
@@ -3581,7 +3581,7 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3581
3581
|
t("label", null, [
|
|
3582
3582
|
t("span", null, c(B.item) + " *", 1),
|
|
3583
3583
|
N(t("input", {
|
|
3584
|
-
"onUpdate:modelValue": $[11] || ($[11] = (
|
|
3584
|
+
"onUpdate:modelValue": $[11] || ($[11] = (U) => H.testItem = U),
|
|
3585
3585
|
type: "text"
|
|
3586
3586
|
}, null, 512), [
|
|
3587
3587
|
[G, H.testItem]
|
|
@@ -3590,7 +3590,7 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3590
3590
|
t("label", null, [
|
|
3591
3591
|
t("span", null, c(B.point) + " *", 1),
|
|
3592
3592
|
N(t("textarea", {
|
|
3593
|
-
"onUpdate:modelValue": $[12] || ($[12] = (
|
|
3593
|
+
"onUpdate:modelValue": $[12] || ($[12] = (U) => H.testPoint = U),
|
|
3594
3594
|
rows: "3"
|
|
3595
3595
|
}, null, 512), [
|
|
3596
3596
|
[G, H.testPoint]
|
|
@@ -3599,7 +3599,7 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3599
3599
|
t("label", null, [
|
|
3600
3600
|
t("span", null, c(B.preconditions), 1),
|
|
3601
3601
|
N(t("textarea", {
|
|
3602
|
-
"onUpdate:modelValue": $[13] || ($[13] = (
|
|
3602
|
+
"onUpdate:modelValue": $[13] || ($[13] = (U) => H.preconditions = U),
|
|
3603
3603
|
rows: "3"
|
|
3604
3604
|
}, null, 512), [
|
|
3605
3605
|
[G, H.preconditions]
|
|
@@ -3607,57 +3607,57 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3607
3607
|
]),
|
|
3608
3608
|
t("fieldset", null, [
|
|
3609
3609
|
t("legend", null, c(B.steps) + " *", 1),
|
|
3610
|
-
(v(!0), f(D, null, R(H.steps, (
|
|
3611
|
-
key:
|
|
3610
|
+
(v(!0), f(D, null, R(H.steps, (U, le) => (v(), f("div", {
|
|
3611
|
+
key: le,
|
|
3612
3612
|
class: "test-case-step"
|
|
3613
3613
|
}, [
|
|
3614
|
-
t("b", null, c(
|
|
3614
|
+
t("b", null, c(le + 1), 1),
|
|
3615
3615
|
N(t("textarea", {
|
|
3616
|
-
"onUpdate:modelValue": (Ce) => H.steps[
|
|
3616
|
+
"onUpdate:modelValue": (Ce) => H.steps[le] = Ce,
|
|
3617
3617
|
rows: "2"
|
|
3618
3618
|
}, null, 8, mh), [
|
|
3619
|
-
[G, H.steps[
|
|
3619
|
+
[G, H.steps[le]]
|
|
3620
3620
|
]),
|
|
3621
3621
|
t("div", null, [
|
|
3622
3622
|
t("button", {
|
|
3623
3623
|
type: "button",
|
|
3624
3624
|
"aria-label": B.moveUp,
|
|
3625
|
-
disabled:
|
|
3626
|
-
onClick: (Ce) => xe(
|
|
3625
|
+
disabled: le === 0,
|
|
3626
|
+
onClick: (Ce) => xe(le, -1)
|
|
3627
3627
|
}, [
|
|
3628
|
-
|
|
3628
|
+
V(i(Od))
|
|
3629
3629
|
], 8, gh),
|
|
3630
3630
|
t("button", {
|
|
3631
3631
|
type: "button",
|
|
3632
3632
|
"aria-label": B.moveDown,
|
|
3633
|
-
disabled:
|
|
3634
|
-
onClick: (Ce) => xe(
|
|
3633
|
+
disabled: le === H.steps.length - 1,
|
|
3634
|
+
onClick: (Ce) => xe(le, 1)
|
|
3635
3635
|
}, [
|
|
3636
|
-
|
|
3636
|
+
V(i(Bd))
|
|
3637
3637
|
], 8, hh),
|
|
3638
3638
|
t("button", {
|
|
3639
3639
|
type: "button",
|
|
3640
3640
|
"aria-label": B.removeStep,
|
|
3641
3641
|
disabled: H.steps.length === 1,
|
|
3642
|
-
onClick: (Ce) => H.steps.splice(
|
|
3642
|
+
onClick: (Ce) => H.steps.splice(le, 1)
|
|
3643
3643
|
}, [
|
|
3644
|
-
|
|
3644
|
+
V(i(hn))
|
|
3645
3645
|
], 8, yh)
|
|
3646
3646
|
])
|
|
3647
3647
|
]))), 128)),
|
|
3648
3648
|
t("button", {
|
|
3649
3649
|
class: "test-case-add-step",
|
|
3650
3650
|
type: "button",
|
|
3651
|
-
onClick: $[14] || ($[14] = (
|
|
3651
|
+
onClick: $[14] || ($[14] = (U) => H.steps.push(""))
|
|
3652
3652
|
}, [
|
|
3653
|
-
|
|
3653
|
+
V(i(Bn)),
|
|
3654
3654
|
z(c(B.addStep), 1)
|
|
3655
3655
|
])
|
|
3656
3656
|
]),
|
|
3657
3657
|
t("label", null, [
|
|
3658
3658
|
t("span", null, c(B.expected) + " *", 1),
|
|
3659
3659
|
N(t("textarea", {
|
|
3660
|
-
"onUpdate:modelValue": $[15] || ($[15] = (
|
|
3660
|
+
"onUpdate:modelValue": $[15] || ($[15] = (U) => H.expectedResult = U),
|
|
3661
3661
|
rows: "4"
|
|
3662
3662
|
}, null, 512), [
|
|
3663
3663
|
[G, H.expectedResult]
|
|
@@ -3666,7 +3666,7 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3666
3666
|
t("label", null, [
|
|
3667
3667
|
t("span", null, c(B.actual), 1),
|
|
3668
3668
|
N(t("textarea", {
|
|
3669
|
-
"onUpdate:modelValue": $[16] || ($[16] = (
|
|
3669
|
+
"onUpdate:modelValue": $[16] || ($[16] = (U) => H.actualResult = U),
|
|
3670
3670
|
rows: "3"
|
|
3671
3671
|
}, null, 512), [
|
|
3672
3672
|
[G, H.actualResult]
|
|
@@ -3676,7 +3676,7 @@ const jg = { class: "test-case-workbench" }, Ug = { class: "test-case-toolbar" }
|
|
|
3676
3676
|
t("footer", null, [
|
|
3677
3677
|
t("button", {
|
|
3678
3678
|
type: "button",
|
|
3679
|
-
onClick: $[17] || ($[17] = (
|
|
3679
|
+
onClick: $[17] || ($[17] = (U) => Ne())
|
|
3680
3680
|
}, c(B.cancel), 1),
|
|
3681
3681
|
t("button", {
|
|
3682
3682
|
class: "is-primary",
|
|
@@ -3829,7 +3829,7 @@ export const product: PrototypeProductDefinition = {
|
|
|
3829
3829
|
document: {
|
|
3830
3830
|
title: '示例产品',
|
|
3831
3831
|
description: '示例产品需求文档',
|
|
3832
|
-
url:
|
|
3832
|
+
url: import.meta.env.VITE_PRODUCT_DOCUMENT_URL?.trim() || undefined,
|
|
3833
3833
|
},
|
|
3834
3834
|
updateHistory: __BUSINESS_UPDATE_HISTORY__,
|
|
3835
3835
|
pages: [
|
|
@@ -3870,14 +3870,20 @@ export const product: PrototypeProductDefinition = {
|
|
|
3870
3870
|
|
|
3871
3871
|
### 5.1 顶部产品文档配置
|
|
3872
3872
|
|
|
3873
|
-
顶部左侧的标题和描述用于说明当前产品文档,右侧“产品需求文档”按钮读取同一份 \`document\` 配置。配置属于消费者产品定义,不应写入内核源码或 \`runtimeConfig
|
|
3873
|
+
顶部左侧的标题和描述用于说明当前产品文档,右侧“产品需求文档”按钮读取同一份 \`document\` 配置。配置属于消费者产品定义,不应写入内核源码或 \`runtimeConfig\`。文档地址集中放在消费者 \`.env\` 中:
|
|
3874
|
+
|
|
3875
|
+
\`\`\`dotenv
|
|
3876
|
+
VITE_PRODUCT_DOCUMENT_URL=https://example.com/product-requirements
|
|
3877
|
+
\`\`\`
|
|
3878
|
+
|
|
3879
|
+
产品定义只读取该变量:
|
|
3874
3880
|
|
|
3875
3881
|
\`\`\`ts
|
|
3876
3882
|
export const product: PrototypeProductDefinition = {
|
|
3877
3883
|
document: {
|
|
3878
3884
|
title: '产品名称或文档标题',
|
|
3879
3885
|
description: '当前产品需求文档的简短说明',
|
|
3880
|
-
url:
|
|
3886
|
+
url: import.meta.env.VITE_PRODUCT_DOCUMENT_URL?.trim() || undefined,
|
|
3881
3887
|
},
|
|
3882
3888
|
// pages、states、copy、flows...
|
|
3883
3889
|
}
|
|
@@ -3892,8 +3898,9 @@ export const product: PrototypeProductDefinition = {
|
|
|
3892
3898
|
| \`url\` | 可选 | “产品需求文档”按钮的新标签页目标地址 |
|
|
3893
3899
|
|
|
3894
3900
|
- \`document\` 为兼容旧消费者保持可选;新接入或升级后的消费者应显式配置。
|
|
3901
|
+
- 环境变量统一使用 \`VITE_PRODUCT_DOCUMENT_URL\`;可提交 \`.env.example\` 占位说明,真实 \`.env\` 不得提交。
|
|
3895
3902
|
- 未配置 \`url\` 或内容为空时,点击按钮不会打开新标签页,而是提示在 \`PrototypeProductDefinition.document.url\` 中配置。
|
|
3896
|
-
- URL
|
|
3903
|
+
- \`VITE_\` 变量会进入浏览器构建产物,因此 URL 不得包含 Token、口令或鉴权参数。公开仓库和示例只能使用公开地址或虚构值。
|
|
3897
3904
|
- 标题区域仍用于返回原型首页;打开文档使用右侧“产品需求文档”按钮。
|
|
3898
3905
|
|
|
3899
3906
|
完成判定:顶部标题和描述与配置一致;点击按钮能在新标签页打开目标文档;临时移除 \`url\` 后点击只显示未配置提示,不产生空白标签页。
|
|
@@ -4506,7 +4513,7 @@ Git 状态:未提交 / 已提交 / 已推送
|
|
|
4506
4513
|
__name: "PrototypeCoreHelpPage",
|
|
4507
4514
|
emits: ["close"],
|
|
4508
4515
|
setup(e) {
|
|
4509
|
-
const n = w("idle"), o = "1.2.
|
|
4516
|
+
const n = w("idle"), o = "1.2.20";
|
|
4510
4517
|
let s;
|
|
4511
4518
|
function r() {
|
|
4512
4519
|
const g = document.createElement("textarea");
|
|
@@ -4562,7 +4569,7 @@ Git 状态:未提交 / 已提交 / 已推送
|
|
|
4562
4569
|
title: "返回原型",
|
|
4563
4570
|
onClick: h[0] || (h[0] = (b) => g.$emit("close"))
|
|
4564
4571
|
}, [
|
|
4565
|
-
|
|
4572
|
+
V(i(hn), { class: "h-4 w-4" })
|
|
4566
4573
|
])
|
|
4567
4574
|
])
|
|
4568
4575
|
]),
|
|
@@ -4578,7 +4585,7 @@ Git 状态:未提交 / 已提交 / 已推送
|
|
|
4578
4585
|
__name: "PrototypeCoreThemeGuidePage",
|
|
4579
4586
|
emits: ["close"],
|
|
4580
4587
|
setup(e) {
|
|
4581
|
-
const n = w("idle"), o = "1.2.
|
|
4588
|
+
const n = w("idle"), o = "1.2.20";
|
|
4582
4589
|
let s;
|
|
4583
4590
|
function r() {
|
|
4584
4591
|
const g = document.createElement("textarea");
|
|
@@ -4634,7 +4641,7 @@ Git 状态:未提交 / 已提交 / 已推送
|
|
|
4634
4641
|
title: "返回原型",
|
|
4635
4642
|
onClick: h[0] || (h[0] = (b) => g.$emit("close"))
|
|
4636
4643
|
}, [
|
|
4637
|
-
|
|
4644
|
+
V(i(hn), { class: "h-4 w-4" })
|
|
4638
4645
|
])
|
|
4639
4646
|
])
|
|
4640
4647
|
]),
|
|
@@ -4650,14 +4657,14 @@ function Zr(e, n, o) {
|
|
|
4650
4657
|
y: (n - o.top) / o.height * 100
|
|
4651
4658
|
};
|
|
4652
4659
|
}
|
|
4653
|
-
function
|
|
4660
|
+
function Uh(e) {
|
|
4654
4661
|
return {
|
|
4655
4662
|
x: Math.min(96, Math.max(4, e.x)),
|
|
4656
4663
|
y: Math.min(96, Math.max(4, e.y))
|
|
4657
4664
|
};
|
|
4658
4665
|
}
|
|
4659
|
-
const
|
|
4660
|
-
function
|
|
4666
|
+
const jh = {}, Mh = { class: "flex min-h-full flex-col items-center justify-center bg-canvas px-8 text-center text-ink" };
|
|
4667
|
+
function Vh(e, n) {
|
|
4661
4668
|
return v(), f("section", Mh, [...n[0] || (n[0] = [
|
|
4662
4669
|
t("div", { class: "rounded-[28px] border border-line bg-panel px-7 py-8 shadow-sm" }, [
|
|
4663
4670
|
t("p", { class: "text-lg font-semibold" }, "暂无原型页面"),
|
|
@@ -4665,7 +4672,7 @@ function Fh(e, n) {
|
|
|
4665
4672
|
], -1)
|
|
4666
4673
|
])]);
|
|
4667
4674
|
}
|
|
4668
|
-
const Lh = /* @__PURE__ */ da(
|
|
4675
|
+
const Lh = /* @__PURE__ */ da(jh, [["render", Vh]]), { copy: Fh, pages: Qr, states: eu, flows: Gh, extendContext: Za } = ca(), Mt = {
|
|
4669
4676
|
ocean: "#1d1d1f",
|
|
4670
4677
|
ink: "#1d1d1f",
|
|
4671
4678
|
muted: "#747579",
|
|
@@ -4849,11 +4856,11 @@ const zh = Qt({
|
|
|
4849
4856
|
themeMeta: { name: "Meta", description: "蓝色产品工具风格" },
|
|
4850
4857
|
themeUber: { name: "Uber", description: "黑白高对比预设" },
|
|
4851
4858
|
themeCustom: { name: "自定义", description: "来自面板编辑或 JSON 导入" }
|
|
4852
|
-
}, il = "prototype-core-custom-theme", cu = "prototype-core-annotation-author", du = "prototype-core-collaboration-polling-interval-v2", pu = 60, vu = 10, fu = 300, mu = w("zh"), rl = w("interactive"), ft = w("splash"), Kt = w(""), Ct = w("default"), Te = w(Qt()), Hh = w(!1), Kh = w(null), vt = w(0.42),
|
|
4859
|
+
}, il = "prototype-core-custom-theme", cu = "prototype-core-annotation-author", du = "prototype-core-collaboration-polling-interval-v2", pu = 60, vu = 10, fu = 300, mu = w("zh"), rl = w("interactive"), ft = w("splash"), Kt = w(""), Ct = w("default"), Te = w(Qt()), Hh = w(!1), Kh = w(null), vt = w(0.42), Fn = w(360), Gn = w(150), va = w(!1), es = w({ x: 0, y: 0, panX: 0, panY: 0 }), Qa = Qr.find((e) => e.platform === "mobile" && e.hasTabBar), xl = w((Qa == null ? void 0 : Qa.id) ?? ""), Il = yo({});
|
|
4853
4860
|
Object.entries(eu).forEach(([e, n]) => {
|
|
4854
4861
|
n.length && (Il[e] = n[0].id);
|
|
4855
4862
|
});
|
|
4856
|
-
const Jh = w("annotations"), ln = w(Cr), gn = w("idle"), yn = w(Cr ? "云端协作已启用" : "本地兜底模式"), Dt = w(""), So = w(pu), sa = w(String(pu)), aa = w(""), Wh = w(!1), Yh = w(!0), fa = w(!1), ma = w(""), cs = w(null), $l = w(""), ds = w("view"),
|
|
4863
|
+
const Jh = w("annotations"), ln = w(Cr), gn = w("idle"), yn = w(Cr ? "云端协作已启用" : "本地兜底模式"), Dt = w(""), So = w(pu), sa = w(String(pu)), aa = w(""), Wh = w(!1), Yh = w(!0), fa = w(!1), ma = w(""), cs = w(null), $l = w(""), ds = w("view"), jn = w({ featureName: "", featureDescription: "", specialNote: "", color: Mt.ocean }), ie = w([]), bn = w(null), Ze = w([]), ht = w(null), Hn = w("local-seed"), gu = w(!1), Gt = w({
|
|
4857
4864
|
gitee: {},
|
|
4858
4865
|
"local-cache": {},
|
|
4859
4866
|
"local-seed": {}
|
|
@@ -4869,48 +4876,48 @@ const Jh = w("annotations"), ln = w(Cr), gn = w("idle"), yn = w(Cr ? "云端协
|
|
|
4869
4876
|
edgeCases: "",
|
|
4870
4877
|
acceptanceCriteria: "",
|
|
4871
4878
|
developmentNotes: ""
|
|
4872
|
-
}), tt = w([]), hu = w(!1), ls = w({ annotations: !1, pageDescriptions: !1, testCases: !1, flows: !1 }),
|
|
4879
|
+
}), tt = w([]), hu = w(!1), ls = w({ annotations: !1, pageDescriptions: !1, testCases: !1, flows: !1 }), Ue = w({
|
|
4873
4880
|
annotations: { source: "local-seed", status: "idle" },
|
|
4874
4881
|
pageDescriptions: { source: "local-seed", status: "idle" },
|
|
4875
4882
|
testCases: { source: "local-seed", status: "idle" },
|
|
4876
4883
|
flows: { source: "local-seed", status: "idle" }
|
|
4877
4884
|
}), fn = w("idle"), it = w({ current: 0, total: 0, label: "" }), Mn = w(""), Xh = w(!1), yu = x(() => ln.value && De.remoteWritable), qh = w(1), Zh = w(3), is = w(null), zn = Qr;
|
|
4878
|
-
function
|
|
4885
|
+
function Ft() {
|
|
4879
4886
|
return typeof window > "u" ? null : window.localStorage;
|
|
4880
4887
|
}
|
|
4881
4888
|
const De = We(), ul = `mobile-prototype-flow-draft:${De.projectId}:${De.remoteBranch}:${De.branchKey}`;
|
|
4882
4889
|
var ir;
|
|
4883
|
-
const bu = w(((ir =
|
|
4890
|
+
const bu = w(((ir = Ft()) == null ? void 0 : ir.getItem(ul)) === "true");
|
|
4884
4891
|
function wu(e) {
|
|
4885
4892
|
var n, o;
|
|
4886
|
-
bu.value = e, e ? (n =
|
|
4893
|
+
bu.value = e, e ? (n = Ft()) == null || n.setItem(ul, "true") : (o = Ft()) == null || o.removeItem(ul);
|
|
4887
4894
|
}
|
|
4888
4895
|
const Qh = x(() => {
|
|
4889
4896
|
var s;
|
|
4890
|
-
const e = Object.values(
|
|
4897
|
+
const e = Object.values(Ue.value);
|
|
4891
4898
|
if (e.some((r) => r.status === "conflict")) return "数据冲突";
|
|
4892
4899
|
if (e.some((r) => r.status === "syncing")) return "正在同步";
|
|
4893
4900
|
if (new Set(e.map((r) => r.source)).size > 1) return "混合来源";
|
|
4894
4901
|
const o = (s = e[0]) == null ? void 0 : s.source;
|
|
4895
4902
|
return o === "gitee" ? "Gitee" : o === "local-cache" ? "本地缓存" : "本地种子";
|
|
4896
4903
|
}), Su = x(() => {
|
|
4897
|
-
const e = Object.values(
|
|
4904
|
+
const e = Object.values(Ue.value);
|
|
4898
4905
|
return e.some((n) => n.status === "conflict") ? "conflict" : !De.remoteWritable || e.some((n) => n.status === "error") ? "warning" : e.some((n) => n.status === "syncing") ? "syncing" : e.every((n) => n.source === "gitee") ? "remote" : "local";
|
|
4899
4906
|
}), ey = x(() => {
|
|
4900
|
-
const e = Object.values(
|
|
4907
|
+
const e = Object.values(Ue.value).map((n) => n.syncedAt).filter((n) => !!n).sort();
|
|
4901
4908
|
return e[e.length - 1] ?? "";
|
|
4902
4909
|
}), ty = x(() => {
|
|
4903
4910
|
if (fn.value === "running") return `正在初始化 Gitee · ${it.value.current} / ${it.value.total}`;
|
|
4904
4911
|
if (Mn.value) return Mn.value;
|
|
4905
4912
|
if (!De.remoteWritable) return De.unavailableReason;
|
|
4906
4913
|
if (Su.value === "conflict") return "远端已更新,请处理本地草稿";
|
|
4907
|
-
const e = Object.values(
|
|
4914
|
+
const e = Object.values(Ue.value).find((n) => n.status === "error");
|
|
4908
4915
|
return (e == null ? void 0 : e.message) || "注释 / 页面描述 / 流程";
|
|
4909
4916
|
}), ny = x(() => De.remoteWritable && fn.value !== "running");
|
|
4910
|
-
function
|
|
4911
|
-
|
|
4912
|
-
...
|
|
4913
|
-
[e]: { source: n, status: o, message: s, syncedAt: r ??
|
|
4917
|
+
function re(e, n, o, s = "", r) {
|
|
4918
|
+
Ue.value = {
|
|
4919
|
+
...Ue.value,
|
|
4920
|
+
[e]: { source: n, status: o, message: s, syncedAt: r ?? Ue.value[e].syncedAt }
|
|
4914
4921
|
};
|
|
4915
4922
|
}
|
|
4916
4923
|
function Pl(e, n, o, s, r) {
|
|
@@ -4920,13 +4927,13 @@ function Pl(e, n, o, s, r) {
|
|
|
4920
4927
|
d && d !== n && (aa.value = `检测到远端${s}更新,已同步到当前页面`);
|
|
4921
4928
|
}
|
|
4922
4929
|
function Dl(e, n) {
|
|
4923
|
-
|
|
4930
|
+
re(e, Ue.value[e].source, "conflict", n), gn.value = "error", yn.value = n;
|
|
4924
4931
|
}
|
|
4925
4932
|
function oy(e, n) {
|
|
4926
4933
|
ls.value = { ...ls.value, [e]: n };
|
|
4927
4934
|
}
|
|
4928
4935
|
function Cu(e, n = e) {
|
|
4929
|
-
return Ig(
|
|
4936
|
+
return Ig(Fh, mu.value, e, n);
|
|
4930
4937
|
}
|
|
4931
4938
|
function rs(e) {
|
|
4932
4939
|
return /^#[0-9a-fA-F]{6}$/.test(e);
|
|
@@ -5106,19 +5113,19 @@ function wy(e) {
|
|
|
5106
5113
|
function tr(e) {
|
|
5107
5114
|
xl.value = e, ia(e);
|
|
5108
5115
|
}
|
|
5109
|
-
function
|
|
5116
|
+
function j(e, n) {
|
|
5110
5117
|
return n ? `${e}__${n}` : e;
|
|
5111
5118
|
}
|
|
5112
5119
|
function vs(e) {
|
|
5113
5120
|
const n = kn(e);
|
|
5114
|
-
return n.length ? n.map((o) =>
|
|
5121
|
+
return n.length ? n.map((o) => j(e, o.id)) : [j(e)];
|
|
5115
5122
|
}
|
|
5116
5123
|
function sn() {
|
|
5117
|
-
return
|
|
5124
|
+
return j(ft.value, St.value);
|
|
5118
5125
|
}
|
|
5119
|
-
const pl = x(() =>
|
|
5126
|
+
const pl = x(() => ie.value.filter((e) => j(e.screenId, e.stateId) === sn())), Nl = x(() => Gt.value[Hn.value][sn()] ?? null);
|
|
5120
5127
|
function vl(e) {
|
|
5121
|
-
return Object.fromEntries(e.map((n) => [
|
|
5128
|
+
return Object.fromEntries(e.map((n) => [j(n.screenId, n.stateId), n]));
|
|
5122
5129
|
}
|
|
5123
5130
|
function Bt(e, n, o) {
|
|
5124
5131
|
const s = { ...Gt.value[e] };
|
|
@@ -5130,12 +5137,12 @@ function Sy(e) {
|
|
|
5130
5137
|
function fs(e) {
|
|
5131
5138
|
var o, s;
|
|
5132
5139
|
const n = (s = (o = ht.value) == null ? void 0 : o.scopes) == null ? void 0 : s[e];
|
|
5133
|
-
return n && "highlighted" in n ? n.highlighted === !0 : Ze.value.some((r) =>
|
|
5140
|
+
return n && "highlighted" in n ? n.highlighted === !0 : Ze.value.some((r) => j(r.screenId, r.stateId) === e && r.highlighted === !0);
|
|
5134
5141
|
}
|
|
5135
5142
|
function Pu(e) {
|
|
5136
5143
|
var o, s, r;
|
|
5137
5144
|
const n = (s = (o = ht.value) == null ? void 0 : o.scopes) == null ? void 0 : s[e];
|
|
5138
|
-
return (n == null ? void 0 : n.highlighted) === !0 ? n.highlightColor ?? "#ef4444" : ((r = Ze.value.find((d) =>
|
|
5145
|
+
return (n == null ? void 0 : n.highlighted) === !0 ? n.highlightColor ?? "#ef4444" : ((r = Ze.value.find((d) => j(d.screenId, d.stateId) === e && d.highlighted === !0)) == null ? void 0 : r.highlightColor) ?? "#ef4444";
|
|
5139
5146
|
}
|
|
5140
5147
|
function Du(e) {
|
|
5141
5148
|
return vs(e).some((n) => fs(n));
|
|
@@ -5147,11 +5154,11 @@ function Cy(e) {
|
|
|
5147
5154
|
function ky(e) {
|
|
5148
5155
|
const n = kn(e), o = {};
|
|
5149
5156
|
return n.forEach((s) => {
|
|
5150
|
-
const r =
|
|
5157
|
+
const r = j(e, s.id);
|
|
5151
5158
|
fs(r) && (o[s.id] = Pu(r));
|
|
5152
5159
|
}), o;
|
|
5153
5160
|
}
|
|
5154
|
-
const xy = x(() => ky(ft.value)), Iy = x(() => Du(ft.value)), $y = x(() => fs(sn())), Au = x(() =>
|
|
5161
|
+
const xy = x(() => ky(ft.value)), Iy = x(() => Du(ft.value)), $y = x(() => fs(sn())), Au = x(() => ie.value.find((e) => e.id === $l.value) ?? null), _y = x(() => ie.value.find((e) => e.id === ma.value) ?? null);
|
|
5155
5162
|
function ms(e) {
|
|
5156
5163
|
return typeof e == "string" && rs(e) ? e.toLowerCase() : void 0;
|
|
5157
5164
|
}
|
|
@@ -5232,17 +5239,17 @@ async function ea(e, n) {
|
|
|
5232
5239
|
}
|
|
5233
5240
|
}
|
|
5234
5241
|
async function Dy() {
|
|
5235
|
-
var
|
|
5242
|
+
var je, H, rt, ue, _e;
|
|
5236
5243
|
typeof window < "u" && (window.__PROTOTYPE_CORE__ = { syncPageDescriptionsFromJson: Bu });
|
|
5237
|
-
const e = (
|
|
5244
|
+
const e = (je = Ft()) == null ? void 0 : je.getItem(cu);
|
|
5238
5245
|
e && (Dt.value = e);
|
|
5239
|
-
const n = (H =
|
|
5246
|
+
const n = (H = Ft()) == null ? void 0 : H.getItem(du), o = n == null ? Number.NaN : Number(n);
|
|
5240
5247
|
Number.isFinite(o) && (So.value = Math.min(fu, Math.max(vu, o)), sa.value = String(So.value));
|
|
5241
5248
|
try {
|
|
5242
|
-
const A = JSON.parse(((rt =
|
|
5249
|
+
const A = JSON.parse(((rt = Ft()) == null ? void 0 : rt.getItem(il)) ?? "null");
|
|
5243
5250
|
(A != null && A.colors || A != null && A.designColors || A != null && A.typography || A != null && A.radius || A != null && A.spacing || A != null && A.shadow) && (Te.value = ku(A), Ct.value = A.selectedThemeId ?? Ct.value);
|
|
5244
5251
|
} catch {
|
|
5245
|
-
(ue =
|
|
5252
|
+
(ue = Ft()) == null || ue.removeItem(il);
|
|
5246
5253
|
}
|
|
5247
5254
|
const [s, r, d] = await Promise.all([
|
|
5248
5255
|
ea("flows.json", { flows: [] }),
|
|
@@ -5256,36 +5263,36 @@ async function Dy() {
|
|
|
5256
5263
|
if (h) {
|
|
5257
5264
|
const A = {};
|
|
5258
5265
|
ra(h.value).forEach((ge) => {
|
|
5259
|
-
const Me =
|
|
5266
|
+
const Me = j(ge.screenId, ge.stateId), Qe = A[Me] ?? { value: [], revision: null, cachedAt: (/* @__PURE__ */ new Date()).toISOString(), lastRemoteSyncAt: null, status: "stale" };
|
|
5260
5267
|
Qe.value.push(ge), A[Me] = Qe;
|
|
5261
5268
|
}), Wi("annotations", A);
|
|
5262
5269
|
}
|
|
5263
5270
|
if (b) {
|
|
5264
5271
|
const A = {};
|
|
5265
5272
|
Ln(b.value).forEach((ge) => {
|
|
5266
|
-
A[
|
|
5273
|
+
A[j(ge.screenId, ge.stateId)] = { value: ge, revision: null, cachedAt: (/* @__PURE__ */ new Date()).toISOString(), lastRemoteSyncAt: null, status: "stale" };
|
|
5267
5274
|
}), Wi("pageDescriptions", A);
|
|
5268
5275
|
}
|
|
5269
|
-
const I = ut("annotations"), ee = ut("pageDescriptions"), me = Object.values(I.scopes).flatMap((A) => A.value), oe = Object.values(ee.scopes).map((A) => A.value), Z = new Set(Object.keys(I.scopes)), ae = new Set(Object.keys(ee.scopes)), B = [...g.annotations.filter((A) => !Z.has(
|
|
5270
|
-
|
|
5276
|
+
const I = ut("annotations"), ee = ut("pageDescriptions"), me = Object.values(I.scopes).flatMap((A) => A.value), oe = Object.values(ee.scopes).map((A) => A.value), Z = new Set(Object.keys(I.scopes)), ae = new Set(Object.keys(ee.scopes)), B = [...g.annotations.filter((A) => !Z.has(j(A.screenId, A.stateId))), ...me], ke = [...g.pageDescriptions.filter((A) => !ae.has(j(A.screenId, A.stateId))), ...oe], we = wr("flows"), Ae = Z.size ? { value: B, source: "local-cache" } : { value: g.annotations, source: "local-seed" }, Y = ae.size ? { value: ke, source: "local-cache" } : { value: g.pageDescriptions, source: "local-seed" }, $e = pv(we, g.flows);
|
|
5277
|
+
ie.value = Ae.value, Ze.value = Y.value, Gt.value = {
|
|
5271
5278
|
gitee: {},
|
|
5272
5279
|
"local-cache": vl(oe),
|
|
5273
5280
|
"local-seed": vl(g.pageDescriptions)
|
|
5274
|
-
}, Hn.value = Gt.value["local-cache"][sn()] ? "local-cache" : "local-seed", tt.value = $e.value,
|
|
5281
|
+
}, Hn.value = Gt.value["local-cache"][sn()] ? "local-cache" : "local-seed", tt.value = $e.value, re("annotations", Ae.source, "idle"), re("pageDescriptions", Y.source, "idle"), re("flows", $e.source, "idle"), Kt.value = ((_e = tt.value[0]) == null ? void 0 : _e.id) ?? "", ln.value ? await ua(!1) : yn.value = De.unavailableReason, Kn(), hu.value = !0;
|
|
5275
5282
|
}
|
|
5276
5283
|
ze([Te, Ct], () => {
|
|
5277
5284
|
var e;
|
|
5278
|
-
(e =
|
|
5285
|
+
(e = Ft()) == null || e.setItem(il, JSON.stringify({ version: 2, selectedThemeId: Ct.value, ...Te.value }));
|
|
5279
5286
|
}, { deep: !0 });
|
|
5280
5287
|
ze(Dt, (e) => {
|
|
5281
5288
|
var n;
|
|
5282
|
-
e.trim() && ((n =
|
|
5289
|
+
e.trim() && ((n = Ft()) == null || n.setItem(cu, e.trim()));
|
|
5283
5290
|
});
|
|
5284
5291
|
ze([ft, St], () => {
|
|
5285
5292
|
Kn(), ln.value && (Rl(!1), Ol(!1));
|
|
5286
5293
|
});
|
|
5287
5294
|
function ga(e, n, o) {
|
|
5288
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), r =
|
|
5295
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), r = j(e, n), d = bn.value ?? {
|
|
5289
5296
|
projectId: De.projectId,
|
|
5290
5297
|
updatedAt: s,
|
|
5291
5298
|
scopes: {},
|
|
@@ -5299,7 +5306,7 @@ function ga(e, n, o) {
|
|
|
5299
5306
|
d.screens = { ...d.screens, [e]: { count: g, updatedAt: s } }, d.updatedAt = s, bn.value = d;
|
|
5300
5307
|
}
|
|
5301
5308
|
function ha(e, n, o, s, r) {
|
|
5302
|
-
const d = (/* @__PURE__ */ new Date()).toISOString(), g =
|
|
5309
|
+
const d = (/* @__PURE__ */ new Date()).toISOString(), g = j(e, n), h = ht.value ?? {
|
|
5303
5310
|
projectId: De.projectId,
|
|
5304
5311
|
updatedAt: d,
|
|
5305
5312
|
scopes: {},
|
|
@@ -5316,15 +5323,15 @@ function ha(e, n, o, s, r) {
|
|
|
5316
5323
|
h.screens = { ...h.screens, [e]: { count: b, updatedAt: d } }, h.updatedAt = d, ht.value = h;
|
|
5317
5324
|
}
|
|
5318
5325
|
async function Ay(e, n = ps(e, St.value), o = !1) {
|
|
5319
|
-
const s = await al(
|
|
5326
|
+
const s = await al(j(e, n));
|
|
5320
5327
|
if (!s) return !1;
|
|
5321
|
-
const r =
|
|
5328
|
+
const r = j(e, n);
|
|
5322
5329
|
Pl("annotations", s.sha, o, "注释", r);
|
|
5323
|
-
const d = ra(s.value).map((b) => ({ ...b, screenId: e, stateId: n })), g = [...
|
|
5324
|
-
return ot("annotations", r, d, s.sha, h, "synced"),
|
|
5330
|
+
const d = ra(s.value).map((b) => ({ ...b, screenId: e, stateId: n })), g = [...ie.value.filter((b) => j(b.screenId, b.stateId) !== r), ...d], h = (/* @__PURE__ */ new Date()).toISOString();
|
|
5331
|
+
return ot("annotations", r, d, s.sha, h, "synced"), ie.value = g, ga(e, n, d.length), re("annotations", "gitee", "success", s.legacy ? "已读取主分支旧目录" : "", h), !0;
|
|
5325
5332
|
}
|
|
5326
5333
|
async function Ey(e = !1) {
|
|
5327
|
-
const n = ft.value, o = St.value, s =
|
|
5334
|
+
const n = ft.value, o = St.value, s = j(n, o), r = await _r(j(n, o));
|
|
5328
5335
|
if (!r) return !1;
|
|
5329
5336
|
Pl("pageDescriptions", r.sha, e, "页面描述", s);
|
|
5330
5337
|
const d = Ln([{ ...r.value, screenId: n, stateId: o }])[0];
|
|
@@ -5333,10 +5340,10 @@ async function Ey(e = !1) {
|
|
|
5333
5340
|
Bt("gitee", s, d);
|
|
5334
5341
|
const h = ut("pageDescriptions").scopes[s];
|
|
5335
5342
|
if ((h == null ? void 0 : h.status) === "pending")
|
|
5336
|
-
|
|
5343
|
+
re("pageDescriptions", "local-cache", "idle", "已读取 Gitee,本地缓存仍有待推送修改", g);
|
|
5337
5344
|
else {
|
|
5338
|
-
const b = [...Ze.value.filter((I) =>
|
|
5339
|
-
ot("pageDescriptions", s, d, r.sha, g, "synced"), Bt("local-cache", s, d), Ze.value = b, ha(n, o, 1, d.highlighted, d.highlightColor), gu.value || (Hn.value = "gitee"),
|
|
5345
|
+
const b = [...Ze.value.filter((I) => j(I.screenId, I.stateId) !== s), d];
|
|
5346
|
+
ot("pageDescriptions", s, d, r.sha, g, "synced"), Bt("local-cache", s, d), Ze.value = b, ha(n, o, 1, d.highlighted, d.highlightColor), gu.value || (Hn.value = "gitee"), re("pageDescriptions", "gitee", "success", r.legacy ? "已读取主分支旧目录" : "", g);
|
|
5340
5347
|
}
|
|
5341
5348
|
return s === sn() && Kn(), !0;
|
|
5342
5349
|
}
|
|
@@ -5344,23 +5351,23 @@ async function Rl(e = !1) {
|
|
|
5344
5351
|
var n;
|
|
5345
5352
|
if (ln.value) {
|
|
5346
5353
|
if (pa(e, ls.value.annotations)) {
|
|
5347
|
-
|
|
5354
|
+
re("annotations", Ue.value.annotations.source, "idle", "检测到本地编辑,已暂缓轮询覆盖");
|
|
5348
5355
|
return;
|
|
5349
5356
|
}
|
|
5350
|
-
gn.value = "syncing",
|
|
5357
|
+
gn.value = "syncing", re("annotations", Ue.value.annotations.source, "syncing");
|
|
5351
5358
|
try {
|
|
5352
5359
|
const o = await Sv();
|
|
5353
5360
|
bn.value = (o == null ? void 0 : o.value) ?? bn.value;
|
|
5354
|
-
const s = await Ay(ft.value, St.value, e), r =
|
|
5361
|
+
const s = await Ay(ft.value, St.value, e), r = j(ft.value, St.value);
|
|
5355
5362
|
if (!s && !((n = o == null ? void 0 : o.value.scopes) != null && n[r])) {
|
|
5356
|
-
const d =
|
|
5357
|
-
gl("annotations", r),
|
|
5363
|
+
const d = ie.value.filter((h) => j(h.screenId, h.stateId) !== r), g = (/* @__PURE__ */ new Date()).toISOString();
|
|
5364
|
+
gl("annotations", r), ie.value = d, re("annotations", "gitee", "success", "", g);
|
|
5358
5365
|
} else if (!s)
|
|
5359
5366
|
throw new Error("Gitee 当前注释文件不存在");
|
|
5360
5367
|
gn.value = "success", yn.value = "注释已同步";
|
|
5361
5368
|
} catch (o) {
|
|
5362
5369
|
const s = sn(), r = ut("annotations").scopes[s];
|
|
5363
|
-
r && ot("annotations", s, r.value, r.revision, r.lastRemoteSyncAt, "stale", o instanceof Error ? o.message : "注释同步失败"), gn.value = "error", yn.value = "注释同步失败",
|
|
5370
|
+
r && ot("annotations", s, r.value, r.revision, r.lastRemoteSyncAt, "stale", o instanceof Error ? o.message : "注释同步失败"), gn.value = "error", yn.value = "注释同步失败", re("annotations", Ue.value.annotations.source, "error", o instanceof Error ? o.message : "注释同步失败");
|
|
5364
5371
|
}
|
|
5365
5372
|
}
|
|
5366
5373
|
}
|
|
@@ -5368,10 +5375,10 @@ async function Ol(e = !1) {
|
|
|
5368
5375
|
var n;
|
|
5369
5376
|
if (ln.value) {
|
|
5370
5377
|
if (pa(e, ls.value.pageDescriptions)) {
|
|
5371
|
-
|
|
5378
|
+
re("pageDescriptions", Ue.value.pageDescriptions.source, "idle", "检测到本地编辑,已暂缓轮询覆盖");
|
|
5372
5379
|
return;
|
|
5373
5380
|
}
|
|
5374
|
-
gn.value = "syncing",
|
|
5381
|
+
gn.value = "syncing", re("pageDescriptions", Ue.value.pageDescriptions.source, "syncing");
|
|
5375
5382
|
try {
|
|
5376
5383
|
const o = await $r();
|
|
5377
5384
|
ht.value = (o == null ? void 0 : o.value) ?? ht.value;
|
|
@@ -5379,12 +5386,12 @@ async function Ol(e = !1) {
|
|
|
5379
5386
|
if (!s && !((n = o == null ? void 0 : o.value.scopes) != null && n[r])) {
|
|
5380
5387
|
Bt("gitee", r, null);
|
|
5381
5388
|
const d = ut("pageDescriptions").scopes[r];
|
|
5382
|
-
(d == null ? void 0 : d.status) === "pending" ?
|
|
5389
|
+
(d == null ? void 0 : d.status) === "pending" ? re("pageDescriptions", "local-cache", "idle", "Gitee 当前 Scope 不存在,本地缓存待推送") : (gl("pageDescriptions", r), Bt("local-cache", r, null), Ze.value = Ze.value.filter((g) => j(g.screenId, g.stateId) !== r), re("pageDescriptions", "gitee", "success", "", (/* @__PURE__ */ new Date()).toISOString())), Kn();
|
|
5383
5390
|
} else if (!s) throw new Error("Gitee 当前页面描述不存在");
|
|
5384
|
-
gn.value = "success", yn.value =
|
|
5391
|
+
gn.value = "success", yn.value = Ue.value.pageDescriptions.source === "local-cache" ? "已读取 Gitee,本地缓存待推送" : "页面说明已同步";
|
|
5385
5392
|
} catch (o) {
|
|
5386
5393
|
const s = sn(), r = ut("pageDescriptions").scopes[s];
|
|
5387
|
-
r && ot("pageDescriptions", s, r.value, r.revision, r.lastRemoteSyncAt, r.status === "pending" ? "pending" : "stale", o instanceof Error ? o.message : "页面描述同步失败"), gn.value = "error", yn.value = "页面说明同步失败",
|
|
5394
|
+
r && ot("pageDescriptions", s, r.value, r.revision, r.lastRemoteSyncAt, r.status === "pending" ? "pending" : "stale", o instanceof Error ? o.message : "页面描述同步失败"), gn.value = "error", yn.value = "页面说明同步失败", re("pageDescriptions", Ue.value.pageDescriptions.source, "error", o instanceof Error ? o.message : "页面描述同步失败");
|
|
5388
5395
|
}
|
|
5389
5396
|
}
|
|
5390
5397
|
}
|
|
@@ -5392,23 +5399,23 @@ async function Eu(e = !1) {
|
|
|
5392
5399
|
var n, o, s, r;
|
|
5393
5400
|
if (ln.value) {
|
|
5394
5401
|
if (bu.value) {
|
|
5395
|
-
tt.value = ((n = en("flows")) == null ? void 0 : n.value) ?? tt.value,
|
|
5402
|
+
tt.value = ((n = en("flows")) == null ? void 0 : n.value) ?? tt.value, re("flows", "local-cache", "idle", "存在未推送到 Gitee 的本地流程");
|
|
5396
5403
|
return;
|
|
5397
5404
|
}
|
|
5398
5405
|
if (pa(e, ls.value.flows)) {
|
|
5399
|
-
|
|
5406
|
+
re("flows", Ue.value.flows.source, "idle", "检测到流程编辑,已暂缓轮询覆盖");
|
|
5400
5407
|
return;
|
|
5401
5408
|
}
|
|
5402
|
-
|
|
5409
|
+
re("flows", Ue.value.flows.source, "syncing");
|
|
5403
5410
|
try {
|
|
5404
5411
|
const d = await $v(), g = Array.isArray((o = d == null ? void 0 : d.value) == null ? void 0 : o.flows) ? d.value.flows : null;
|
|
5405
5412
|
if (!d || !g) throw new Error("Gitee 流程文件不存在");
|
|
5406
5413
|
Pl("flows", d.sha, e, "流程");
|
|
5407
5414
|
const h = (/* @__PURE__ */ new Date()).toISOString();
|
|
5408
|
-
tn("flows", g, d.sha, h, "synced"), tt.value = ((s = en("flows")) == null ? void 0 : s.value) ?? g, tt.value.some((b) => b.id === Kt.value) || (Kt.value = ((r = tt.value[0]) == null ? void 0 : r.id) ?? ""),
|
|
5415
|
+
tn("flows", g, d.sha, h, "synced"), tt.value = ((s = en("flows")) == null ? void 0 : s.value) ?? g, tt.value.some((b) => b.id === Kt.value) || (Kt.value = ((r = tt.value[0]) == null ? void 0 : r.id) ?? ""), re("flows", "gitee", "success", "", h);
|
|
5409
5416
|
} catch (d) {
|
|
5410
5417
|
const g = en("flows");
|
|
5411
|
-
g && tn("flows", g.value, g.revision, g.lastRemoteSyncAt, "stale", d instanceof Error ? d.message : "流程同步失败"),
|
|
5418
|
+
g && tn("flows", g.value, g.revision, g.lastRemoteSyncAt, "stale", d instanceof Error ? d.message : "流程同步失败"), re("flows", Ue.value.flows.source, "error", d instanceof Error ? d.message : "流程同步失败");
|
|
5412
5419
|
}
|
|
5413
5420
|
}
|
|
5414
5421
|
}
|
|
@@ -5416,9 +5423,9 @@ async function ua(e = !1) {
|
|
|
5416
5423
|
await Promise.all([Rl(e), Ol(e), Eu(e)]);
|
|
5417
5424
|
}
|
|
5418
5425
|
function nr(e) {
|
|
5419
|
-
const n = (/* @__PURE__ */ new Date()).toISOString(), o = e === "annotations" ?
|
|
5426
|
+
const n = (/* @__PURE__ */ new Date()).toISOString(), o = e === "annotations" ? ie.value : Ze.value, s = /* @__PURE__ */ new Map();
|
|
5420
5427
|
o.forEach((g) => {
|
|
5421
|
-
const h =
|
|
5428
|
+
const h = j(g.screenId, g.stateId), b = s.get(h), I = e === "pageDescriptions" && g.highlighted === !0;
|
|
5422
5429
|
s.set(h, {
|
|
5423
5430
|
screenId: g.screenId,
|
|
5424
5431
|
count: ((b == null ? void 0 : b.count) ?? 0) + 1,
|
|
@@ -5446,11 +5453,11 @@ async function Ty() {
|
|
|
5446
5453
|
return;
|
|
5447
5454
|
}
|
|
5448
5455
|
const n = [], o = /* @__PURE__ */ new Map();
|
|
5449
|
-
|
|
5450
|
-
const d =
|
|
5456
|
+
ie.value.forEach((r) => {
|
|
5457
|
+
const d = j(r.screenId, r.stateId);
|
|
5451
5458
|
o.set(d, [...o.get(d) ?? [], r]);
|
|
5452
5459
|
}), o.forEach((r, d) => n.push({ label: `注释:${d}`, run: () => On("annotations", d, r, e) })), n.push({ label: "注释索引", run: () => On("annotations", void 0, nr("annotations"), e) }), Ze.value.forEach((r) => {
|
|
5453
|
-
const d =
|
|
5460
|
+
const d = j(r.screenId, r.stateId);
|
|
5454
5461
|
n.push({ label: `页面描述:${d}`, run: () => On("pageDescriptions", d, r, e) });
|
|
5455
5462
|
}), n.push({ label: "页面描述索引", run: () => On("pageDescriptions", void 0, nr("pageDescriptions"), e) }), n.push({ label: "流程", run: () => On("flows", void 0, { version: "1.0.0", flows: tt.value }, e) }), it.value = { current: 0, total: n.length + 1, label: "" };
|
|
5456
5463
|
const s = { created: 0, unchanged: 0, protected: 0, failed: 0 };
|
|
@@ -5491,26 +5498,26 @@ function Ry(e, n) {
|
|
|
5491
5498
|
featureDescription: "",
|
|
5492
5499
|
specialNote: "",
|
|
5493
5500
|
color: la.value.ocean
|
|
5494
|
-
},
|
|
5501
|
+
}, jn.value = { featureName: "", featureDescription: "", specialNote: "", color: la.value.ocean }, ds.value = "create";
|
|
5495
5502
|
}
|
|
5496
5503
|
async function ya(e, n, o, s) {
|
|
5497
5504
|
if (!ln.value) return null;
|
|
5498
5505
|
try {
|
|
5499
|
-
const r = await Cv(
|
|
5506
|
+
const r = await Cv(j(e, n), Dt.value.trim() || "未署名", o, s);
|
|
5500
5507
|
if (!r) return null;
|
|
5501
5508
|
const d = ra(r.value).map((b) => ({ ...b, screenId: e, stateId: n }));
|
|
5502
5509
|
ga(e, n, d.length);
|
|
5503
|
-
const g = (/* @__PURE__ */ new Date()).toISOString(), h = [...
|
|
5504
|
-
if (ot("annotations",
|
|
5510
|
+
const g = (/* @__PURE__ */ new Date()).toISOString(), h = [...ie.value.filter((b) => j(b.screenId, b.stateId) !== j(e, n)), ...d];
|
|
5511
|
+
if (ot("annotations", j(e, n), d, r.sha, g, "synced"), ie.value = h, bn.value)
|
|
5505
5512
|
try {
|
|
5506
|
-
await kv(bn.value, Dt.value.trim() || "未署名",
|
|
5513
|
+
await kv(bn.value, Dt.value.trim() || "未署名", j(e, n));
|
|
5507
5514
|
} catch (b) {
|
|
5508
|
-
return
|
|
5515
|
+
return re("annotations", "gitee", "error", `注释已保存,但索引同步失败:${b instanceof Error ? b.message : "未知错误"}`, g), d;
|
|
5509
5516
|
}
|
|
5510
|
-
return
|
|
5517
|
+
return re("annotations", "gitee", "success", "", g), d;
|
|
5511
5518
|
} catch (r) {
|
|
5512
5519
|
const d = r instanceof Error ? r.message : "注释保存失败";
|
|
5513
|
-
r instanceof Cn ? Dl("annotations", d) :
|
|
5520
|
+
r instanceof Cn ? Dl("annotations", d) : re("annotations", Ue.value.annotations.source, "error", d);
|
|
5514
5521
|
return;
|
|
5515
5522
|
}
|
|
5516
5523
|
}
|
|
@@ -5528,11 +5535,11 @@ async function Oy() {
|
|
|
5528
5535
|
createdAt: n,
|
|
5529
5536
|
updatedAt: n
|
|
5530
5537
|
}, s = await ya(e.screenId, e.stateId, "新增", (r) => [...r, o]);
|
|
5531
|
-
s !== void 0 && (s ?
|
|
5538
|
+
s !== void 0 && (s ? ie.value = [...ie.value.filter((r) => j(r.screenId, r.stateId) !== j(e.screenId, e.stateId)), ...s] : (ie.value = [...ie.value, o], ga(e.screenId, e.stateId, pl.value.length), ot("annotations", j(e.screenId, e.stateId), pl.value, null, null, "pending"), re("annotations", "local-cache", "success", De.unavailableReason)), Tu());
|
|
5532
5539
|
}
|
|
5533
5540
|
function By(e) {
|
|
5534
|
-
const n =
|
|
5535
|
-
n && ($l.value = e,
|
|
5541
|
+
const n = ie.value.find((o) => o.id === e);
|
|
5542
|
+
n && ($l.value = e, jn.value = {
|
|
5536
5543
|
featureName: n.featureName,
|
|
5537
5544
|
featureDescription: n.featureDescription,
|
|
5538
5545
|
specialNote: n.specialNote,
|
|
@@ -5542,22 +5549,22 @@ function By(e) {
|
|
|
5542
5549
|
function Nu() {
|
|
5543
5550
|
$l.value = "", ds.value = "view";
|
|
5544
5551
|
}
|
|
5545
|
-
async function
|
|
5552
|
+
async function Uy() {
|
|
5546
5553
|
const e = Au.value;
|
|
5547
5554
|
if (!e) return;
|
|
5548
5555
|
const n = (/* @__PURE__ */ new Date()).toISOString(), o = (r) => r.id === e.id ? {
|
|
5549
5556
|
...r,
|
|
5550
|
-
featureName:
|
|
5551
|
-
featureDescription:
|
|
5552
|
-
specialNote:
|
|
5553
|
-
color: ms(
|
|
5557
|
+
featureName: jn.value.featureName.trim() || r.featureName,
|
|
5558
|
+
featureDescription: jn.value.featureDescription.trim() || r.featureDescription,
|
|
5559
|
+
specialNote: jn.value.specialNote.trim(),
|
|
5560
|
+
color: ms(jn.value.color) ?? r.color,
|
|
5554
5561
|
authorName: Dt.value.trim() || r.authorName,
|
|
5555
5562
|
updatedAt: n
|
|
5556
5563
|
} : r, s = await ya(e.screenId, e.stateId, "编辑", (r) => r.map(o));
|
|
5557
|
-
s !== void 0 && (
|
|
5564
|
+
s !== void 0 && (ie.value = s ? [...ie.value.filter((r) => j(r.screenId, r.stateId) !== j(e.screenId, e.stateId)), ...s] : ie.value.map(o), s === null && ot("annotations", j(e.screenId, e.stateId), ie.value.filter((r) => j(r.screenId, r.stateId) === j(e.screenId, e.stateId)), null, null, "pending"), Nu());
|
|
5558
5565
|
}
|
|
5559
|
-
async function
|
|
5560
|
-
const s =
|
|
5566
|
+
async function jy(e, n, o) {
|
|
5567
|
+
const s = ie.value.find((b) => b.id === e);
|
|
5561
5568
|
if (!s) return !1;
|
|
5562
5569
|
const r = (/* @__PURE__ */ new Date()).toISOString(), d = (b) => b.id === e ? {
|
|
5563
5570
|
...b,
|
|
@@ -5571,21 +5578,21 @@ async function Uy(e, n, o) {
|
|
|
5571
5578
|
"编辑",
|
|
5572
5579
|
(b) => b.some((I) => I.id === e) ? b.map(d) : [...b, g]
|
|
5573
5580
|
);
|
|
5574
|
-
return h === void 0 ? !1 : (
|
|
5581
|
+
return h === void 0 ? !1 : (ie.value = h ? [...ie.value.filter((b) => j(b.screenId, b.stateId) !== j(s.screenId, s.stateId)), ...h] : ie.value.map(d), h === null && ot("annotations", j(s.screenId, s.stateId), ie.value.filter((b) => j(b.screenId, b.stateId) === j(s.screenId, s.stateId)), null, null, "pending"), !0);
|
|
5575
5582
|
}
|
|
5576
5583
|
async function My(e) {
|
|
5577
|
-
const n =
|
|
5584
|
+
const n = ie.value.find((s) => s.id === e);
|
|
5578
5585
|
if (!n) return;
|
|
5579
5586
|
const o = await ya(n.screenId, n.stateId, "删除", (s) => s.filter((r) => r.id !== e));
|
|
5580
|
-
o !== void 0 && (
|
|
5587
|
+
o !== void 0 && (ie.value = o ? [...ie.value.filter((s) => j(s.screenId, s.stateId) !== j(n.screenId, n.stateId)), ...o] : ie.value.filter((s) => s.id !== e), o === null && ot("annotations", j(n.screenId, n.stateId), ie.value.filter((s) => j(s.screenId, s.stateId) === j(n.screenId, n.stateId)), null, null, "pending"), ga(n.screenId, n.stateId, ie.value.filter((s) => j(s.screenId, s.stateId) === j(n.screenId, n.stateId)).length));
|
|
5581
5588
|
}
|
|
5582
|
-
function
|
|
5589
|
+
function Vy(e) {
|
|
5583
5590
|
is.value && window.clearTimeout(is.value), ma.value = e;
|
|
5584
5591
|
}
|
|
5585
5592
|
function Ly() {
|
|
5586
5593
|
is.value && window.clearTimeout(is.value);
|
|
5587
5594
|
}
|
|
5588
|
-
function
|
|
5595
|
+
function Fy() {
|
|
5589
5596
|
is.value = window.setTimeout(() => {
|
|
5590
5597
|
ma.value = "";
|
|
5591
5598
|
}, 160);
|
|
@@ -5595,12 +5602,12 @@ function Ru(e) {
|
|
|
5595
5602
|
var s, r, d;
|
|
5596
5603
|
return (d = (r = (s = bn.value) == null ? void 0 : s.scopes) == null ? void 0 : r[o]) == null ? void 0 : d.count;
|
|
5597
5604
|
});
|
|
5598
|
-
return n.some((o) => typeof o == "number") ? n.reduce((o, s) => o + (s ?? 0), 0) :
|
|
5605
|
+
return n.some((o) => typeof o == "number") ? n.reduce((o, s) => o + (s ?? 0), 0) : ie.value.filter((o) => o.screenId === e).length;
|
|
5599
5606
|
}
|
|
5600
5607
|
function fl(e, n) {
|
|
5601
5608
|
var s, r, d;
|
|
5602
|
-
const o =
|
|
5603
|
-
return ((d = (r = (s = bn.value) == null ? void 0 : s.scopes) == null ? void 0 : r[o]) == null ? void 0 : d.count) ??
|
|
5609
|
+
const o = j(e, n);
|
|
5610
|
+
return ((d = (r = (s = bn.value) == null ? void 0 : s.scopes) == null ? void 0 : r[o]) == null ? void 0 : d.count) ?? ie.value.filter((g) => j(g.screenId, g.stateId) === o).length;
|
|
5604
5611
|
}
|
|
5605
5612
|
function Bl() {
|
|
5606
5613
|
const e = ft.value, n = St.value, o = (/* @__PURE__ */ new Date()).toISOString(), s = Nl.value;
|
|
@@ -5613,14 +5620,14 @@ function Bl() {
|
|
|
5613
5620
|
updatedAt: o
|
|
5614
5621
|
};
|
|
5615
5622
|
}
|
|
5616
|
-
function
|
|
5617
|
-
const e = Bl(), n =
|
|
5618
|
-
return ot("pageDescriptions", n, e, (o == null ? void 0 : o.revision) ?? null, (o == null ? void 0 : o.lastRemoteSyncAt) ?? null, "pending"), Bt("local-cache", n, e), Ze.value = [...Ze.value.filter((s) =>
|
|
5623
|
+
function Ul() {
|
|
5624
|
+
const e = Bl(), n = j(e.screenId, e.stateId), o = ut("pageDescriptions").scopes[n];
|
|
5625
|
+
return ot("pageDescriptions", n, e, (o == null ? void 0 : o.revision) ?? null, (o == null ? void 0 : o.lastRemoteSyncAt) ?? null, "pending"), Bt("local-cache", n, e), Ze.value = [...Ze.value.filter((s) => j(s.screenId, s.stateId) !== n), e], ha(e.screenId, e.stateId, 1, e.highlighted, e.highlightColor), re("pageDescriptions", "local-cache", "success", "页面描述已保存到本地缓存,尚未推送 Gitee"), !0;
|
|
5619
5626
|
}
|
|
5620
5627
|
async function Ou(e) {
|
|
5621
5628
|
if (!De.remoteWritable)
|
|
5622
|
-
return
|
|
5623
|
-
const n =
|
|
5629
|
+
return re("pageDescriptions", Hn.value, "error", De.unavailableReason || "Gitee 当前不可写"), !1;
|
|
5630
|
+
const n = j(e.screenId, e.stateId);
|
|
5624
5631
|
try {
|
|
5625
5632
|
const o = await Pr(n, e.authorName ?? "未署名", e);
|
|
5626
5633
|
if (!o || (ha(e.screenId, e.stateId, 1, e.highlighted, e.highlightColor), !ht.value)) return !1;
|
|
@@ -5629,24 +5636,24 @@ async function Ou(e) {
|
|
|
5629
5636
|
const r = Ln([{ ...o.value, screenId: e.screenId, stateId: e.stateId }])[0];
|
|
5630
5637
|
if (!r) throw new Error(`页面描述 ${n} 回读内容无效`);
|
|
5631
5638
|
const d = (/* @__PURE__ */ new Date()).toISOString();
|
|
5632
|
-
return ot("pageDescriptions", n, r, o.sha, d, "synced"), Bt("gitee", n, r), Bt("local-cache", n, r), Ze.value = [...Ze.value.filter((g) =>
|
|
5639
|
+
return ot("pageDescriptions", n, r, o.sha, d, "synced"), Bt("gitee", n, r), Bt("local-cache", n, r), Ze.value = [...Ze.value.filter((g) => j(g.screenId, g.stateId) !== n), r], ht.value = s.value, re("pageDescriptions", "gitee", "success", "", d), !0;
|
|
5633
5640
|
} catch (o) {
|
|
5634
5641
|
const s = o instanceof Error ? o.message : "页面描述保存失败";
|
|
5635
|
-
return o instanceof Cn ? Dl("pageDescriptions", s) :
|
|
5642
|
+
return o instanceof Cn ? Dl("pageDescriptions", s) : re("pageDescriptions", Ue.value.pageDescriptions.source, "error", s), !1;
|
|
5636
5643
|
}
|
|
5637
5644
|
}
|
|
5638
5645
|
async function Gy() {
|
|
5639
5646
|
const e = Bl();
|
|
5640
|
-
return ln.value ? Ou(e) :
|
|
5647
|
+
return ln.value ? Ou(e) : Ul();
|
|
5641
5648
|
}
|
|
5642
5649
|
async function zy(e) {
|
|
5643
5650
|
if (e === "gitee") return !1;
|
|
5644
5651
|
if (!De.remoteWritable)
|
|
5645
|
-
return
|
|
5652
|
+
return re("pageDescriptions", e, "error", De.unavailableReason || "Gitee 当前不可写"), !1;
|
|
5646
5653
|
const n = sn(), o = e === "local-cache" ? Bl() : Gt.value[e][n];
|
|
5647
5654
|
if (!o)
|
|
5648
|
-
return
|
|
5649
|
-
e === "local-cache" &&
|
|
5655
|
+
return re("pageDescriptions", e, "error", `${e === "local-cache" ? "本地缓存" : "JSON"} 当前 Scope 不存在页面描述`), !1;
|
|
5656
|
+
e === "local-cache" && Ul();
|
|
5650
5657
|
const s = await Ou(o);
|
|
5651
5658
|
return s && (Hn.value = "gitee", Kn()), s;
|
|
5652
5659
|
}
|
|
@@ -5656,7 +5663,7 @@ async function Bu(e = {}) {
|
|
|
5656
5663
|
const n = Ln(await ea("page-descriptions.json", []));
|
|
5657
5664
|
if (!n.length) throw new Error("page-descriptions.json 未包含有效页面描述");
|
|
5658
5665
|
Gt.value = { ...Gt.value, "local-seed": vl(n) };
|
|
5659
|
-
const o = [...new Set(((me = e.scopeIds) == null ? void 0 : me.map((Z) => Z.trim()).filter(Boolean)) ?? [])], s = new Map(n.map((Z) => [
|
|
5666
|
+
const o = [...new Set(((me = e.scopeIds) == null ? void 0 : me.map((Z) => Z.trim()).filter(Boolean)) ?? [])], s = new Map(n.map((Z) => [j(Z.screenId, Z.stateId), Z])), r = o.filter((Z) => !s.has(Z));
|
|
5660
5667
|
if (r.length) throw new Error(`page-descriptions.json 未找到 Scope:${r.join(", ")}`);
|
|
5661
5668
|
const d = o.length ? o.map((Z) => s.get(Z)) : [...s.values()], g = await $r();
|
|
5662
5669
|
ht.value = (g == null ? void 0 : g.value) ?? {
|
|
@@ -5667,12 +5674,12 @@ async function Bu(e = {}) {
|
|
|
5667
5674
|
};
|
|
5668
5675
|
const h = [], b = [], I = [];
|
|
5669
5676
|
for (const Z of d) {
|
|
5670
|
-
const ae =
|
|
5677
|
+
const ae = j(Z.screenId, Z.stateId), B = ((oe = Z.authorName) == null ? void 0 : oe.trim()) || Dt.value.trim() || "AI";
|
|
5671
5678
|
try {
|
|
5672
5679
|
const ke = await _r(ae), we = ke ? Ln([{ ...ke.value, screenId: Z.screenId, stateId: Z.stateId }])[0] : void 0;
|
|
5673
5680
|
if (ke && we && hr(we, Z)) {
|
|
5674
5681
|
const H = (/* @__PURE__ */ new Date()).toISOString();
|
|
5675
|
-
ot("pageDescriptions", ae, we, ke.sha, H, "synced"), Bt("gitee", ae, we), Bt("local-cache", ae, we), Ze.value = [...Ze.value.filter((rt) =>
|
|
5682
|
+
ot("pageDescriptions", ae, we, ke.sha, H, "synced"), Bt("gitee", ae, we), Bt("local-cache", ae, we), Ze.value = [...Ze.value.filter((rt) => j(rt.screenId, rt.stateId) !== ae), we], b.push(ae);
|
|
5676
5683
|
continue;
|
|
5677
5684
|
}
|
|
5678
5685
|
const Ae = await Pr(ae, B, Z);
|
|
@@ -5680,20 +5687,20 @@ async function Bu(e = {}) {
|
|
|
5680
5687
|
const Y = Ln([{ ...Ae.value, screenId: Z.screenId, stateId: Z.stateId }])[0];
|
|
5681
5688
|
if (!Y) throw new Error(`页面描述 ${ae} 回读内容无效`);
|
|
5682
5689
|
const $e = (/* @__PURE__ */ new Date()).toISOString();
|
|
5683
|
-
if (ot("pageDescriptions", ae, Y, Ae.sha, $e, "synced"), Bt("gitee", ae, Y), Bt("local-cache", ae, Y), Ze.value = [...Ze.value.filter((H) =>
|
|
5684
|
-
const
|
|
5685
|
-
if (!
|
|
5686
|
-
ht.value =
|
|
5690
|
+
if (ot("pageDescriptions", ae, Y, Ae.sha, $e, "synced"), Bt("gitee", ae, Y), Bt("local-cache", ae, Y), Ze.value = [...Ze.value.filter((H) => j(H.screenId, H.stateId) !== ae), Y], ha(Y.screenId, Y.stateId, 1, Y.highlighted, Y.highlightColor), !ht.value) throw new Error("页面描述索引未初始化");
|
|
5691
|
+
const je = await Dr(ht.value, B, ae);
|
|
5692
|
+
if (!je) throw new Error(`页面描述 ${ae} 已写入,但 manifest 回读失败`);
|
|
5693
|
+
ht.value = je.value, h.push(ae);
|
|
5687
5694
|
} catch (ke) {
|
|
5688
5695
|
I.push({ scopeId: ae, error: ke instanceof Error ? ke.message : "未知错误" });
|
|
5689
5696
|
}
|
|
5690
5697
|
}
|
|
5691
5698
|
Kn();
|
|
5692
5699
|
const ee = `JSON 同步完成:成功 ${h.length},跳过 ${b.length},失败 ${I.length}`;
|
|
5693
|
-
return
|
|
5700
|
+
return re("pageDescriptions", "gitee", I.length ? "error" : "success", ee, (/* @__PURE__ */ new Date()).toISOString()), { syncedScopes: h, skippedScopes: b, failedScopes: I, total: d.length };
|
|
5694
5701
|
}
|
|
5695
5702
|
function Hy() {
|
|
5696
|
-
const e = new Blob([JSON.stringify(
|
|
5703
|
+
const e = new Blob([JSON.stringify(ie.value, null, 2)], { type: "application/json;charset=utf-8" }), n = document.createElement("a");
|
|
5697
5704
|
n.href = URL.createObjectURL(e), n.download = "annotations.json", n.click(), URL.revokeObjectURL(n.href);
|
|
5698
5705
|
}
|
|
5699
5706
|
function Ky() {
|
|
@@ -5707,7 +5714,7 @@ function Jy() {
|
|
|
5707
5714
|
aa.value = "请输入数字";
|
|
5708
5715
|
return;
|
|
5709
5716
|
}
|
|
5710
|
-
So.value = Math.min(fu, Math.max(vu, e)), sa.value = String(So.value), (n =
|
|
5717
|
+
So.value = Math.min(fu, Math.max(vu, e)), sa.value = String(So.value), (n = Ft()) == null || n.setItem(du, String(So.value)), aa.value = "已保存同步间隔";
|
|
5711
5718
|
}
|
|
5712
5719
|
const Wy = x(() => ({
|
|
5713
5720
|
"--flow-zoom": String(vt.value)
|
|
@@ -5715,10 +5722,10 @@ const Wy = x(() => ({
|
|
|
5715
5722
|
function Xy(e) {
|
|
5716
5723
|
return e === "pc" ? 640 : 393;
|
|
5717
5724
|
}
|
|
5718
|
-
function
|
|
5725
|
+
function jl(e) {
|
|
5719
5726
|
return e === "pc" ? 360 : 902;
|
|
5720
5727
|
}
|
|
5721
|
-
const qy = 88,
|
|
5728
|
+
const qy = 88, Uu = 152, Zy = 260, Qy = x(() => {
|
|
5722
5729
|
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
5723
5730
|
return El.value.forEach((o) => {
|
|
5724
5731
|
const s = o.flowRow ?? 1;
|
|
@@ -5729,10 +5736,10 @@ const qy = 88, ju = 152, Zy = 260, Qy = x(() => {
|
|
|
5729
5736
|
e.set(`${s}-${d.flowCol ?? 1}`, r), r += Xy(d.platform) + qy;
|
|
5730
5737
|
});
|
|
5731
5738
|
}), e;
|
|
5732
|
-
}),
|
|
5739
|
+
}), ju = x(() => {
|
|
5733
5740
|
const e = /* @__PURE__ */ new Map();
|
|
5734
5741
|
return El.value.forEach((n) => {
|
|
5735
|
-
const o = n.flowRow ?? 1, s =
|
|
5742
|
+
const o = n.flowRow ?? 1, s = jl(n.platform);
|
|
5736
5743
|
e.set(o, Math.max(e.get(o) ?? 0, s));
|
|
5737
5744
|
}), e;
|
|
5738
5745
|
}), eb = x(
|
|
@@ -5755,33 +5762,33 @@ function nb(e) {
|
|
|
5755
5762
|
vt.value = Mu(vt.value + e);
|
|
5756
5763
|
}
|
|
5757
5764
|
function ob() {
|
|
5758
|
-
|
|
5765
|
+
Fn.value = 360, Gn.value = 150, vt.value = 0.42;
|
|
5759
5766
|
}
|
|
5760
5767
|
function sb(e) {
|
|
5761
5768
|
const n = e.flowRow ?? 1, o = e.flowCol ?? 1, s = Qy.value.get(`${n}-${o}`) ?? 0;
|
|
5762
5769
|
let r = 0;
|
|
5763
5770
|
for (let d = 1; d < n; d++)
|
|
5764
|
-
r += (
|
|
5771
|
+
r += (ju.value.get(d) ?? jl("mobile")) + Uu;
|
|
5765
5772
|
return {
|
|
5766
|
-
left: `${
|
|
5773
|
+
left: `${Fn.value + (Zy + s) * vt.value}px`,
|
|
5767
5774
|
top: `${Gn.value + r * vt.value}px`
|
|
5768
5775
|
};
|
|
5769
5776
|
}
|
|
5770
5777
|
function ab(e) {
|
|
5771
5778
|
let n = 0;
|
|
5772
5779
|
for (let o = 1; o < e; o++)
|
|
5773
|
-
n += (
|
|
5780
|
+
n += (ju.value.get(o) ?? jl("mobile")) + Uu;
|
|
5774
5781
|
return {
|
|
5775
|
-
left: `${
|
|
5782
|
+
left: `${Fn.value}px`,
|
|
5776
5783
|
top: `${Gn.value + n * vt.value + 24}px`,
|
|
5777
5784
|
transform: `scale(${vt.value})`
|
|
5778
5785
|
};
|
|
5779
5786
|
}
|
|
5780
5787
|
function lb(e) {
|
|
5781
|
-
e.target.closest("button, input, select, textarea, video") || (va.value = !0, es.value = { x: e.clientX, y: e.clientY, panX:
|
|
5788
|
+
e.target.closest("button, input, select, textarea, video") || (va.value = !0, es.value = { x: e.clientX, y: e.clientY, panX: Fn.value, panY: Gn.value });
|
|
5782
5789
|
}
|
|
5783
5790
|
function ib(e) {
|
|
5784
|
-
va.value && (
|
|
5791
|
+
va.value && (Fn.value = es.value.panX + e.clientX - es.value.x, Gn.value = es.value.panY + e.clientY - es.value.y);
|
|
5785
5792
|
}
|
|
5786
5793
|
function rb() {
|
|
5787
5794
|
va.value = !1;
|
|
@@ -5790,29 +5797,29 @@ function ub(e) {
|
|
|
5790
5797
|
e.preventDefault();
|
|
5791
5798
|
const n = Mu(vt.value + (e.deltaY > 0 ? -0.04 : 0.04));
|
|
5792
5799
|
if (n === vt.value) return;
|
|
5793
|
-
const o = e.currentTarget.getBoundingClientRect(), s = e.clientX - o.left, r = e.clientY - o.top, d = (s -
|
|
5794
|
-
vt.value = n,
|
|
5800
|
+
const o = e.currentTarget.getBoundingClientRect(), s = e.clientX - o.left, r = e.clientY - o.top, d = (s - Fn.value) / vt.value, g = (r - Gn.value) / vt.value;
|
|
5801
|
+
vt.value = n, Fn.value = s - d * n, Gn.value = r - g * n;
|
|
5795
5802
|
}
|
|
5796
5803
|
function Mu(e) {
|
|
5797
5804
|
return Math.min(0.9, Math.max(0.25, Number(e.toFixed(2))));
|
|
5798
5805
|
}
|
|
5799
|
-
function
|
|
5806
|
+
function Vu(e) {
|
|
5800
5807
|
var s;
|
|
5801
5808
|
const n = JSON.parse(JSON.stringify(e)), o = en("flows");
|
|
5802
|
-
return tn("flows", n, (o == null ? void 0 : o.revision) ?? null, (o == null ? void 0 : o.lastRemoteSyncAt) ?? null, "pending"), tt.value = n, wu(!0), tt.value.some((r) => r.id === Kt.value) || (Kt.value = ((s = tt.value[0]) == null ? void 0 : s.id) ?? ""),
|
|
5809
|
+
return tn("flows", n, (o == null ? void 0 : o.revision) ?? null, (o == null ? void 0 : o.lastRemoteSyncAt) ?? null, "pending"), tt.value = n, wu(!0), tt.value.some((r) => r.id === Kt.value) || (Kt.value = ((s = tt.value[0]) == null ? void 0 : s.id) ?? ""), re("flows", "local-cache", "success", De.unavailableReason), !0;
|
|
5803
5810
|
}
|
|
5804
5811
|
async function cb(e) {
|
|
5805
5812
|
var o, s;
|
|
5806
5813
|
const n = JSON.parse(JSON.stringify(e));
|
|
5807
|
-
if (
|
|
5814
|
+
if (Vu(n), !yu.value) return !1;
|
|
5808
5815
|
try {
|
|
5809
5816
|
const r = await _v(Dt.value.trim() || "未署名", n), d = Array.isArray((o = r == null ? void 0 : r.value) == null ? void 0 : o.flows) ? r.value.flows : null;
|
|
5810
5817
|
if (!r || !d) return !1;
|
|
5811
5818
|
const g = (/* @__PURE__ */ new Date()).toISOString();
|
|
5812
|
-
return tn("flows", d, r.sha, g, "synced"), tt.value = d, wu(!1), tt.value.some((h) => h.id === Kt.value) || (Kt.value = ((s = tt.value[0]) == null ? void 0 : s.id) ?? ""),
|
|
5819
|
+
return tn("flows", d, r.sha, g, "synced"), tt.value = d, wu(!1), tt.value.some((h) => h.id === Kt.value) || (Kt.value = ((s = tt.value[0]) == null ? void 0 : s.id) ?? ""), re("flows", "gitee", "success", "", g), !0;
|
|
5813
5820
|
} catch (r) {
|
|
5814
5821
|
const d = r instanceof Error ? r.message : "流程推送失败";
|
|
5815
|
-
return r instanceof Cn ? Dl("flows", d) :
|
|
5822
|
+
return r instanceof Cn ? Dl("flows", d) : re("flows", Ue.value.flows.source, "error", d), !1;
|
|
5816
5823
|
}
|
|
5817
5824
|
}
|
|
5818
5825
|
function db(e = tt.value) {
|
|
@@ -5820,14 +5827,14 @@ function db(e = tt.value) {
|
|
|
5820
5827
|
o.href = URL.createObjectURL(n), o.download = "flows.json", o.click(), URL.revokeObjectURL(o.href);
|
|
5821
5828
|
}
|
|
5822
5829
|
function pb() {
|
|
5823
|
-
return { saveFlowsToSession:
|
|
5830
|
+
return { saveFlowsToSession: Vu, pushFlowsToGitee: cb, exportFlows: db };
|
|
5824
5831
|
}
|
|
5825
5832
|
function vb() {
|
|
5826
5833
|
const e = {
|
|
5827
5834
|
...(Za == null ? void 0 : Za({ go: ia, goTab: tr, setPrototypeState: dl })) ?? {},
|
|
5828
5835
|
PanelTop: fr,
|
|
5829
|
-
RotateCcw:
|
|
5830
|
-
SunMedium:
|
|
5836
|
+
RotateCcw: jd,
|
|
5837
|
+
SunMedium: Ud,
|
|
5831
5838
|
themeColorFields: as,
|
|
5832
5839
|
themeDesignColorFields: lu,
|
|
5833
5840
|
themeTypographyFields: iu,
|
|
@@ -5852,7 +5859,7 @@ function vb() {
|
|
|
5852
5859
|
annotationPollingNotice: aa,
|
|
5853
5860
|
collaborationInitialized: hu,
|
|
5854
5861
|
collaborationContext: De,
|
|
5855
|
-
collaborationSources:
|
|
5862
|
+
collaborationSources: Ue,
|
|
5856
5863
|
collaborationSourceLabel: Qh,
|
|
5857
5864
|
collaborationSourceTone: Su,
|
|
5858
5865
|
collaborationSourceDetail: ty,
|
|
@@ -5868,7 +5875,7 @@ function vb() {
|
|
|
5868
5875
|
annotationDraft: cs,
|
|
5869
5876
|
activeAnnotation: Au,
|
|
5870
5877
|
annotationDialogMode: ds,
|
|
5871
|
-
annotationEditor:
|
|
5878
|
+
annotationEditor: jn,
|
|
5872
5879
|
pageDescriptions: Ze,
|
|
5873
5880
|
pageDescriptionManifest: ht,
|
|
5874
5881
|
pageDescriptionSelectedSource: Hn,
|
|
@@ -5926,11 +5933,11 @@ function vb() {
|
|
|
5926
5933
|
saveAnnotationDraft: Oy,
|
|
5927
5934
|
openAnnotationDialog: By,
|
|
5928
5935
|
closeAnnotationDialog: Nu,
|
|
5929
|
-
saveAnnotationEdit:
|
|
5930
|
-
updateAnnotationPosition:
|
|
5936
|
+
saveAnnotationEdit: Uy,
|
|
5937
|
+
updateAnnotationPosition: jy,
|
|
5931
5938
|
keepAnnotationPopover: Ly,
|
|
5932
|
-
scheduleHideAnnotationPopover:
|
|
5933
|
-
showAnnotationPopover:
|
|
5939
|
+
scheduleHideAnnotationPopover: Fy,
|
|
5940
|
+
showAnnotationPopover: Vy,
|
|
5934
5941
|
removeAnnotation: My,
|
|
5935
5942
|
annotationCountByScreen: Ru,
|
|
5936
5943
|
annotationCountByState: fl,
|
|
@@ -5943,7 +5950,7 @@ function vb() {
|
|
|
5943
5950
|
saveAnnotationPollingInterval: Jy,
|
|
5944
5951
|
exportAnnotations: Hy,
|
|
5945
5952
|
saveCurrentPageDescription: Gy,
|
|
5946
|
-
saveCurrentPageDescriptionToCache:
|
|
5953
|
+
saveCurrentPageDescriptionToCache: Ul,
|
|
5947
5954
|
pushPageDescriptionSourceToGitee: zy,
|
|
5948
5955
|
selectPageDescriptionSource: Sy,
|
|
5949
5956
|
syncPageDescriptionsFromJson: Bu,
|
|
@@ -5998,7 +6005,7 @@ const fb = {
|
|
|
5998
6005
|
}, Pb = { class: "top-control-group flex rounded-full bg-panel ring-1 ring-line" }, Db = { class: "top-control-group flex rounded-full bg-panel ring-1 ring-line" }, Ab = { class: "top-control-group relative flex rounded-full bg-panel ring-1 ring-line" }, Eb = {
|
|
5999
6006
|
key: 0,
|
|
6000
6007
|
class: "theme-popover"
|
|
6001
|
-
}, Tb = { class: "flex items-start justify-between gap-3" }, Nb = { class: "flex shrink-0 items-center gap-2" }, Rb = { class: "mt-3 flex flex-wrap gap-2" }, Ob = ["onClick"], Bb = { class: "min-w-0" },
|
|
6008
|
+
}, Tb = { class: "flex items-start justify-between gap-3" }, Nb = { class: "flex shrink-0 items-center gap-2" }, Rb = { class: "mt-3 flex flex-wrap gap-2" }, Ob = ["onClick"], Bb = { class: "min-w-0" }, Ub = { class: "mt-3 flex gap-2" }, jb = { class: "theme-color-grid" }, Mb = ["value", "onInput"], Vb = ["value", "onInput"], Lb = { class: "theme-token-grid" }, Fb = ["value", "onInput"], Gb = { class: "theme-token-grid" }, zb = ["value", "onInput"], Hb = { class: "theme-color-grid" }, Kb = ["value", "onInput"], Jb = ["value", "onInput"], Wb = {
|
|
6002
6009
|
key: 0,
|
|
6003
6010
|
class: "apple-hero-copy"
|
|
6004
6011
|
}, Yb = {
|
|
@@ -6052,16 +6059,16 @@ const fb = {
|
|
|
6052
6059
|
}, A1 = ["disabled"], E1 = {
|
|
6053
6060
|
key: 1,
|
|
6054
6061
|
class: "annotation-panel-actions description-actions"
|
|
6055
|
-
}, T1 = ["disabled"], N1 = { class: "annotation-author-field" }, R1 = ["placeholder"], O1 = { class: "annotation-polling-field" }, B1 = { class: "annotation-polling-control" },
|
|
6062
|
+
}, T1 = ["disabled"], N1 = { class: "annotation-author-field" }, R1 = ["placeholder"], O1 = { class: "annotation-polling-field" }, B1 = { class: "annotation-polling-control" }, U1 = ["disabled"], j1 = {
|
|
6056
6063
|
key: 2,
|
|
6057
6064
|
class: "annotation-polling-notice"
|
|
6058
6065
|
}, M1 = {
|
|
6059
6066
|
key: 3,
|
|
6060
6067
|
class: "annotation-list"
|
|
6061
|
-
},
|
|
6068
|
+
}, V1 = {
|
|
6062
6069
|
key: 0,
|
|
6063
6070
|
class: "annotation-empty"
|
|
6064
|
-
}, L1 = ["onMouseenter"],
|
|
6071
|
+
}, L1 = ["onMouseenter"], F1 = { key: 0 }, G1 = { class: "annotation-list-actions" }, z1 = ["onClick"], H1 = ["disabled", "title", "onClick"], K1 = {
|
|
6065
6072
|
key: 4,
|
|
6066
6073
|
class: "page-description-view"
|
|
6067
6074
|
}, J1 = {
|
|
@@ -6101,10 +6108,10 @@ const fb = {
|
|
|
6101
6108
|
}, xw = ["disabled"], Iw = ["disabled"], $w = { class: "annotation-popover-head" }, _w = ["disabled", "title"], Pw = {
|
|
6102
6109
|
key: 10,
|
|
6103
6110
|
class: "annotation-form-backdrop"
|
|
6104
|
-
}, Dw = ["placeholder"], Aw = ["placeholder"], Ew = ["placeholder"], Tw = { class: "annotation-color-field" }, Nw = { class: "annotation-color-swatches" }, Rw = ["aria-label", "title", "onClick"], Ow = { class: "annotation-custom-color" }, Bw = { key: 0 },
|
|
6111
|
+
}, Dw = ["placeholder"], Aw = ["placeholder"], Ew = ["placeholder"], Tw = { class: "annotation-color-field" }, Nw = { class: "annotation-color-swatches" }, Rw = ["aria-label", "title", "onClick"], Ow = { class: "annotation-custom-color" }, Bw = { key: 0 }, Uw = ["placeholder"], jw = { class: "annotation-form-actions" }, Mw = ["disabled"], Vw = {
|
|
6105
6112
|
key: 11,
|
|
6106
6113
|
class: "annotation-form-backdrop"
|
|
6107
|
-
}, Lw = ["readonly"],
|
|
6114
|
+
}, Lw = ["readonly"], Fw = ["readonly"], Gw = ["readonly"], zw = {
|
|
6108
6115
|
key: 0,
|
|
6109
6116
|
class: "annotation-color-field"
|
|
6110
6117
|
}, Hw = { class: "annotation-color-swatches" }, Kw = ["aria-label", "title", "onClick"], Jw = { class: "annotation-custom-color" }, Ww = { key: 0 }, Yw = { key: 1 }, Xw = ["placeholder"], qw = ["disabled"], Zw = { class: "page-description-summary-dialog" }, Qw = { class: "page-description-summary-head" }, eS = {
|
|
@@ -6139,7 +6146,7 @@ const fb = {
|
|
|
6139
6146
|
}, BS = {
|
|
6140
6147
|
key: 0,
|
|
6141
6148
|
class: "mobile-page-picker-states"
|
|
6142
|
-
},
|
|
6149
|
+
}, US = ["onClick"], lr = "prototype-core-authenticated", Zo = "prototype-core-page-description-summary-sections", Qs = "prototype-core-panel-state-v1", ho = 393, el = 852, jS = 24, tl = 1920, MS = 1080, VS = 640, zS = /* @__PURE__ */ an({
|
|
6143
6150
|
__name: "App",
|
|
6144
6151
|
setup(e) {
|
|
6145
6152
|
var Bi;
|
|
@@ -6164,7 +6171,7 @@ const fb = {
|
|
|
6164
6171
|
annotationSyncLabel: Ae,
|
|
6165
6172
|
annotationAuthorName: Y,
|
|
6166
6173
|
annotationPollingIntervalSeconds: $e,
|
|
6167
|
-
annotationPollingIntervalInput:
|
|
6174
|
+
annotationPollingIntervalInput: je,
|
|
6168
6175
|
annotationPollingNotice: H,
|
|
6169
6176
|
collaborationInitialized: rt,
|
|
6170
6177
|
collaborationContext: ue,
|
|
@@ -6195,10 +6202,10 @@ const fb = {
|
|
|
6195
6202
|
themeStyle: st,
|
|
6196
6203
|
themeLabel: Pe,
|
|
6197
6204
|
themeDescription: At,
|
|
6198
|
-
screens:
|
|
6199
|
-
mainFlows:
|
|
6205
|
+
screens: U,
|
|
6206
|
+
mainFlows: le,
|
|
6200
6207
|
showFlowEditor: Ce,
|
|
6201
|
-
canPushFlowsToRemote:
|
|
6208
|
+
canPushFlowsToRemote: jt,
|
|
6202
6209
|
currentMeta: yt,
|
|
6203
6210
|
currentDisplayScreen: Jt,
|
|
6204
6211
|
currentScreenPlatform: _,
|
|
@@ -6212,7 +6219,7 @@ const fb = {
|
|
|
6212
6219
|
flowGridStyle: Xe,
|
|
6213
6220
|
flowZoomPercent: Oe,
|
|
6214
6221
|
currentScreenAnnotations: Et,
|
|
6215
|
-
currentPageDescription:
|
|
6222
|
+
currentPageDescription: Ve,
|
|
6216
6223
|
isScreenHighlighted: ba,
|
|
6217
6224
|
highlightColorForScreen: gs,
|
|
6218
6225
|
activeScreenHighlightedStateColors: Jn,
|
|
@@ -6249,7 +6256,7 @@ const fb = {
|
|
|
6249
6256
|
refreshPrototypeAnnotations: Ps,
|
|
6250
6257
|
refreshPageDescriptions: y,
|
|
6251
6258
|
refreshAllCollaborationData: p,
|
|
6252
|
-
setCollaborationEditing:
|
|
6259
|
+
setCollaborationEditing: F,
|
|
6253
6260
|
initializeRemoteCollaborationData: m,
|
|
6254
6261
|
saveAnnotationPollingInterval: J,
|
|
6255
6262
|
exportAnnotations: Ee,
|
|
@@ -6263,20 +6270,20 @@ const fb = {
|
|
|
6263
6270
|
stepFlowZoom: Ds,
|
|
6264
6271
|
resetFlowView: Ml,
|
|
6265
6272
|
flowNodeStyle: Lu,
|
|
6266
|
-
flowRowLabelStyle:
|
|
6273
|
+
flowRowLabelStyle: Fu,
|
|
6267
6274
|
startFlowPan: Gu,
|
|
6268
6275
|
moveFlowPan: zu,
|
|
6269
|
-
stopFlowPan:
|
|
6276
|
+
stopFlowPan: Vl,
|
|
6270
6277
|
zoomFlowAtPoint: Hu,
|
|
6271
6278
|
overviewZoom: Yt,
|
|
6272
6279
|
overviewColumns: $n
|
|
6273
6280
|
} = vb(), { saveFlowsToSession: Ku, pushFlowsToGitee: Ju, exportFlows: Wu } = pb(), { unresolvedBugCount: Ll, initializeBugs: Yu } = Hr(), { initializeTestCases: Xu, refreshTestCases: qu, sourceState: Zu } = qr(), Qu = x(
|
|
6274
|
-
() =>
|
|
6281
|
+
() => U.filter((u) => u.platform === "mobile" && u.hasTabBar).map((u) => ({ id: u.id, label: u.title, icon: u.icon }))
|
|
6275
6282
|
), As = {
|
|
6276
6283
|
gitee: "Gitee",
|
|
6277
6284
|
"local-cache": "缓存",
|
|
6278
6285
|
"local-seed": "种子"
|
|
6279
|
-
}, ec = x(() => ue.codeBranch || "未知分支"),
|
|
6286
|
+
}, ec = x(() => ue.codeBranch || "未知分支"), Fl = x(() => Qe.value ? Date.now() - new Date(Qe.value).getTime() < 6e4 ? "刚刚同步" : new Date(Qe.value).toLocaleTimeString("zh-CN", { hour: "2-digit", minute: "2-digit" }) : ""), tc = x(() => Ke.value === "running" ? `${Me.value} · ${L.value.label}` : Ke.value === "success" || Ke.value === "partial" || !ue.remoteWritable || ge.value === "conflict" ? Me.value : [
|
|
6280
6287
|
`注释 ${As[_e.value.annotations.source]}`,
|
|
6281
6288
|
`页面描述 ${As[_e.value.pageDescriptions.source]}`,
|
|
6282
6289
|
`测试用例 ${As[_e.value.testCases.source]}`,
|
|
@@ -6342,9 +6349,9 @@ const fb = {
|
|
|
6342
6349
|
}
|
|
6343
6350
|
Ia(a, u), to.value = "", Dn.value = "已添加并保存到本地";
|
|
6344
6351
|
}
|
|
6345
|
-
const Bo = w(!1),
|
|
6352
|
+
const Bo = w(!1), Uo = w(""), Us = w(/* @__PURE__ */ new Set()), js = w(null), Ms = w(!1), no = w(""), Tt = w(null), oo = w(/* @__PURE__ */ new Set()), Vs = w(null);
|
|
6346
6353
|
let Ls = null;
|
|
6347
|
-
const
|
|
6354
|
+
const jo = /* @__PURE__ */ new Map();
|
|
6348
6355
|
let Le = null, $a = "";
|
|
6349
6356
|
const _t = xo(), mt = (u) => typeof u == "string" ? !!u.trim() : u === !0, _a = x(() => {
|
|
6350
6357
|
var O, Q;
|
|
@@ -6401,7 +6408,7 @@ const fb = {
|
|
|
6401
6408
|
]
|
|
6402
6409
|
}
|
|
6403
6410
|
];
|
|
6404
|
-
}), Yl = x(() => _a.value.reduce((u, a) => u + a.items.length, 0)), Xl = x(() => _a.value.reduce((u, a) => u + a.items.filter((l) => l.configured).length, 0)), Pa = x(() => Yl.value - Xl.value), Da = "1.2.
|
|
6411
|
+
}), Yl = x(() => _a.value.reduce((u, a) => u + a.items.length, 0)), Xl = x(() => _a.value.reduce((u, a) => u + a.items.filter((l) => l.configured).length, 0)), Pa = x(() => Yl.value - Xl.value), Da = "1.2.20", Aa = w(""), An = w("idle"), rc = x(() => An.value === "success" && Aa.value !== Da), uc = x(() => An.value === "success" ? `v${Aa.value}` : An.value === "error" ? "版本暂不可用" : "版本检测中");
|
|
6405
6412
|
async function cc() {
|
|
6406
6413
|
if (An.value !== "idle") return;
|
|
6407
6414
|
An.value = "loading";
|
|
@@ -6447,10 +6454,10 @@ const fb = {
|
|
|
6447
6454
|
}
|
|
6448
6455
|
window.localStorage.setItem(lr, "true"), Qn.value = !0, Es.value = "", Ts.value = "", ei();
|
|
6449
6456
|
}
|
|
6450
|
-
const Ea = ca(), pc = Ea.updateHistory !== void 0,
|
|
6457
|
+
const Ea = ca(), pc = Ea.updateHistory !== void 0, Fs = Ea.updateHistory ?? [], En = w(!1), Gs = w(((Bi = Fs[0]) == null ? void 0 : Bi.hash) ?? ""), vc = x(() => {
|
|
6451
6458
|
var u;
|
|
6452
|
-
return ((u =
|
|
6453
|
-
}), pe = w("prototype"), ti = w(null), Mo = w(!1),
|
|
6459
|
+
return ((u = Fs[0]) == null ? void 0 : u.date) ?? "暂无记录";
|
|
6460
|
+
}), pe = w("prototype"), ti = w(null), Mo = w(!1), Vo = w(!1), pn = w(!1), Xt = w(!1), qt = w(!0), Ta = w(!1), Na = w(!1), ni = w(!1), fe = x(
|
|
6454
6461
|
() => ni.value && _.value === "mobile"
|
|
6455
6462
|
), pt = w(!1);
|
|
6456
6463
|
let so, ao;
|
|
@@ -6478,14 +6485,14 @@ const fb = {
|
|
|
6478
6485
|
pt.value = !1;
|
|
6479
6486
|
}
|
|
6480
6487
|
const zs = w(null), si = w(null), Ra = w(0), lo = w(1440), Lo = w(900), io = w(0), ro = w(120), Hs = w(!1);
|
|
6481
|
-
let
|
|
6488
|
+
let Fo = { x: 0, y: 0, panX: 0, panY: 0 };
|
|
6482
6489
|
const ne = x(() => fe.value ? "interactive" : g.value), bc = x(
|
|
6483
6490
|
() => fe.value ? [Jt.value] : K.value
|
|
6484
6491
|
), uo = x(
|
|
6485
6492
|
() => T.value ? Ye(h.value, T.value) : ""
|
|
6486
6493
|
), wc = x(() => {
|
|
6487
|
-
const u =
|
|
6488
|
-
return
|
|
6494
|
+
const u = Uo.value.trim().toLowerCase();
|
|
6495
|
+
return U.map((a) => {
|
|
6489
6496
|
const l = q(a.id), S = l.filter((Q) => `${Q.label} ${Q.id}`.toLowerCase().includes(u)), O = !u || `${a.code} ${a.title} ${a.subtitle} ${a.id}`.toLowerCase().includes(u);
|
|
6490
6497
|
return {
|
|
6491
6498
|
screen: a,
|
|
@@ -6499,13 +6506,13 @@ const fb = {
|
|
|
6499
6506
|
);
|
|
6500
6507
|
ze([h, T, B], () => {
|
|
6501
6508
|
dn.value = !1;
|
|
6502
|
-
}), ze(dn, (u) =>
|
|
6503
|
-
|
|
6509
|
+
}), ze(dn, (u) => F("pageDescriptions", u), { immediate: !0 }), ze(Ce, (u) => F("flows", u), { immediate: !0 }), ze([xe, te], ([u, a]) => {
|
|
6510
|
+
F("annotations", u !== "view" || !!a);
|
|
6504
6511
|
}, { immediate: !0 }), ze(g, (u, a) => {
|
|
6505
6512
|
u !== "interactive" && pt.value && oi(), u === "interactive" && a !== "interactive" && hc();
|
|
6506
6513
|
});
|
|
6507
6514
|
function ai() {
|
|
6508
|
-
const u =
|
|
6515
|
+
const u = Ve.value;
|
|
6509
6516
|
k.value = u ? {
|
|
6510
6517
|
highlighted: u.highlighted ?? !1,
|
|
6511
6518
|
highlightColor: u.highlightColor ?? "#ef4444",
|
|
@@ -6574,15 +6581,15 @@ Scope:${u}
|
|
|
6574
6581
|
a ? l.add(u) : l.delete(u), oo.value = l;
|
|
6575
6582
|
}
|
|
6576
6583
|
function Dc() {
|
|
6577
|
-
|
|
6584
|
+
jo.forEach((u) => window.clearTimeout(u)), jo.clear(), oo.value = /* @__PURE__ */ new Set();
|
|
6578
6585
|
}
|
|
6579
6586
|
function Ac(u) {
|
|
6580
6587
|
const a = Tt.value;
|
|
6581
6588
|
return Zn((a == null ? void 0 : a.id) === u.id ? { ...u, x: a.x, y: a.y } : u);
|
|
6582
6589
|
}
|
|
6583
6590
|
const Ec = x(() => {
|
|
6584
|
-
if (!bt.value || !
|
|
6585
|
-
const u =
|
|
6591
|
+
if (!bt.value || !Vs.value) return { left: "-9999px", top: "-9999px" };
|
|
6592
|
+
const u = Vs.value;
|
|
6586
6593
|
return {
|
|
6587
6594
|
left: `${u.left + u.width / 2}px`,
|
|
6588
6595
|
top: `${u.bottom + 8}px`
|
|
@@ -6599,8 +6606,8 @@ Scope:${u}
|
|
|
6599
6606
|
return u.querySelector(".annotation-layer");
|
|
6600
6607
|
}
|
|
6601
6608
|
function ii(u, a, l) {
|
|
6602
|
-
const S = l.getBoundingClientRect(), O = Nc(l), Q = O == null ? void 0 : O.getBoundingClientRect(),
|
|
6603
|
-
return
|
|
6609
|
+
const S = l.getBoundingClientRect(), O = Nc(l), Q = O == null ? void 0 : O.getBoundingClientRect(), Fe = Q && Q.width > 0 && Q.height > 0 ? Q : S;
|
|
6610
|
+
return Uh(Zr(u, a, Fe));
|
|
6604
6611
|
}
|
|
6605
6612
|
function Rc(u, a) {
|
|
6606
6613
|
if (a.pointerType === "mouse" && a.button !== 0 || oo.value.has(u.id)) return;
|
|
@@ -6644,50 +6651,50 @@ Scope:${u}
|
|
|
6644
6651
|
Tt.value = null;
|
|
6645
6652
|
return;
|
|
6646
6653
|
}
|
|
6647
|
-
const O =
|
|
6654
|
+
const O = jo.get(a.annotation.id);
|
|
6648
6655
|
O && window.clearTimeout(O), li(a.annotation.id, !0);
|
|
6649
6656
|
const Q = window.setTimeout(async () => {
|
|
6650
|
-
var
|
|
6657
|
+
var Fe;
|
|
6651
6658
|
try {
|
|
6652
6659
|
await xa(a.annotation.id, l.x, l.y);
|
|
6653
6660
|
} finally {
|
|
6654
|
-
|
|
6661
|
+
jo.delete(a.annotation.id), li(a.annotation.id, !1), ((Fe = Tt.value) == null ? void 0 : Fe.id) === a.annotation.id && (Tt.value = null);
|
|
6655
6662
|
}
|
|
6656
6663
|
}, 300);
|
|
6657
|
-
|
|
6664
|
+
jo.set(a.annotation.id, Q);
|
|
6658
6665
|
}
|
|
6659
|
-
function
|
|
6666
|
+
function Uc(u) {
|
|
6660
6667
|
!Le || Le.pointerId !== u.pointerId || (Go(), Tt.value = null);
|
|
6661
6668
|
}
|
|
6662
|
-
function
|
|
6663
|
-
no.value || Tt.value || (
|
|
6669
|
+
function jc(u, a) {
|
|
6670
|
+
no.value || Tt.value || (Vs.value = a.currentTarget.getBoundingClientRect(), Is(u.id));
|
|
6664
6671
|
}
|
|
6665
6672
|
function Mc(u) {
|
|
6666
6673
|
if (no.value || Tt.value) return;
|
|
6667
6674
|
const a = document.querySelector(`[data-annotation-id="${u.id}"]`);
|
|
6668
|
-
|
|
6675
|
+
Vs.value = a instanceof HTMLElement ? a.getBoundingClientRect() : null, Is(u.id);
|
|
6669
6676
|
}
|
|
6670
6677
|
const Ks = x(() => {
|
|
6671
6678
|
var a, l;
|
|
6672
|
-
if (!((a =
|
|
6673
|
-
const u =
|
|
6674
|
-
return `${
|
|
6675
|
-
}),
|
|
6679
|
+
if (!((a = Ve.value) != null && a.authorName) && !((l = Ve.value) != null && l.updatedAt)) return "";
|
|
6680
|
+
const u = Ua(Ve.value.updatedAt);
|
|
6681
|
+
return `${Ve.value.authorName || "未署名"}${u ? ` · ${u}` : ""}`;
|
|
6682
|
+
}), Vc = x(() => zo(h.value, T.value)), ri = [
|
|
6676
6683
|
{ source: "gitee", label: "Gitee", icon: Md },
|
|
6677
6684
|
{ source: "local-cache", label: "本地缓存", icon: Gi },
|
|
6678
6685
|
{ source: "local-seed", label: "JSON", icon: cr }
|
|
6679
|
-
], ui = x(() => !!kt.value[de.value][
|
|
6680
|
-
var u, a, l, S, O, Q,
|
|
6686
|
+
], ui = x(() => !!kt.value[de.value][Vc.value]), Lc = x(() => ui.value ? "当前 Scope 已加载" : de.value === "gitee" && !ke.value ? ue.unavailableReason || "Gitee 未启用" : "当前 Scope 无数据"), Nt = x(() => {
|
|
6687
|
+
var u, a, l, S, O, Q, Fe, Wo, Ui;
|
|
6681
6688
|
return {
|
|
6682
|
-
purpose: ((u =
|
|
6683
|
-
structure: ((a =
|
|
6684
|
-
features: ((l =
|
|
6685
|
-
flowPosition: ((S =
|
|
6686
|
-
interactionRules: ((O =
|
|
6687
|
-
stateCriteria: ((Q =
|
|
6688
|
-
edgeCases: ((
|
|
6689
|
-
acceptanceCriteria: ((Wo =
|
|
6690
|
-
developmentNotes: ((
|
|
6689
|
+
purpose: ((u = Ve.value) == null ? void 0 : u.purpose.trim()) || "当前页面暂无页面目的描述。",
|
|
6690
|
+
structure: ((a = Ve.value) == null ? void 0 : a.structure.trim()) || "当前页面暂无页面结构描述。",
|
|
6691
|
+
features: ((l = Ve.value) == null ? void 0 : l.features.trim()) || "当前页面暂无核心功能描述。",
|
|
6692
|
+
flowPosition: ((S = Ve.value) == null ? void 0 : S.flowPosition.trim()) || "当前页面暂无流程位置描述。",
|
|
6693
|
+
interactionRules: ((O = Ve.value) == null ? void 0 : O.interactionRules.trim()) || "当前页面暂无交互规则。",
|
|
6694
|
+
stateCriteria: ((Q = Ve.value) == null ? void 0 : Q.stateCriteria.trim()) || "当前页面暂无状态判断依据。",
|
|
6695
|
+
edgeCases: ((Fe = Ve.value) == null ? void 0 : Fe.edgeCases.trim()) || "当前页面暂无异常与边界。",
|
|
6696
|
+
acceptanceCriteria: ((Wo = Ve.value) == null ? void 0 : Wo.acceptanceCriteria.trim()) || "当前页面暂无开发验收。",
|
|
6697
|
+
developmentNotes: ((Ui = Ve.value) == null ? void 0 : Ui.developmentNotes.trim()) || "当前页面暂无补充说明。"
|
|
6691
6698
|
};
|
|
6692
6699
|
}), Tn = x(() => [
|
|
6693
6700
|
{ id: "purpose", label: "页面目的", value: Nt.value.purpose },
|
|
@@ -6710,7 +6717,7 @@ Scope:${u}
|
|
|
6710
6717
|
return a ? `${u}__${a}` : u;
|
|
6711
6718
|
}
|
|
6712
6719
|
const Ba = x(
|
|
6713
|
-
() =>
|
|
6720
|
+
() => le.value.flatMap(
|
|
6714
6721
|
(u) => u.rows.flatMap(
|
|
6715
6722
|
(a, l) => a.filter((S) => S.screenId).map((S, O) => ({
|
|
6716
6723
|
flowId: u.id,
|
|
@@ -6728,11 +6735,11 @@ Scope:${u}
|
|
|
6728
6735
|
return ke.value && ((a = X.value) != null && a.scopes) && Object.entries(X.value.scopes).forEach(([l, S]) => {
|
|
6729
6736
|
((S == null ? void 0 : S.count) ?? 0) > 0 && u.add(l);
|
|
6730
6737
|
}), u;
|
|
6731
|
-
}),
|
|
6738
|
+
}), Fc = x(() => {
|
|
6732
6739
|
var u;
|
|
6733
6740
|
return ke.value ? (u = X.value) != null && u.scopes ? "云端 manifest" : "云端 manifest 未加载" : "本地兜底数据";
|
|
6734
6741
|
}), co = x(
|
|
6735
|
-
() =>
|
|
6742
|
+
() => U.map((u) => {
|
|
6736
6743
|
const a = q(u.id), l = a.length ? a.map((Q) => ({
|
|
6737
6744
|
id: zo(u.id, Q.id),
|
|
6738
6745
|
stateId: Q.id,
|
|
@@ -6752,16 +6759,16 @@ Scope:${u}
|
|
|
6752
6759
|
})
|
|
6753
6760
|
), pi = x(
|
|
6754
6761
|
() => Ba.value.filter((u) => {
|
|
6755
|
-
const a =
|
|
6762
|
+
const a = U.find((l) => l.id === u.screenId);
|
|
6756
6763
|
return a ? !!(u.stateId && !q(a.id).some((l) => l.id === u.stateId)) : !0;
|
|
6757
6764
|
})
|
|
6758
6765
|
), vi = x(() => co.value.filter((u) => u.describedCount < u.stateCount)), fi = x(() => co.value.filter((u) => !u.inFlow)), Gc = x(() => {
|
|
6759
6766
|
const u = co.value.reduce((S, O) => S + O.stateCount, 0), a = co.value.reduce((S, O) => S + O.describedCount, 0), l = co.value.reduce((S, O) => S + O.annotationCount, 0);
|
|
6760
6767
|
return [
|
|
6761
|
-
{ label: "页面", value:
|
|
6768
|
+
{ label: "页面", value: U.length, detail: "已注册屏幕" },
|
|
6762
6769
|
{ label: "状态", value: u, detail: "页面/状态 scope" },
|
|
6763
|
-
{ label: "流程", value:
|
|
6764
|
-
{ label: "页面描述", value: `${a}/${u}`, detail:
|
|
6770
|
+
{ label: "流程", value: le.value.length, detail: `${Ba.value.length} 个节点` },
|
|
6771
|
+
{ label: "页面描述", value: `${a}/${u}`, detail: Fc.value },
|
|
6765
6772
|
{ label: "注释", value: l, detail: ke.value ? "当前已加载云端数据" : "当前本地数据" }
|
|
6766
6773
|
];
|
|
6767
6774
|
}), mi = x(() => {
|
|
@@ -6785,7 +6792,7 @@ Scope:${u}
|
|
|
6785
6792
|
}), u;
|
|
6786
6793
|
});
|
|
6787
6794
|
let Nn, po;
|
|
6788
|
-
function
|
|
6795
|
+
function Ua(u) {
|
|
6789
6796
|
if (!u) return "";
|
|
6790
6797
|
const a = new Date(u);
|
|
6791
6798
|
return Number.isNaN(a.getTime()) ? "" : `${a.getMonth() + 1}/${a.getDate()} ${a.getHours().toString().padStart(2, "0")}:${a.getMinutes().toString().padStart(2, "0")}`;
|
|
@@ -6824,15 +6831,15 @@ Scope:${u}
|
|
|
6824
6831
|
const u = new Set(wt.value);
|
|
6825
6832
|
wt.value = Tn.value.map((a) => a.id).filter((a) => !u.has(a)), window.localStorage.setItem(Zo, JSON.stringify(wt.value));
|
|
6826
6833
|
}
|
|
6827
|
-
const
|
|
6828
|
-
const u = Math.max(1, $n.value), l = ((Ra.value || window.innerWidth) -
|
|
6834
|
+
const ja = x(() => {
|
|
6835
|
+
const u = Math.max(1, $n.value), l = ((Ra.value || window.innerWidth) - jS * (u - 1)) / u;
|
|
6829
6836
|
return Math.min(1, Math.max(0.36, Number((l / ho).toFixed(3))));
|
|
6830
|
-
}), gi = x(() => Math.round(ho *
|
|
6837
|
+
}), gi = x(() => Math.round(ho * ja.value * 100) / 100), Yc = x(() => Math.round(el * ja.value * 100) / 100);
|
|
6831
6838
|
function Xc() {
|
|
6832
6839
|
if (pt.value)
|
|
6833
6840
|
return Math.min(tl, lo.value, Math.max(0, Lo.value - 48) * 16 / 9);
|
|
6834
6841
|
if (ne.value === "overview") return gi.value;
|
|
6835
|
-
if (ne.value === "flow") return
|
|
6842
|
+
if (ne.value === "flow") return VS;
|
|
6836
6843
|
const u = Ra.value || lo.value;
|
|
6837
6844
|
return Math.min(1440, u, Math.max(0, Lo.value - 120) * 16 / 9);
|
|
6838
6845
|
}
|
|
@@ -6864,7 +6871,7 @@ Scope:${u}
|
|
|
6864
6871
|
transform: `translate3d(${io.value}px, ${ro.value}px, 0) scale(${Yt.value})`,
|
|
6865
6872
|
transformOrigin: "left top",
|
|
6866
6873
|
"--max-cols": $n.value,
|
|
6867
|
-
"--overview-item-scale":
|
|
6874
|
+
"--overview-item-scale": ja.value,
|
|
6868
6875
|
"--overview-item-width": `${gi.value}px`,
|
|
6869
6876
|
"--overview-screen-height": `${Yc.value}px`
|
|
6870
6877
|
}));
|
|
@@ -6891,10 +6898,10 @@ Scope:${u}
|
|
|
6891
6898
|
io.value = Math.max(32, (lo.value - u) / 2), ro.value = 120;
|
|
6892
6899
|
}
|
|
6893
6900
|
function ed(u) {
|
|
6894
|
-
u.button !== 0 || u.target.closest("button, input, select, textarea, a, .phone-shell, .desktop-shell") || (Hs.value = !0,
|
|
6901
|
+
u.button !== 0 || u.target.closest("button, input, select, textarea, a, .phone-shell, .desktop-shell") || (Hs.value = !0, Fo = { x: u.clientX, y: u.clientY, panX: io.value, panY: ro.value });
|
|
6895
6902
|
}
|
|
6896
6903
|
function td(u) {
|
|
6897
|
-
Hs.value && (io.value =
|
|
6904
|
+
Hs.value && (io.value = Fo.panX + u.clientX - Fo.x, ro.value = Fo.panY + u.clientY - Fo.y);
|
|
6898
6905
|
}
|
|
6899
6906
|
function bi() {
|
|
6900
6907
|
Hs.value = !1;
|
|
@@ -6918,13 +6925,13 @@ Scope:${u}
|
|
|
6918
6925
|
function Ma() {
|
|
6919
6926
|
const u = ti.value;
|
|
6920
6927
|
if (!u) {
|
|
6921
|
-
Mo.value = !1,
|
|
6928
|
+
Mo.value = !1, Vo.value = !1;
|
|
6922
6929
|
return;
|
|
6923
6930
|
}
|
|
6924
|
-
Mo.value = u.scrollTop > 2,
|
|
6931
|
+
Mo.value = u.scrollTop > 2, Vo.value = u.scrollTop + u.clientHeight < u.scrollHeight - 2;
|
|
6925
6932
|
}
|
|
6926
6933
|
function Si() {
|
|
6927
|
-
pn.value = !pn.value, pn.value ? (Mo.value = !1,
|
|
6934
|
+
pn.value = !pn.value, pn.value ? (Mo.value = !1, Vo.value = !1) : Ha(Ma);
|
|
6928
6935
|
}
|
|
6929
6936
|
ze(g, async (u) => {
|
|
6930
6937
|
u === "interactive" && (await Ha(), Ma()), u === "overview" && await Ws();
|
|
@@ -6933,7 +6940,7 @@ Scope:${u}
|
|
|
6933
6940
|
}), ze(fe, (u) => {
|
|
6934
6941
|
u && (ee.value = !1, En.value = !1, _n.value = !1, Ce.value = !1, xt(), Ao(), Je.value = "");
|
|
6935
6942
|
});
|
|
6936
|
-
const at = _t.versionUpdate, Rt = typeof (at == null ? void 0 : at.currentVersion) == "string" ? at.currentVersion.trim() : "", Rn = typeof (at == null ? void 0 : at.builtAt) == "string" ? at.builtAt.trim() : "", sd = Math.max(1e4, (at == null ? void 0 : at.intervalMs) ?? 6e4), Ci = !!Rt, Ho = w(!1),
|
|
6943
|
+
const at = _t.versionUpdate, Rt = typeof (at == null ? void 0 : at.currentVersion) == "string" ? at.currentVersion.trim() : "", Rn = typeof (at == null ? void 0 : at.builtAt) == "string" ? at.builtAt.trim() : "", sd = Math.max(1e4, (at == null ? void 0 : at.intervalMs) ?? 6e4), Ci = !!Rt, Ho = w(!1), Va = w(""), Ko = w("");
|
|
6937
6944
|
let Jo, vo, fo, Pt, Ys;
|
|
6938
6945
|
function ki() {
|
|
6939
6946
|
Ys && (window.clearInterval(Ys), Ys = void 0);
|
|
@@ -7049,7 +7056,7 @@ Scope:${u}
|
|
|
7049
7056
|
a && Di(a, !1);
|
|
7050
7057
|
}
|
|
7051
7058
|
function Di(u, a) {
|
|
7052
|
-
sr(Rt, u.version, Ko.value) && (
|
|
7059
|
+
sr(Rt, u.version, Ko.value) && (Va.value === u.version && Ho.value || (Va.value = u.version, Ho.value = !0, a && (Pt == null || Pt.postMessage(u)), console.info("🔔 [版本检测] 检测到新版本,准备展示刷新提示", { currentVersion: Rt, remoteVersion: u.version, remoteBuiltAt: u.builtAt })));
|
|
7053
7060
|
}
|
|
7054
7061
|
function La() {
|
|
7055
7062
|
return Ci ? vo || (vo = dd().finally(() => {
|
|
@@ -7079,18 +7086,18 @@ Scope:${u}
|
|
|
7079
7086
|
});
|
|
7080
7087
|
return;
|
|
7081
7088
|
}
|
|
7082
|
-
const O = or(await S.json()), Q = O == null ? void 0 : O.version,
|
|
7089
|
+
const O = or(await S.json()), Q = O == null ? void 0 : O.version, Fe = O == null ? void 0 : O.builtAt;
|
|
7083
7090
|
if (console.info("📦 [版本检测] 服务器版本清单", {
|
|
7084
7091
|
currentVersion: Rt,
|
|
7085
7092
|
currentBuiltAt: Rn,
|
|
7086
7093
|
remoteVersion: Q,
|
|
7087
|
-
remoteBuiltAt:
|
|
7094
|
+
remoteBuiltAt: Fe,
|
|
7088
7095
|
dismissedVersion: Ko.value || null
|
|
7089
7096
|
}), !O) {
|
|
7090
7097
|
console.warn("⚠️ [版本检测] 服务器版本字段为空,无法判断是否更新", {
|
|
7091
7098
|
currentVersion: Rt,
|
|
7092
7099
|
currentBuiltAt: Rn,
|
|
7093
|
-
remoteBuiltAt:
|
|
7100
|
+
remoteBuiltAt: Fe
|
|
7094
7101
|
});
|
|
7095
7102
|
return;
|
|
7096
7103
|
}
|
|
@@ -7099,7 +7106,7 @@ Scope:${u}
|
|
|
7099
7106
|
console.info("🙈 [版本检测] 服务器版本已被本次会话忽略,不再提示", {
|
|
7100
7107
|
currentVersion: Rt,
|
|
7101
7108
|
remoteVersion: Q,
|
|
7102
|
-
remoteBuiltAt:
|
|
7109
|
+
remoteBuiltAt: Fe
|
|
7103
7110
|
});
|
|
7104
7111
|
return;
|
|
7105
7112
|
}
|
|
@@ -7108,8 +7115,8 @@ Scope:${u}
|
|
|
7108
7115
|
currentVersion: Rt,
|
|
7109
7116
|
currentBuiltAt: Rn,
|
|
7110
7117
|
remoteVersion: Q,
|
|
7111
|
-
remoteBuiltAt:
|
|
7112
|
-
builtAtChanged:
|
|
7118
|
+
remoteBuiltAt: Fe,
|
|
7119
|
+
builtAtChanged: Fe ? Fe !== Rn : !1,
|
|
7113
7120
|
reason: "当前逻辑只比较 version;builtAt 仅用于诊断。"
|
|
7114
7121
|
});
|
|
7115
7122
|
return;
|
|
@@ -7129,9 +7136,9 @@ Scope:${u}
|
|
|
7129
7136
|
window.location.reload();
|
|
7130
7137
|
}
|
|
7131
7138
|
function vd() {
|
|
7132
|
-
Ko.value =
|
|
7139
|
+
Ko.value = Va.value, Ho.value = !1;
|
|
7133
7140
|
}
|
|
7134
|
-
function
|
|
7141
|
+
function Fa() {
|
|
7135
7142
|
window.location.hash === "#/bugs" ? pe.value = "bugs" : window.location.hash === "#/test-cases" ? pe.value = "testCases" : window.location.hash === "#/prototype-core-help" ? pe.value = "help" : window.location.hash === "#/prototype-core-theme" ? pe.value = "themeGuide" : pe.value = "prototype";
|
|
7136
7143
|
}
|
|
7137
7144
|
function fd() {
|
|
@@ -7174,22 +7181,22 @@ Scope:${u}
|
|
|
7174
7181
|
return u.length !== 2 ? null : (u[0].clientY + u[1].clientY) / 2;
|
|
7175
7182
|
}
|
|
7176
7183
|
function Ni(u) {
|
|
7177
|
-
!fe.value || Bo.value || (
|
|
7184
|
+
!fe.value || Bo.value || (js.value = Ti(u.touches), Ms.value = !1);
|
|
7178
7185
|
}
|
|
7179
7186
|
function Ri(u) {
|
|
7180
|
-
if (
|
|
7187
|
+
if (js.value === null || Ms.value) return;
|
|
7181
7188
|
const a = Ti(u.touches);
|
|
7182
|
-
a === null || a -
|
|
7189
|
+
a === null || a - js.value < 72 || (u.preventDefault(), Ms.value = !0, Bo.value = !0, Uo.value = "", Us.value = /* @__PURE__ */ new Set([h.value]));
|
|
7183
7190
|
}
|
|
7184
7191
|
function Xs() {
|
|
7185
|
-
|
|
7192
|
+
js.value = null, Ms.value = !1;
|
|
7186
7193
|
}
|
|
7187
7194
|
function qs() {
|
|
7188
|
-
Bo.value = !1,
|
|
7195
|
+
Bo.value = !1, Uo.value = "";
|
|
7189
7196
|
}
|
|
7190
7197
|
function Cd(u) {
|
|
7191
|
-
const a = new Set(
|
|
7192
|
-
a.has(u) ? a.delete(u) : a.add(u),
|
|
7198
|
+
const a = new Set(Us.value);
|
|
7199
|
+
a.has(u) ? a.delete(u) : a.add(u), Us.value = a;
|
|
7193
7200
|
}
|
|
7194
7201
|
function kd(u) {
|
|
7195
7202
|
Do(u), qs();
|
|
@@ -7206,9 +7213,9 @@ Scope:${u}
|
|
|
7206
7213
|
}
|
|
7207
7214
|
return ml(() => {
|
|
7208
7215
|
var u;
|
|
7209
|
-
|
|
7216
|
+
Fa(), Hc(), rd(), Nn = window.matchMedia("(max-width: 640px)"), Ga(Nn), Nn.addEventListener("change", Ga), window.addEventListener("touchstart", Ni, { passive: !0 }), window.addEventListener("touchmove", Ri, { passive: !1 }), window.addEventListener("touchend", Xs, { passive: !0 }), window.addEventListener("touchcancel", Xs, { passive: !0 }), window.addEventListener("resize", Oi), window.addEventListener("hashchange", Fa), za(), po = new ResizeObserver(za), zs.value && po.observe(zs.value), window.addEventListener("keydown", Ii), Qn.value = ((u = _t.auth) == null ? void 0 : u.enabled) !== !0 || window.localStorage.getItem(lr) === "true", Qn.value ? ei() : Ql() || console.error("🔐 [前端认证] 已启用认证但未提供用户名或密码,访问页将无法登录");
|
|
7210
7217
|
}), us(() => {
|
|
7211
|
-
ki(), Go(), Dc(), Nn == null || Nn.removeEventListener("change", Ga), Nn = void 0, window.removeEventListener("touchstart", Ni), window.removeEventListener("touchmove", Ri), window.removeEventListener("touchend", Xs), window.removeEventListener("touchcancel", Xs), window.removeEventListener("resize", Oi), window.removeEventListener("hashchange",
|
|
7218
|
+
ki(), Go(), Dc(), Nn == null || Nn.removeEventListener("change", Ga), Nn = void 0, window.removeEventListener("touchstart", Ni), window.removeEventListener("touchmove", Ri), window.removeEventListener("touchend", Xs), window.removeEventListener("touchcancel", Xs), window.removeEventListener("resize", Oi), window.removeEventListener("hashchange", Fa), window.removeEventListener("keydown", Ii), po == null || po.disconnect(), po = void 0, cd(), so && window.clearTimeout(so), ao && window.clearTimeout(ao);
|
|
7212
7219
|
}), (u, a) => (v(), f("main", {
|
|
7213
7220
|
class: E(["min-h-screen bg-canvas text-ink transition-[padding] duration-200", [
|
|
7214
7221
|
fe.value ? "mobile-pure-interactive" : "",
|
|
@@ -7337,7 +7344,7 @@ Scope:${u}
|
|
|
7337
7344
|
title: "查看主题实现准则",
|
|
7338
7345
|
onClick: yd
|
|
7339
7346
|
}, [
|
|
7340
|
-
|
|
7347
|
+
V(i(Fi), { class: "h-4 w-4" })
|
|
7341
7348
|
]),
|
|
7342
7349
|
t("button", {
|
|
7343
7350
|
class: "text-xs font-semibold text-ocean",
|
|
@@ -7363,7 +7370,7 @@ Scope:${u}
|
|
|
7363
7370
|
])
|
|
7364
7371
|
], 10, Ob))), 128))
|
|
7365
7372
|
]),
|
|
7366
|
-
t("div",
|
|
7373
|
+
t("div", Ub, [
|
|
7367
7374
|
t("button", {
|
|
7368
7375
|
class: "theme-file-btn",
|
|
7369
7376
|
onClick: a[10] || (a[10] = //@ts-ignore
|
|
@@ -7387,7 +7394,7 @@ Scope:${u}
|
|
|
7387
7394
|
}, null, 544)
|
|
7388
7395
|
]),
|
|
7389
7396
|
a[103] || (a[103] = t("p", { class: "theme-section-title" }, "设计系统颜色", -1)),
|
|
7390
|
-
t("div",
|
|
7397
|
+
t("div", jb, [
|
|
7391
7398
|
(v(!0), f(D, null, R(i(o), (l) => (v(), f("label", {
|
|
7392
7399
|
key: l.key,
|
|
7393
7400
|
class: "theme-color-field"
|
|
@@ -7405,7 +7412,7 @@ Scope:${u}
|
|
|
7405
7412
|
type: "text",
|
|
7406
7413
|
value: i(se)[l.key],
|
|
7407
7414
|
onInput: (S) => i(In)(l.key, S.target.value)
|
|
7408
|
-
}, null, 40,
|
|
7415
|
+
}, null, 40, Vb)
|
|
7409
7416
|
]))), 128))
|
|
7410
7417
|
]),
|
|
7411
7418
|
a[104] || (a[104] = t("p", { class: "theme-section-title" }, "字体", -1)),
|
|
@@ -7424,7 +7431,7 @@ Scope:${u}
|
|
|
7424
7431
|
type: "text",
|
|
7425
7432
|
value: (S = i(Re).find((O) => O.id === i(I))) == null ? void 0 : S.typography[l.key],
|
|
7426
7433
|
onInput: (O) => i(wa)(l.key, O.target.value)
|
|
7427
|
-
}, null, 40,
|
|
7434
|
+
}, null, 40, Fb)
|
|
7428
7435
|
]);
|
|
7429
7436
|
}), 128))
|
|
7430
7437
|
]),
|
|
@@ -7478,7 +7485,7 @@ Scope:${u}
|
|
|
7478
7485
|
title: "操作手册",
|
|
7479
7486
|
onClick: gd
|
|
7480
7487
|
}, [
|
|
7481
|
-
|
|
7488
|
+
V(i(Fi), { class: "h-4 w-4" })
|
|
7482
7489
|
])
|
|
7483
7490
|
])
|
|
7484
7491
|
])
|
|
@@ -7537,7 +7544,7 @@ Scope:${u}
|
|
|
7537
7544
|
key: 0,
|
|
7538
7545
|
class: E(["apple-side-nav interactive-side-nav", {
|
|
7539
7546
|
"can-scroll-up": Mo.value,
|
|
7540
|
-
"can-scroll-down":
|
|
7547
|
+
"can-scroll-down": Vo.value,
|
|
7541
7548
|
collapsed: pn.value
|
|
7542
7549
|
}])
|
|
7543
7550
|
}, [
|
|
@@ -7546,7 +7553,7 @@ Scope:${u}
|
|
|
7546
7553
|
type: "button",
|
|
7547
7554
|
onClick: Si
|
|
7548
7555
|
}, [
|
|
7549
|
-
|
|
7556
|
+
V(i(Vd), { class: "h-4 w-4" }),
|
|
7550
7557
|
z(" " + c(pn.value ? "展开导航" : "收起导航") + " (N) ", 1)
|
|
7551
7558
|
]),
|
|
7552
7559
|
pn.value ? C("", !0) : (v(), f("div", e1, [
|
|
@@ -7556,7 +7563,7 @@ Scope:${u}
|
|
|
7556
7563
|
class: "interactive-side-nav-scroll",
|
|
7557
7564
|
onScroll: Ma
|
|
7558
7565
|
}, [
|
|
7559
|
-
(v(!0), f(D, null, R(i(
|
|
7566
|
+
(v(!0), f(D, null, R(i(U), (l) => (v(), f("button", {
|
|
7560
7567
|
key: l.id,
|
|
7561
7568
|
class: E(["nav-row", { active: i(h) === l.id }]),
|
|
7562
7569
|
onClick: (S) => i(Ss)(l.id)
|
|
@@ -7581,7 +7588,7 @@ Scope:${u}
|
|
|
7581
7588
|
Mo.value ? (v(), f("svg", a1, [...a[109] || (a[109] = [
|
|
7582
7589
|
t("path", { d: "M12 19V5M5 12l7-7 7 7" }, null, -1)
|
|
7583
7590
|
])])) : C("", !0),
|
|
7584
|
-
|
|
7591
|
+
Vo.value ? (v(), f("svg", l1, [...a[110] || (a[110] = [
|
|
7585
7592
|
t("path", { d: "M12 5v14M5 12l7 7 7-7" }, null, -1)
|
|
7586
7593
|
])])) : C("", !0)
|
|
7587
7594
|
]))
|
|
@@ -7658,7 +7665,7 @@ Scope:${u}
|
|
|
7658
7665
|
z(" 编辑流程 ", -1)
|
|
7659
7666
|
])])
|
|
7660
7667
|
]),
|
|
7661
|
-
(v(!0), f(D, null, R(i(
|
|
7668
|
+
(v(!0), f(D, null, R(i(le), (l) => (v(), f("button", {
|
|
7662
7669
|
key: l.id,
|
|
7663
7670
|
class: E(["nav-row flow-nav-row", { active: i(b) === l.id }]),
|
|
7664
7671
|
onClick: (S) => i($t)(l.id)
|
|
@@ -7718,8 +7725,8 @@ Scope:${u}
|
|
|
7718
7725
|
style: Be(ne.value === "flow" ? i(Xe) : void 0),
|
|
7719
7726
|
onMousedown: a[25] || (a[25] = (l) => ne.value === "flow" ? i(Gu)(l) : ne.value === "overview" ? ed(l) : void 0),
|
|
7720
7727
|
onMousemove: a[26] || (a[26] = (l) => ne.value === "flow" ? i(zu)(l) : ne.value === "overview" ? td(l) : void 0),
|
|
7721
|
-
onMouseup: a[27] || (a[27] = (l) => ne.value === "flow" ? i(
|
|
7722
|
-
onMouseleave: a[28] || (a[28] = (l) => ne.value === "flow" ? i(
|
|
7728
|
+
onMouseup: a[27] || (a[27] = (l) => ne.value === "flow" ? i(Vl)() : bi()),
|
|
7729
|
+
onMouseleave: a[28] || (a[28] = (l) => ne.value === "flow" ? i(Vl)() : bi()),
|
|
7723
7730
|
onWheel: a[29] || (a[29] = (l) => ne.value === "flow" ? i(Hu)(l) : ne.value === "overview" ? nd(l) : void 0)
|
|
7724
7731
|
}, [
|
|
7725
7732
|
t("div", {
|
|
@@ -7731,7 +7738,7 @@ Scope:${u}
|
|
|
7731
7738
|
(v(!0), f(D, null, R(ne.value === "flow" ? i(P) : [], (l) => (v(), f("div", {
|
|
7732
7739
|
key: l.key,
|
|
7733
7740
|
class: "flow-row-label",
|
|
7734
|
-
style: Be(i(
|
|
7741
|
+
style: Be(i(Fu)(l.row))
|
|
7735
7742
|
}, [
|
|
7736
7743
|
a[119] || (a[119] = t("span", null, "子流程", -1)),
|
|
7737
7744
|
t("strong", null, c(l.label), 1)
|
|
@@ -7779,7 +7786,7 @@ Scope:${u}
|
|
|
7779
7786
|
onClickCapture: (S) => !fe.value && i(ka)(S, l.id)
|
|
7780
7787
|
}, [
|
|
7781
7788
|
t("div", C1, [
|
|
7782
|
-
|
|
7789
|
+
V(Qo, { screen: l }, null, 8, ["screen"]),
|
|
7783
7790
|
ne.value === "interactive" && !fe.value && !pt.value && i(B) === "annotations" && i(he) ? (v(), f("div", k1, [
|
|
7784
7791
|
(v(!0), f(D, null, R(i(Et), (S, O) => {
|
|
7785
7792
|
var Q;
|
|
@@ -7792,20 +7799,20 @@ Scope:${u}
|
|
|
7792
7799
|
"is-syncing-position": oo.value.has(S.id)
|
|
7793
7800
|
}]),
|
|
7794
7801
|
style: Be(Ac(S)),
|
|
7795
|
-
onMouseenter: (
|
|
7802
|
+
onMouseenter: (Fe) => jc(S, Fe),
|
|
7796
7803
|
onMouseleave: a[24] || (a[24] = //@ts-ignore
|
|
7797
|
-
(...
|
|
7804
|
+
(...Fe) => i(rn) && i(rn)(...Fe))
|
|
7798
7805
|
}, [
|
|
7799
7806
|
t("button", {
|
|
7800
7807
|
class: "annotation-point",
|
|
7801
7808
|
type: "button",
|
|
7802
7809
|
title: "长按抓取后拖动位置",
|
|
7803
7810
|
disabled: oo.value.has(S.id),
|
|
7804
|
-
onClick: Ie((
|
|
7805
|
-
onPointerdown: Ie((
|
|
7811
|
+
onClick: Ie((Fe) => Tc(S), ["stop"]),
|
|
7812
|
+
onPointerdown: Ie((Fe) => Rc(S, Fe), ["stop"]),
|
|
7806
7813
|
onPointermove: Oc,
|
|
7807
7814
|
onPointerup: Bc,
|
|
7808
|
-
onPointercancel:
|
|
7815
|
+
onPointercancel: Uc
|
|
7809
7816
|
}, c(O + 1), 41, I1)
|
|
7810
7817
|
], 46, x1);
|
|
7811
7818
|
}), 128)),
|
|
@@ -7859,7 +7866,7 @@ Scope:${u}
|
|
|
7859
7866
|
type: "button",
|
|
7860
7867
|
onClick: a[30] || (a[30] = (l) => Se.value = !i(Se))
|
|
7861
7868
|
}, [
|
|
7862
|
-
|
|
7869
|
+
V(i(Ld), { class: "h-4 w-4" }),
|
|
7863
7870
|
z(" " + c(i(Se) ? i(M)("annotationExpand") : i(M)("annotationCollapse")) + " (C) ", 1)
|
|
7864
7871
|
]),
|
|
7865
7872
|
i(Se) ? C("", !0) : (v(), f(D, { key: 0 }, [
|
|
@@ -7873,7 +7880,7 @@ Scope:${u}
|
|
|
7873
7880
|
], 64)) : C("", !0)
|
|
7874
7881
|
])
|
|
7875
7882
|
]),
|
|
7876
|
-
t("strong", null, c(i(B) === "annotations" ? i(Et).length : i(
|
|
7883
|
+
t("strong", null, c(i(B) === "annotations" ? i(Et).length : i(Ve) ? 1 : 0), 1)
|
|
7877
7884
|
]),
|
|
7878
7885
|
t("div", P1, [
|
|
7879
7886
|
t("button", {
|
|
@@ -7925,7 +7932,7 @@ Scope:${u}
|
|
|
7925
7932
|
type: "button",
|
|
7926
7933
|
class: E({ active: dn.value }),
|
|
7927
7934
|
onClick: Cc
|
|
7928
|
-
}, c(i(
|
|
7935
|
+
}, c(i(Ve) ? "编辑" : "新增"), 3)
|
|
7929
7936
|
])),
|
|
7930
7937
|
t("div", {
|
|
7931
7938
|
class: E(["annotation-sync-row", `is-${i(we)}`])
|
|
@@ -7946,7 +7953,7 @@ Scope:${u}
|
|
|
7946
7953
|
t("span", null, c(i(M)("annotationPollingInterval")), 1),
|
|
7947
7954
|
t("div", B1, [
|
|
7948
7955
|
N(t("input", {
|
|
7949
|
-
"onUpdate:modelValue": a[40] || (a[40] = (l) => go(
|
|
7956
|
+
"onUpdate:modelValue": a[40] || (a[40] = (l) => go(je) ? je.value = l : null),
|
|
7950
7957
|
min: "10",
|
|
7951
7958
|
max: "300",
|
|
7952
7959
|
step: "5",
|
|
@@ -7954,7 +7961,7 @@ Scope:${u}
|
|
|
7954
7961
|
}, null, 512), [
|
|
7955
7962
|
[
|
|
7956
7963
|
G,
|
|
7957
|
-
i(
|
|
7964
|
+
i(je),
|
|
7958
7965
|
void 0,
|
|
7959
7966
|
{ number: !0 }
|
|
7960
7967
|
]
|
|
@@ -7962,15 +7969,15 @@ Scope:${u}
|
|
|
7962
7969
|
t("small", null, c(i(M)("annotationPollingUnit")), 1),
|
|
7963
7970
|
t("button", {
|
|
7964
7971
|
type: "button",
|
|
7965
|
-
disabled: Number(i(
|
|
7972
|
+
disabled: Number(i(je)) === i($e),
|
|
7966
7973
|
onClick: a[41] || (a[41] = //@ts-ignore
|
|
7967
7974
|
(...l) => i(J) && i(J)(...l))
|
|
7968
|
-
}, c(i(M)("annotationPollingSave")), 9,
|
|
7975
|
+
}, c(i(M)("annotationPollingSave")), 9, U1)
|
|
7969
7976
|
])
|
|
7970
7977
|
]),
|
|
7971
|
-
i(H) ? (v(), f("p",
|
|
7978
|
+
i(H) ? (v(), f("p", j1, c(i(H)), 1)) : C("", !0),
|
|
7972
7979
|
i(B) === "annotations" ? (v(), f("div", M1, [
|
|
7973
|
-
i(Et).length ? C("", !0) : (v(), f("p",
|
|
7980
|
+
i(Et).length ? C("", !0) : (v(), f("p", V1, c(i(M)("annotationEmpty")), 1)),
|
|
7974
7981
|
(v(!0), f(D, null, R(i(Et), (l, S) => (v(), f("section", {
|
|
7975
7982
|
key: l.id,
|
|
7976
7983
|
onMouseenter: (O) => Mc(l),
|
|
@@ -7982,10 +7989,10 @@ Scope:${u}
|
|
|
7982
7989
|
t("h3", null, c(l.featureName), 1),
|
|
7983
7990
|
t("p", null, c(l.featureDescription), 1),
|
|
7984
7991
|
t("small", null, c(l.specialNote), 1),
|
|
7985
|
-
l.authorName || l.updatedAt ? (v(), f("small",
|
|
7992
|
+
l.authorName || l.updatedAt ? (v(), f("small", F1, [
|
|
7986
7993
|
z(c(l.authorName || "未署名"), 1),
|
|
7987
|
-
|
|
7988
|
-
z(" · " + c(
|
|
7994
|
+
Ua(l.updatedAt) ? (v(), f(D, { key: 0 }, [
|
|
7995
|
+
z(" · " + c(Ua(l.updatedAt)), 1)
|
|
7989
7996
|
], 64)) : C("", !0)
|
|
7990
7997
|
])) : C("", !0)
|
|
7991
7998
|
]),
|
|
@@ -8005,7 +8012,7 @@ Scope:${u}
|
|
|
8005
8012
|
])
|
|
8006
8013
|
], 40, L1))), 128))
|
|
8007
8014
|
])) : (v(), f("div", K1, [
|
|
8008
|
-
i(
|
|
8015
|
+
i(Ve) ? (v(), f(D, { key: 1 }, [
|
|
8009
8016
|
Ks.value ? (v(), f("small", W1, c(Ks.value), 1)) : C("", !0),
|
|
8010
8017
|
(v(!0), f(D, null, R(Tn.value, (l) => (v(), f("section", {
|
|
8011
8018
|
key: l.id
|
|
@@ -8028,7 +8035,7 @@ Scope:${u}
|
|
|
8028
8035
|
type: "button",
|
|
8029
8036
|
onClick: a[43] || (a[43] = (l) => Xt.value = !Xt.value)
|
|
8030
8037
|
}, [
|
|
8031
|
-
|
|
8038
|
+
V(i(Gi), { class: "h-4 w-4" }),
|
|
8032
8039
|
z(" " + c(Xt.value ? "展开数据源" : "收起数据源") + " (D) ", 1)
|
|
8033
8040
|
]),
|
|
8034
8041
|
Xt.value ? C("", !0) : (v(), f(D, { key: 0 }, [
|
|
@@ -8037,8 +8044,8 @@ Scope:${u}
|
|
|
8037
8044
|
t("strong", null, c(oc.value), 1),
|
|
8038
8045
|
t("small", null, [
|
|
8039
8046
|
z("· " + c(ec.value), 1),
|
|
8040
|
-
|
|
8041
|
-
z(" · " + c(
|
|
8047
|
+
Fl.value ? (v(), f(D, { key: 0 }, [
|
|
8048
|
+
z(" · " + c(Fl.value), 1)
|
|
8042
8049
|
], 64)) : C("", !0)
|
|
8043
8050
|
])
|
|
8044
8051
|
]),
|
|
@@ -8110,7 +8117,7 @@ Scope:${u}
|
|
|
8110
8117
|
type: "button",
|
|
8111
8118
|
onClick: a[48] || (a[48] = (l) => qt.value = !qt.value)
|
|
8112
8119
|
}, [
|
|
8113
|
-
|
|
8120
|
+
V(i(Fd), { class: "h-4 w-4" }),
|
|
8114
8121
|
z(" " + c(qt.value ? "快捷键" : "收起快捷键") + " (K) ", 1)
|
|
8115
8122
|
]),
|
|
8116
8123
|
qt.value ? C("", !0) : (v(), f(D, { key: 0 }, [
|
|
@@ -8133,13 +8140,13 @@ Scope:${u}
|
|
|
8133
8140
|
])), 64))
|
|
8134
8141
|
], 64))
|
|
8135
8142
|
], 2)) : C("", !0),
|
|
8136
|
-
|
|
8143
|
+
V(nl, { name: "shortcut-toast" }, {
|
|
8137
8144
|
default: ol(() => [
|
|
8138
8145
|
pe.value === "prototype" && Ta.value && !fe.value && !pt.value ? (v(), f("div", tw, " 按快捷键 P 可以进入/退出演示模式 ")) : C("", !0)
|
|
8139
8146
|
]),
|
|
8140
8147
|
_: 1
|
|
8141
8148
|
}),
|
|
8142
|
-
|
|
8149
|
+
V(nl, { name: "shortcut-toast" }, {
|
|
8143
8150
|
default: ol(() => [
|
|
8144
8151
|
Na.value && !fe.value && !pt.value ? (v(), f("div", nw, " 还未配置产品文档地址,请在 PrototypeProductDefinition.document.url 中配置 ")) : C("", !0)
|
|
8145
8152
|
]),
|
|
@@ -8153,7 +8160,7 @@ Scope:${u}
|
|
|
8153
8160
|
t("section", ow, [
|
|
8154
8161
|
t("div", sw, [
|
|
8155
8162
|
t("div", null, [
|
|
8156
|
-
t("p", null, c(i(
|
|
8163
|
+
t("p", null, c(i(Ve) ? "编辑页面描述" : "新增页面描述"), 1),
|
|
8157
8164
|
t("span", null, [
|
|
8158
8165
|
z(c(i(yt).code) + " · " + c(i(yt).title), 1),
|
|
8159
8166
|
uo.value ? (v(), f(D, { key: 0 }, [
|
|
@@ -8171,7 +8178,7 @@ Scope:${u}
|
|
|
8171
8178
|
class: "page-description-form",
|
|
8172
8179
|
onSubmit: Ie(kc, ["prevent"])
|
|
8173
8180
|
}, [
|
|
8174
|
-
i(
|
|
8181
|
+
i(Ve) ? Ks.value ? (v(), f("small", lw, c(Ks.value), 1)) : C("", !0) : (v(), f("p", aw, c(i(M)("pageDescriptionEmpty")), 1)),
|
|
8175
8182
|
t("div", iw, [
|
|
8176
8183
|
t("div", rw, [
|
|
8177
8184
|
(v(), f(D, null, R(ri, (l) => t("button", {
|
|
@@ -8438,11 +8445,11 @@ Scope:${u}
|
|
|
8438
8445
|
"onUpdate:modelValue": a[69] || (a[69] = (l) => go(Y) ? Y.value = l : null),
|
|
8439
8446
|
type: "text",
|
|
8440
8447
|
placeholder: i(M)("annotationAuthorPlaceholder")
|
|
8441
|
-
}, null, 8,
|
|
8448
|
+
}, null, 8, Uw), [
|
|
8442
8449
|
[G, i(Y)]
|
|
8443
8450
|
])
|
|
8444
8451
|
]),
|
|
8445
|
-
t("div",
|
|
8452
|
+
t("div", jw, [
|
|
8446
8453
|
t("button", {
|
|
8447
8454
|
type: "button",
|
|
8448
8455
|
onClick: a[70] || (a[70] = //@ts-ignore
|
|
@@ -8455,7 +8462,7 @@ Scope:${u}
|
|
|
8455
8462
|
])
|
|
8456
8463
|
], 32)
|
|
8457
8464
|
])) : C("", !0),
|
|
8458
|
-
pe.value === "prototype" && i(Ne) && !fe.value ? (v(), f("div",
|
|
8465
|
+
pe.value === "prototype" && i(Ne) && !fe.value ? (v(), f("div", Vw, [
|
|
8459
8466
|
t("form", {
|
|
8460
8467
|
class: "annotation-form",
|
|
8461
8468
|
onSubmit: a[80] || (a[80] = Ie(
|
|
@@ -8480,7 +8487,7 @@ Scope:${u}
|
|
|
8480
8487
|
N(t("textarea", {
|
|
8481
8488
|
"onUpdate:modelValue": a[73] || (a[73] = (l) => i(ye).featureDescription = l),
|
|
8482
8489
|
readonly: i(xe) === "view"
|
|
8483
|
-
}, null, 8,
|
|
8490
|
+
}, null, 8, Fw), [
|
|
8484
8491
|
[G, i(ye).featureDescription]
|
|
8485
8492
|
])
|
|
8486
8493
|
]),
|
|
@@ -8727,7 +8734,7 @@ Scope:${u}
|
|
|
8727
8734
|
}, " × ")
|
|
8728
8735
|
]),
|
|
8729
8736
|
t("div", bS, [
|
|
8730
|
-
(v(!0), f(D, null, R(i(
|
|
8737
|
+
(v(!0), f(D, null, R(i(Fs), (l) => (v(), f("section", {
|
|
8731
8738
|
key: l.hash,
|
|
8732
8739
|
class: "overflow-hidden rounded-[16px] bg-soft transition"
|
|
8733
8740
|
}, [
|
|
@@ -8756,7 +8763,7 @@ Scope:${u}
|
|
|
8756
8763
|
])) : (v(), f("p", PS, "暂无更多修改细节"))
|
|
8757
8764
|
])) : C("", !0)
|
|
8758
8765
|
]))), 128)),
|
|
8759
|
-
i(
|
|
8766
|
+
i(Fs).length ? C("", !0) : (v(), f("p", DS, c(pc ? "暂无提交记录" : "业务侧尚未接入更新历史,请在 PrototypeProductDefinition.updateHistory 中配置"), 1))
|
|
8760
8767
|
])
|
|
8761
8768
|
])
|
|
8762
8769
|
])) : C("", !0),
|
|
@@ -8784,12 +8791,12 @@ Scope:${u}
|
|
|
8784
8791
|
])
|
|
8785
8792
|
]),
|
|
8786
8793
|
N(t("input", {
|
|
8787
|
-
"onUpdate:modelValue": a[89] || (a[89] = (l) =>
|
|
8794
|
+
"onUpdate:modelValue": a[89] || (a[89] = (l) => Uo.value = l),
|
|
8788
8795
|
class: "mobile-page-picker-search",
|
|
8789
8796
|
type: "search",
|
|
8790
8797
|
placeholder: "搜索 P 编号、页面或状态"
|
|
8791
8798
|
}, null, 512), [
|
|
8792
|
-
[G,
|
|
8799
|
+
[G, Uo.value]
|
|
8793
8800
|
]),
|
|
8794
8801
|
t("div", ES, [
|
|
8795
8802
|
(v(!0), f(D, null, R(wc.value, (l) => (v(), f("section", {
|
|
@@ -8808,7 +8815,7 @@ Scope:${u}
|
|
|
8808
8815
|
]),
|
|
8809
8816
|
l.states.length ? (v(), f("span", OS, c(l.states.length), 1)) : C("", !0)
|
|
8810
8817
|
], 10, TS),
|
|
8811
|
-
l.states.length && (l.forceExpanded ||
|
|
8818
|
+
l.states.length && (l.forceExpanded || Us.value.has(l.screen.id)) ? (v(), f("div", BS, [
|
|
8812
8819
|
(v(!0), f(D, null, R(l.states, (S) => (v(), f("button", {
|
|
8813
8820
|
key: S.id,
|
|
8814
8821
|
type: "button",
|
|
@@ -8817,7 +8824,7 @@ Scope:${u}
|
|
|
8817
8824
|
}, [
|
|
8818
8825
|
a[142] || (a[142] = t("span", null, null, -1)),
|
|
8819
8826
|
z(" " + c(S.label), 1)
|
|
8820
|
-
], 10,
|
|
8827
|
+
], 10, US))), 128))
|
|
8821
8828
|
])) : C("", !0)
|
|
8822
8829
|
]))), 128))
|
|
8823
8830
|
])
|
|
@@ -8831,10 +8838,10 @@ Scope:${u}
|
|
|
8831
8838
|
}, " 退出演示 (Esc) ")) : C("", !0),
|
|
8832
8839
|
pe.value === "prototype" && i(Ce) && !fe.value ? (v(), He(cv, {
|
|
8833
8840
|
key: 17,
|
|
8834
|
-
flows: i(
|
|
8835
|
-
screens: i(
|
|
8841
|
+
flows: i(le),
|
|
8842
|
+
screens: i(U),
|
|
8836
8843
|
"state-options-by-screen": i(q),
|
|
8837
|
-
"can-push-remote": i(
|
|
8844
|
+
"can-push-remote": i(jt),
|
|
8838
8845
|
onClose: a[90] || (a[90] = (l) => Ce.value = !1),
|
|
8839
8846
|
onSave: $c,
|
|
8840
8847
|
onPush: _c,
|