@feedmepos/mf-miniprogram-v2 0.2.8-dev.1 → 0.2.8-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-B7Mai_6F.js → App-C8Vn8LvE.js} +46 -46
- package/dist/{ControlPlaneView-CBGNMsPT.js → ControlPlaneView-qDA8RgiR.js} +6878 -6878
- package/dist/{EcosystemView-Cy0N2qNK.js → EcosystemView-XP9IZ9wn.js} +1 -1
- package/dist/{MobileProjectsView-CvMvePvm.js → MobileProjectsView-aAyHV5G-.js} +3 -3
- package/dist/{PagesView-DQCIwpnL.js → PagesView-DzDqCd8N.js} +1 -1
- package/dist/{PlatformUnavailableView-DY2ntpNw.js → PlatformUnavailableView-CdHjkolw.js} +1 -1
- package/dist/{PortalSettingsView-Cz566Ccd.js → PortalSettingsView-Df5jChmi.js} +1 -1
- package/dist/{TemplateCenterView-DqZLthqh.js → TemplateCenterView-DrWImUYO.js} +67 -68
- package/dist/{WorkspaceEntryView-B28ASSit.js → WorkspaceEntryView-DQkYJWdf.js} +1 -1
- package/dist/adminAccess-D2K-L-Vt.js +61 -0
- package/dist/app.js +9 -9
- package/dist/package.json +1 -1
- package/dist/{portalNavigation-BBORm5cp.js → portalNavigation-C29ihtq_.js} +10 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/adminAccess-oXC0xjvK.js +0 -48
|
@@ -3,7 +3,7 @@ import { useRoute as S } from "vue-router";
|
|
|
3
3
|
import { a as O } from "./routes-CeuodIgg.js";
|
|
4
4
|
import { b as j, c as N, e as q } from "./controlPlane-sXaC6pAh.js";
|
|
5
5
|
import { u as I } from "./portalContext-DV-6uUwp.js";
|
|
6
|
-
import { p as u } from "./portalNavigation-
|
|
6
|
+
import { p as u } from "./portalNavigation-C29ihtq_.js";
|
|
7
7
|
import { i as R, u as T } from "./useBrandKit-CXLIXo5j.js";
|
|
8
8
|
import { _ as K } from "./StatusBadge.vue_vue_type_script_setup_true_lang-CMgQ0bd_.js";
|
|
9
9
|
import { _ as Y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -4,7 +4,7 @@ import { components as G, useDialog as K } from "@feedmepos/ui-library";
|
|
|
4
4
|
import { a as P } from "./routes-CeuodIgg.js";
|
|
5
5
|
import { c as $, e as z, a as Q } from "./controlPlane-sXaC6pAh.js";
|
|
6
6
|
import { u as W } from "./portalContext-DV-6uUwp.js";
|
|
7
|
-
import { w as F } from "./portalNavigation-
|
|
7
|
+
import { w as F } from "./portalNavigation-C29ihtq_.js";
|
|
8
8
|
import { _ as X, p as Z } from "./AppTemplatePicker.vue_vue_type_script_setup_true_lang-LE_aKvfg.js";
|
|
9
9
|
import { m as ee } from "./index-CIJWcl_6.js";
|
|
10
10
|
import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -161,7 +161,7 @@ const te = { class: "project-dialog__body" }, oe = {
|
|
|
161
161
|
initialName: t == null ? void 0 : t.name,
|
|
162
162
|
onClose: () => u.close(),
|
|
163
163
|
onSaved: (e) => {
|
|
164
|
-
u.close(), t ? p() : o.push(F(e.projectId, "workspace",
|
|
164
|
+
u.close(), t ? p() : o.push(F(e.projectId, "workspace", m.query, { setup: !0 }));
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
});
|
|
@@ -327,7 +327,7 @@ const te = { class: "project-dialog__body" }, oe = {
|
|
|
327
327
|
]);
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
|
-
}), xe = /* @__PURE__ */ U(ve, [["__scopeId", "data-v-
|
|
330
|
+
}), xe = /* @__PURE__ */ U(ve, [["__scopeId", "data-v-e7f1f8c0"]]);
|
|
331
331
|
export {
|
|
332
332
|
xe as default
|
|
333
333
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as p, resolveComponent as i, openBlock as l, createElementBlock as m, createElementVNode as o, createVNode as r, unref as t, withCtx as u, createTextVNode as c } from "vue";
|
|
2
2
|
import { useRoute as d } from "vue-router";
|
|
3
3
|
import { u as g } from "./portalContext-DV-6uUwp.js";
|
|
4
|
-
import { w as f } from "./portalNavigation-
|
|
4
|
+
import { w as f } from "./portalNavigation-C29ihtq_.js";
|
|
5
5
|
import { P as k } from "./PortalIcon-DO0VrIoY.js";
|
|
6
6
|
const w = { class: "portal-page" }, y = { class: "portal-page-inner" }, b = { class: "portal-section portal-empty" }, E = /* @__PURE__ */ p({
|
|
7
7
|
__name: "PagesView",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as i, computed as p, resolveComponent as m, openBlock as c, createElementBlock as u, createElementVNode as e, toDisplayString as a, unref as n, createVNode as r, withCtx as d, createTextVNode as _ } from "vue";
|
|
2
2
|
import { useRoute as g } from "vue-router";
|
|
3
3
|
import { P as f } from "./PortalIcon-DO0VrIoY.js";
|
|
4
|
-
import { p as k } from "./portalNavigation-
|
|
4
|
+
import { p as k } from "./portalNavigation-C29ihtq_.js";
|
|
5
5
|
const y = { class: "portal-page" }, b = { class: "portal-page-inner" }, v = { class: "portal-page-heading" }, h = { class: "portal-section portal-empty" }, P = /* @__PURE__ */ i({
|
|
6
6
|
__name: "PlatformUnavailableView",
|
|
7
7
|
setup(x) {
|
|
@@ -4,7 +4,7 @@ import { e as _, a as $ } from "./index-CIJWcl_6.js";
|
|
|
4
4
|
import { l as B, e as E } from "./controlPlane-sXaC6pAh.js";
|
|
5
5
|
import { useCoreStore as F } from "@feedmepos/mf-common";
|
|
6
6
|
import { u as U } from "./portalContext-DV-6uUwp.js";
|
|
7
|
-
import { l as V } from "./portalNavigation-
|
|
7
|
+
import { l as V } from "./portalNavigation-C29ihtq_.js";
|
|
8
8
|
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const L = { class: "portal-page" }, R = { class: "portal-page-inner settings-page" }, T = { class: "portal-page-heading" }, D = ["href"], H = {
|
|
10
10
|
key: 0,
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as L, ref as o, computed as K, resolveComponent as F, openBlock as s, createBlock as S, withCtx as Q, createElementVNode as a, createElementBlock as i, Fragment as x, createTextVNode as R, toDisplayString as u, createVNode as c, createCommentVNode as v, onMounted as X, renderList as M, normalizeClass as Y } from "vue";
|
|
2
2
|
import { a as k } from "./routes-CeuodIgg.js";
|
|
3
3
|
import { useDialog as Z } from "@feedmepos/ui-library";
|
|
4
4
|
import { useRouter as ee } from "vue-router";
|
|
5
5
|
import { c as C, e as T } from "./controlPlane-sXaC6pAh.js";
|
|
6
|
-
import { _ as
|
|
7
|
-
|
|
6
|
+
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
import { w as te } from "./portalNavigation-C29ihtq_.js";
|
|
8
|
+
const ae = ["href"], le = {
|
|
8
9
|
key: 0,
|
|
9
10
|
class: "portal-error",
|
|
10
11
|
role: "alert"
|
|
11
|
-
},
|
|
12
|
+
}, se = "miniprogram-vue-v2", ie = /* @__PURE__ */ L({
|
|
12
13
|
__name: "ForkTemplateDialog",
|
|
13
14
|
emits: ["close", "created"],
|
|
14
|
-
setup(z, { emit:
|
|
15
|
-
const b =
|
|
15
|
+
setup(z, { emit: I }) {
|
|
16
|
+
const b = I, d = o(""), _ = o(""), P = o(""), p = o(!1), y = o(""), w = o(""), A = o(0), q = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, m = K(
|
|
16
17
|
() => !p.value && q.test(d.value.trim()) && _.value.trim().length > 0 && P.value.trim().length > 0
|
|
17
18
|
);
|
|
18
19
|
async function $() {
|
|
@@ -22,7 +23,7 @@ const te = ["href"], ae = {
|
|
|
22
23
|
const f = await C(k.forkAppTemplate(), {
|
|
23
24
|
method: "POST",
|
|
24
25
|
body: JSON.stringify({
|
|
25
|
-
sourceAppTemplateId:
|
|
26
|
+
sourceAppTemplateId: se,
|
|
26
27
|
newAppTemplateId: d.value.trim(),
|
|
27
28
|
label: _.value.trim(),
|
|
28
29
|
description: P.value.trim()
|
|
@@ -37,8 +38,8 @@ const te = ["href"], ae = {
|
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
return (f, n) => {
|
|
40
|
-
const h = F("FmButton"),
|
|
41
|
-
return s(),
|
|
41
|
+
const h = F("FmButton"), E = F("FmTextField"), j = F("FmTextarea"), O = F("FmCard");
|
|
42
|
+
return s(), S(O, { class: "fork-template-dialog" }, {
|
|
42
43
|
default: Q(() => [
|
|
43
44
|
n[7] || (n[7] = a("h2", null, "Create template", -1)),
|
|
44
45
|
w.value ? (s(), i(x, { key: 0 }, [
|
|
@@ -53,7 +54,7 @@ const te = ["href"], ae = {
|
|
|
53
54
|
href: w.value,
|
|
54
55
|
target: "_blank",
|
|
55
56
|
rel: "noopener"
|
|
56
|
-
}, "Review PR", 8,
|
|
57
|
+
}, "Review PR", 8, ae),
|
|
57
58
|
c(h, {
|
|
58
59
|
label: "Done",
|
|
59
60
|
onClick: n[0] || (n[0] = (g) => b("close"))
|
|
@@ -61,7 +62,7 @@ const te = ["href"], ae = {
|
|
|
61
62
|
])
|
|
62
63
|
], 64)) : (s(), i(x, { key: 1 }, [
|
|
63
64
|
n[6] || (n[6] = a("p", { class: "fork-template-dialog__note" }, " Copies the v2 baseline template's whole directory into a brand-new, independent one — editing the new one can never affect the baseline or any other template. Use this to start a new restaurant style rather than editing a style that other merchants already share. ", -1)),
|
|
64
|
-
c(
|
|
65
|
+
c(E, {
|
|
65
66
|
modelValue: d.value,
|
|
66
67
|
"onUpdate:modelValue": n[1] || (n[1] = (g) => d.value = g),
|
|
67
68
|
label: "New template id",
|
|
@@ -70,21 +71,21 @@ const te = ["href"], ae = {
|
|
|
70
71
|
disabled: p.value,
|
|
71
72
|
rules: [(g) => q.test(g.trim()) || "Lowercase kebab-case, e.g. miniprogram-vue-v2-bakery"]
|
|
72
73
|
}, null, 8, ["modelValue", "disabled", "rules"]),
|
|
73
|
-
c(
|
|
74
|
+
c(E, {
|
|
74
75
|
modelValue: _.value,
|
|
75
76
|
"onUpdate:modelValue": n[2] || (n[2] = (g) => _.value = g),
|
|
76
77
|
label: "Label",
|
|
77
78
|
placeholder: "Shown to merchants in the picker",
|
|
78
79
|
disabled: p.value
|
|
79
80
|
}, null, 8, ["modelValue", "disabled"]),
|
|
80
|
-
c(
|
|
81
|
+
c(j, {
|
|
81
82
|
modelValue: P.value,
|
|
82
83
|
"onUpdate:modelValue": n[3] || (n[3] = (g) => P.value = g),
|
|
83
84
|
label: "Description",
|
|
84
85
|
placeholder: "One or two sentences on what the merchant gets",
|
|
85
86
|
disabled: p.value
|
|
86
87
|
}, null, 8, ["modelValue", "disabled"]),
|
|
87
|
-
y.value ? (s(), i("p",
|
|
88
|
+
y.value ? (s(), i("p", le, u(y.value), 1)) : v("", !0),
|
|
88
89
|
a("footer", null, [
|
|
89
90
|
c(h, {
|
|
90
91
|
label: "Cancel",
|
|
@@ -105,35 +106,35 @@ const te = ["href"], ae = {
|
|
|
105
106
|
});
|
|
106
107
|
};
|
|
107
108
|
}
|
|
108
|
-
}),
|
|
109
|
+
}), ne = /* @__PURE__ */ B(ie, [["__scopeId", "data-v-5a38928f"]]), oe = { class: "portal-page" }, re = { class: "portal-page-inner" }, ue = { class: "portal-page-heading" }, de = { class: "portal-page-heading__actions" }, ce = {
|
|
109
110
|
key: 0,
|
|
110
111
|
class: "portal-error",
|
|
111
112
|
role: "alert"
|
|
112
|
-
},
|
|
113
|
+
}, pe = {
|
|
113
114
|
key: 1,
|
|
114
115
|
"aria-label": "Templates in review"
|
|
115
|
-
},
|
|
116
|
+
}, me = { class: "template-section-heading" }, ve = {
|
|
116
117
|
key: 0,
|
|
117
118
|
class: "portal-error",
|
|
118
119
|
role: "alert"
|
|
119
|
-
},
|
|
120
|
+
}, he = {
|
|
120
121
|
key: 1,
|
|
121
122
|
class: "template-choices__list",
|
|
122
123
|
"aria-label": "Templates in review"
|
|
123
|
-
},
|
|
124
|
+
}, ge = { class: "template-choices__name" }, be = { class: "template-choices__label" }, _e = { key: 0 }, fe = { class: "template-choices__id" }, ye = { class: "template-choices__actions" }, ke = ["href"], we = { class: "template-section-heading" }, Ce = {
|
|
124
125
|
key: 2,
|
|
125
126
|
class: "portal-error",
|
|
126
127
|
role: "alert"
|
|
127
|
-
},
|
|
128
|
+
}, Te = {
|
|
128
129
|
class: "template-choices__list",
|
|
129
130
|
"aria-label": "Physical templates"
|
|
130
|
-
},
|
|
131
|
+
}, Re = { class: "template-choices__name" }, Pe = { class: "template-choices__label" }, Ae = { key: 0 }, qe = { class: "template-choices__id" }, $e = { class: "template-choices__meta" }, Ne = {
|
|
131
132
|
key: 0,
|
|
132
133
|
class: "template-status-badge template-status-badge--draft"
|
|
133
|
-
},
|
|
134
|
+
}, xe = { class: "template-choices__actions" }, De = /* @__PURE__ */ L({
|
|
134
135
|
__name: "TemplateCenterView",
|
|
135
136
|
setup(z) {
|
|
136
|
-
const
|
|
137
|
+
const I = ee(), b = Z(), d = o(""), _ = o(null), P = o([]), p = o(!1), y = o("");
|
|
137
138
|
async function w() {
|
|
138
139
|
p.value = !0, y.value = "";
|
|
139
140
|
try {
|
|
@@ -163,12 +164,12 @@ const te = ["href"], ae = {
|
|
|
163
164
|
function n() {
|
|
164
165
|
b.open({
|
|
165
166
|
title: "Create template",
|
|
166
|
-
dialogComponent:
|
|
167
|
+
dialogComponent: ne,
|
|
167
168
|
dialogComponentProps: { onClose: () => b.close(), onCreated: () => void f() }
|
|
168
169
|
});
|
|
169
170
|
}
|
|
170
171
|
const h = o(null);
|
|
171
|
-
async function
|
|
172
|
+
async function E(e) {
|
|
172
173
|
h.value = e.pullRequestNumber, m.value = "";
|
|
173
174
|
try {
|
|
174
175
|
await C(k.mergePendingTemplateChange(e.pullRequestNumber), { method: "POST" }), await f();
|
|
@@ -178,7 +179,7 @@ const te = ["href"], ae = {
|
|
|
178
179
|
h.value = null;
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
|
-
async function
|
|
182
|
+
async function j(e) {
|
|
182
183
|
h.value = e.pullRequestNumber, m.value = "";
|
|
183
184
|
try {
|
|
184
185
|
await C(k.rejectPendingTemplateChange(e.pullRequestNumber), { method: "POST" }), await f();
|
|
@@ -195,7 +196,7 @@ const te = ["href"], ae = {
|
|
|
195
196
|
message: e.kind === "delete" ? `Merges the pull request into main as-is, without a code review step here. templates/${e.appTemplateId}/ is gone from this repo and its registry row is removed immediately — no control-plane redeploy involved.` : 'Merges the pull request into main as-is, without a code review step here. "Edit code" becomes available for it right away — it stays a draft, invisible to merchants, until you publish it below.',
|
|
196
197
|
primaryActions: { text: "Merge", close: !0, variant: "primary" },
|
|
197
198
|
secondaryActions: { text: "Cancel", close: !0, variant: "tertiary" }
|
|
198
|
-
}).onPrimary(() => void
|
|
199
|
+
}).onPrimary(() => void E(e));
|
|
199
200
|
}
|
|
200
201
|
function g(e) {
|
|
201
202
|
b.open({
|
|
@@ -203,17 +204,17 @@ const te = ["href"], ae = {
|
|
|
203
204
|
message: "Closes the pull request without merging and deletes its branch. Nothing of this change is kept.",
|
|
204
205
|
primaryActions: { text: "Reject", close: !0, variant: "destructive" },
|
|
205
206
|
secondaryActions: { text: "Cancel", close: !0, variant: "tertiary" }
|
|
206
|
-
}).onPrimary(() => void
|
|
207
|
+
}).onPrimary(() => void j(e));
|
|
207
208
|
}
|
|
208
|
-
const
|
|
209
|
+
const V = o(null);
|
|
209
210
|
async function G(e) {
|
|
210
|
-
|
|
211
|
+
V.value = e, d.value = "";
|
|
211
212
|
try {
|
|
212
213
|
await C(k.deleteAppTemplate(e), { method: "POST" }), await $();
|
|
213
214
|
} catch (l) {
|
|
214
215
|
d.value = T(l);
|
|
215
216
|
} finally {
|
|
216
|
-
|
|
217
|
+
V.value = null;
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
function H(e) {
|
|
@@ -253,11 +254,9 @@ const te = ["href"], ae = {
|
|
|
253
254
|
k.appTemplateEditingProject(e),
|
|
254
255
|
{ method: "POST" }
|
|
255
256
|
);
|
|
256
|
-
await
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
query: { tpl: "1" }
|
|
260
|
-
});
|
|
257
|
+
await I.push(
|
|
258
|
+
te(l.projectId, "workspace", I.currentRoute.value.query, { templateEditing: !0 })
|
|
259
|
+
);
|
|
261
260
|
} catch (l) {
|
|
262
261
|
d.value = T(l);
|
|
263
262
|
} finally {
|
|
@@ -267,14 +266,14 @@ const te = ["href"], ae = {
|
|
|
267
266
|
}
|
|
268
267
|
return (e, l) => {
|
|
269
268
|
const r = F("FmButton");
|
|
270
|
-
return s(), i("div",
|
|
271
|
-
a("div",
|
|
272
|
-
a("header",
|
|
269
|
+
return s(), i("div", oe, [
|
|
270
|
+
a("div", re, [
|
|
271
|
+
a("header", ue, [
|
|
273
272
|
l[1] || (l[1] = a("div", null, [
|
|
274
273
|
a("p", { class: "portal-eyebrow" }, "Internal"),
|
|
275
274
|
a("h1", null, "Template library")
|
|
276
275
|
], -1)),
|
|
277
|
-
a("div",
|
|
276
|
+
a("div", de, [
|
|
278
277
|
c(r, {
|
|
279
278
|
label: "Create template",
|
|
280
279
|
variant: "primary",
|
|
@@ -282,9 +281,9 @@ const te = ["href"], ae = {
|
|
|
282
281
|
})
|
|
283
282
|
])
|
|
284
283
|
]),
|
|
285
|
-
d.value ? (s(), i("p",
|
|
286
|
-
m.value || A.value.length > 0 ? (s(), i("section",
|
|
287
|
-
a("div",
|
|
284
|
+
d.value ? (s(), i("p", ce, u(d.value), 1)) : v("", !0),
|
|
285
|
+
m.value || A.value.length > 0 ? (s(), i("section", pe, [
|
|
286
|
+
a("div", me, [
|
|
288
287
|
l[2] || (l[2] = a("h2", { class: "template-section-title" }, "In review", -1)),
|
|
289
288
|
c(r, {
|
|
290
289
|
label: "Refresh",
|
|
@@ -295,7 +294,7 @@ const te = ["href"], ae = {
|
|
|
295
294
|
}, null, 8, ["loading"])
|
|
296
295
|
]),
|
|
297
296
|
l[3] || (l[3] = a("p", { class: "template-section-note" }, " Waiting on PR review and merge. A row disappears on its own once its pull request merges or is closed — click Refresh to check. ", -1)),
|
|
298
|
-
m.value ? (s(), i("p",
|
|
297
|
+
m.value ? (s(), i("p", ve, [
|
|
299
298
|
R(u(m.value) + " ", 1),
|
|
300
299
|
c(r, {
|
|
301
300
|
label: "Retry",
|
|
@@ -303,25 +302,25 @@ const te = ["href"], ae = {
|
|
|
303
302
|
onClick: $
|
|
304
303
|
})
|
|
305
304
|
])) : v("", !0),
|
|
306
|
-
A.value.length > 0 ? (s(), i("section",
|
|
305
|
+
A.value.length > 0 ? (s(), i("section", he, [
|
|
307
306
|
(s(!0), i(x, null, M(A.value, (t) => (s(), i("article", {
|
|
308
307
|
key: t.pullRequestNumber,
|
|
309
308
|
class: "template-choices__row"
|
|
310
309
|
}, [
|
|
311
|
-
a("div",
|
|
312
|
-
a("span",
|
|
310
|
+
a("div", ge, [
|
|
311
|
+
a("span", be, [
|
|
313
312
|
R(u(t.appTemplateId), 1),
|
|
314
|
-
t.kind === "delete" ? (s(), i("span",
|
|
313
|
+
t.kind === "delete" ? (s(), i("span", _e, " · Delete")) : v("", !0)
|
|
315
314
|
]),
|
|
316
|
-
a("span",
|
|
315
|
+
a("span", fe, "Awaiting review — PR #" + u(t.pullRequestNumber), 1)
|
|
317
316
|
]),
|
|
318
|
-
a("div",
|
|
317
|
+
a("div", ye, [
|
|
319
318
|
a("a", {
|
|
320
319
|
class: "template-review-link",
|
|
321
320
|
href: t.pullRequestUrl,
|
|
322
321
|
target: "_blank",
|
|
323
322
|
rel: "noopener"
|
|
324
|
-
}, "Review PR", 8,
|
|
323
|
+
}, "Review PR", 8, ke),
|
|
325
324
|
c(r, {
|
|
326
325
|
label: "Merge",
|
|
327
326
|
variant: "primary",
|
|
@@ -339,7 +338,7 @@ const te = ["href"], ae = {
|
|
|
339
338
|
]))), 128))
|
|
340
339
|
])) : v("", !0)
|
|
341
340
|
])) : v("", !0),
|
|
342
|
-
a("div",
|
|
341
|
+
a("div", we, [
|
|
343
342
|
l[4] || (l[4] = a("h2", { class: "template-section-title" }, "Physical templates", -1)),
|
|
344
343
|
c(r, {
|
|
345
344
|
label: "Refresh",
|
|
@@ -350,7 +349,7 @@ const te = ["href"], ae = {
|
|
|
350
349
|
}, null, 8, ["loading"])
|
|
351
350
|
]),
|
|
352
351
|
l[5] || (l[5] = a("p", { class: "template-section-note" }, ' "Edit code" opens the physical template directly — the same chat + live preview a merchant project gets, saving straight to a pull request against this repo instead of a merchant repo. A draft is invisible to merchants until Published; "Delete" opens a PR removing it instead — refused outright for the default template or one any project still uses. ', -1)),
|
|
353
|
-
y.value ? (s(), i("p",
|
|
352
|
+
y.value ? (s(), i("p", Ce, [
|
|
354
353
|
R(u(y.value) + " ", 1),
|
|
355
354
|
c(r, {
|
|
356
355
|
label: "Retry",
|
|
@@ -358,38 +357,38 @@ const te = ["href"], ae = {
|
|
|
358
357
|
onClick: w
|
|
359
358
|
})
|
|
360
359
|
])) : v("", !0),
|
|
361
|
-
a("section",
|
|
360
|
+
a("section", Te, [
|
|
362
361
|
(s(!0), i(x, null, M(P.value, (t) => (s(), i("article", {
|
|
363
362
|
key: t.id,
|
|
364
363
|
class: "template-choices__row"
|
|
365
364
|
}, [
|
|
366
|
-
a("div",
|
|
367
|
-
a("span",
|
|
365
|
+
a("div", Re, [
|
|
366
|
+
a("span", Pe, [
|
|
368
367
|
R(u(t.label), 1),
|
|
369
|
-
t.default ? (s(), i("span",
|
|
368
|
+
t.default ? (s(), i("span", Ae, " · Default")) : v("", !0)
|
|
370
369
|
]),
|
|
371
|
-
a("span",
|
|
372
|
-
a("span",
|
|
370
|
+
a("span", qe, u(t.id), 1),
|
|
371
|
+
a("span", $e, [
|
|
373
372
|
t.restaurantStyle ? (s(), i(x, { key: 0 }, [
|
|
374
373
|
R(u(t.restaurantStyle) + " · ", 1)
|
|
375
374
|
], 64)) : v("", !0),
|
|
376
375
|
R(u(t.industries.join(", ") || "General-purpose") + " · " + u(t.environments.join(", ")), 1)
|
|
377
376
|
])
|
|
378
377
|
]),
|
|
379
|
-
t.pullRequestNumber ? (s(), i("span",
|
|
378
|
+
t.pullRequestNumber ? (s(), i("span", Ne, " Awaiting merge — PR #" + u(t.pullRequestNumber), 1)) : (s(), i("span", {
|
|
380
379
|
key: 1,
|
|
381
380
|
class: Y(["template-status-badge", `template-status-badge--${t.status}`])
|
|
382
381
|
}, u(t.status === "published" ? "Published" : "Draft"), 3)),
|
|
383
|
-
a("div",
|
|
382
|
+
a("div", xe, [
|
|
384
383
|
t.pullRequestNumber ? v("", !0) : (s(), i(x, { key: 0 }, [
|
|
385
|
-
t.status === "draft" ? (s(),
|
|
384
|
+
t.status === "draft" ? (s(), S(r, {
|
|
386
385
|
key: 0,
|
|
387
386
|
label: "Publish",
|
|
388
387
|
variant: "primary",
|
|
389
388
|
loading: N.value === t.id,
|
|
390
389
|
disabled: N.value !== null,
|
|
391
390
|
onClick: (D) => U(t.id, !0)
|
|
392
|
-
}, null, 8, ["loading", "disabled", "onClick"])) : t.default ? v("", !0) : (s(),
|
|
391
|
+
}, null, 8, ["loading", "disabled", "onClick"])) : t.default ? v("", !0) : (s(), S(r, {
|
|
393
392
|
key: 1,
|
|
394
393
|
label: "Unpublish",
|
|
395
394
|
variant: "secondary",
|
|
@@ -405,12 +404,12 @@ const te = ["href"], ae = {
|
|
|
405
404
|
onClick: (D) => W(t.id)
|
|
406
405
|
}, null, 8, ["loading", "disabled", "onClick"])
|
|
407
406
|
], 64)),
|
|
408
|
-
!t.default && !t.pullRequestNumber ? (s(),
|
|
407
|
+
!t.default && !t.pullRequestNumber ? (s(), S(r, {
|
|
409
408
|
key: 1,
|
|
410
409
|
label: "Delete",
|
|
411
410
|
variant: "destructive",
|
|
412
|
-
loading:
|
|
413
|
-
disabled:
|
|
411
|
+
loading: V.value === t.id,
|
|
412
|
+
disabled: V.value !== null,
|
|
414
413
|
onClick: (D) => H(t.id)
|
|
415
414
|
}, null, 8, ["loading", "disabled", "onClick"])) : v("", !0)
|
|
416
415
|
])
|
|
@@ -420,7 +419,7 @@ const te = ["href"], ae = {
|
|
|
420
419
|
]);
|
|
421
420
|
};
|
|
422
421
|
}
|
|
423
|
-
}),
|
|
422
|
+
}), Ue = /* @__PURE__ */ B(De, [["__scopeId", "data-v-0206eae6"]]);
|
|
424
423
|
export {
|
|
425
|
-
|
|
424
|
+
Ue as default
|
|
426
425
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as s, watchEffect as a, openBlock as n, createElementBlock as p } from "vue";
|
|
2
2
|
import { useRoute as u, useRouter as i } from "vue-router";
|
|
3
3
|
import { u as l } from "./portalContext-DV-6uUwp.js";
|
|
4
|
-
import { w as m, a as f } from "./portalNavigation-
|
|
4
|
+
import { w as m, a as f } from "./portalNavigation-C29ihtq_.js";
|
|
5
5
|
const _ = {
|
|
6
6
|
class: "portal-loading",
|
|
7
7
|
role: "status"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { a as u } from "./routes-CeuodIgg.js";
|
|
2
|
+
import { ref as o } from "vue";
|
|
3
|
+
import { c as a } from "./controlPlane-sXaC6pAh.js";
|
|
4
|
+
function l(e, t) {
|
|
5
|
+
if (typeof window > "u") return t;
|
|
6
|
+
try {
|
|
7
|
+
const n = window.localStorage.getItem(e);
|
|
8
|
+
return n === null ? t : n === "1";
|
|
9
|
+
} catch {
|
|
10
|
+
return t;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function w(e, t) {
|
|
14
|
+
if (typeof window > "u") return t;
|
|
15
|
+
try {
|
|
16
|
+
const n = Number(window.localStorage.getItem(e));
|
|
17
|
+
return Number.isFinite(n) ? n : t;
|
|
18
|
+
} catch {
|
|
19
|
+
return t;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function f(e, t) {
|
|
23
|
+
if (!(typeof window > "u"))
|
|
24
|
+
try {
|
|
25
|
+
window.localStorage.setItem(e, t);
|
|
26
|
+
} catch {
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function h(e, t) {
|
|
30
|
+
f(e, t ? "1" : "0");
|
|
31
|
+
}
|
|
32
|
+
let r = null;
|
|
33
|
+
function i() {
|
|
34
|
+
return r || (r = a(u.adminWhoami()).catch(() => ({
|
|
35
|
+
isAdmin: !1,
|
|
36
|
+
isFeedMeStaff: !1
|
|
37
|
+
}))), r;
|
|
38
|
+
}
|
|
39
|
+
function d() {
|
|
40
|
+
return i().then((e) => e.isAdmin);
|
|
41
|
+
}
|
|
42
|
+
function S() {
|
|
43
|
+
const e = o(!1);
|
|
44
|
+
return d().then((t) => {
|
|
45
|
+
e.value = t;
|
|
46
|
+
}), e;
|
|
47
|
+
}
|
|
48
|
+
function p() {
|
|
49
|
+
const e = o(!1);
|
|
50
|
+
return i().then((t) => {
|
|
51
|
+
e.value = t.isFeedMeStaff === !0;
|
|
52
|
+
}), e;
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
p as a,
|
|
56
|
+
w as b,
|
|
57
|
+
f as c,
|
|
58
|
+
l as r,
|
|
59
|
+
S as u,
|
|
60
|
+
h as w
|
|
61
|
+
};
|
package/dist/app.js
CHANGED
|
@@ -4,24 +4,24 @@ const o = [
|
|
|
4
4
|
path: "/platforms/mobile",
|
|
5
5
|
name: "miniprogram-v2-mobile-projects",
|
|
6
6
|
meta: { title: "Mobile" },
|
|
7
|
-
component: () => import("./MobileProjectsView-
|
|
7
|
+
component: () => import("./MobileProjectsView-aAyHV5G-.js")
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
path: "/",
|
|
11
11
|
name: "miniprogram-v2-ecosystem",
|
|
12
12
|
meta: { title: "Ecosystem" },
|
|
13
13
|
beforeEnter: (e) => ["workspace", "releases", "sessions"].includes(String(e.query.view)) ? { name: "miniprogram-v2-control", query: e.query } : !0,
|
|
14
|
-
component: () => import("./EcosystemView-
|
|
14
|
+
component: () => import("./EcosystemView-XP9IZ9wn.js")
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
path: "/workspace",
|
|
18
18
|
name: "miniprogram-v2-control",
|
|
19
|
-
component: () => import("./WorkspaceEntryView-
|
|
19
|
+
component: () => import("./WorkspaceEntryView-DQkYJWdf.js")
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
path: "/p/:projectId/:view(workspace|releases|sessions)?",
|
|
23
23
|
name: "miniprogram-v2-project",
|
|
24
|
-
component: () => import("./ControlPlaneView-
|
|
24
|
+
component: () => import("./ControlPlaneView-qDA8RgiR.js")
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
path: "/brand-kit",
|
|
@@ -33,19 +33,19 @@ const o = [
|
|
|
33
33
|
path: "/pages",
|
|
34
34
|
name: "miniprogram-v2-pages",
|
|
35
35
|
meta: { title: "Pages" },
|
|
36
|
-
component: () => import("./PagesView-
|
|
36
|
+
component: () => import("./PagesView-DzDqCd8N.js")
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
path: "/settings",
|
|
40
40
|
name: "miniprogram-v2-settings",
|
|
41
41
|
meta: { title: "Settings" },
|
|
42
|
-
component: () => import("./PortalSettingsView-
|
|
42
|
+
component: () => import("./PortalSettingsView-Df5jChmi.js")
|
|
43
43
|
},
|
|
44
44
|
...["tablet", "kiosk"].map((e) => ({
|
|
45
45
|
path: `/platforms/${e}`,
|
|
46
46
|
name: `miniprogram-v2-${e}`,
|
|
47
47
|
meta: { title: e === "tablet" ? "Tablet" : "Kiosk", kind: e },
|
|
48
|
-
component: () => import("./PlatformUnavailableView-
|
|
48
|
+
component: () => import("./PlatformUnavailableView-CdHjkolw.js")
|
|
49
49
|
})),
|
|
50
50
|
{
|
|
51
51
|
// The shared component library, not this merchant's workspace — which is
|
|
@@ -72,13 +72,13 @@ const o = [
|
|
|
72
72
|
path: "/internal/template-center",
|
|
73
73
|
name: "miniprogram-v2-template-center",
|
|
74
74
|
meta: { title: "Template library", requiresAdmin: !0 },
|
|
75
|
-
component: () => import("./TemplateCenterView-
|
|
75
|
+
component: () => import("./TemplateCenterView-DrWImUYO.js")
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
path: "/:pathMatch(.*)*",
|
|
79
79
|
redirect: (e) => ({ name: "miniprogram-v2-ecosystem", query: e.query, params: {} })
|
|
80
80
|
}
|
|
81
|
-
], r = {}, a = t(() => import("./App-
|
|
81
|
+
], r = {}, a = t(() => import("./App-C8Vn8LvE.js")), i = t(() => import("./LegacyWorkspaceEntry-lEMtmdIe.js"));
|
|
82
82
|
export {
|
|
83
83
|
a as FmApp,
|
|
84
84
|
i as MiniprogramWorkspace,
|
package/dist/package.json
CHANGED
|
@@ -2,14 +2,18 @@ function a(r) {
|
|
|
2
2
|
return r === "releases" || r === "sessions" ? r : "workspace";
|
|
3
3
|
}
|
|
4
4
|
function o(r) {
|
|
5
|
-
const { view: n,
|
|
6
|
-
return
|
|
5
|
+
const { view: n, tpl: e, setup: t, ...s } = r;
|
|
6
|
+
return s;
|
|
7
7
|
}
|
|
8
|
-
function i(r, n, e) {
|
|
8
|
+
function i(r, n, e, t = {}) {
|
|
9
9
|
return {
|
|
10
10
|
name: "miniprogram-v2-project",
|
|
11
11
|
params: { projectId: r, view: n === "workspace" ? void 0 : n },
|
|
12
|
-
query:
|
|
12
|
+
query: {
|
|
13
|
+
...o(e),
|
|
14
|
+
...t.templateEditing ? { tpl: "1" } : {},
|
|
15
|
+
...t.setup ? { setup: "1" } : {}
|
|
16
|
+
}
|
|
13
17
|
};
|
|
14
18
|
}
|
|
15
19
|
function c(r, n, e) {
|
|
@@ -17,7 +21,7 @@ function c(r, n, e) {
|
|
|
17
21
|
const t = o(r.query);
|
|
18
22
|
return typeof t.businessId == "string" && (t.businessId = e), { name: "miniprogram-v2-mobile-projects", query: t };
|
|
19
23
|
}
|
|
20
|
-
function
|
|
24
|
+
function p(r, n = "settings") {
|
|
21
25
|
const e = new URLSearchParams();
|
|
22
26
|
for (const t of ["businessId", "country", "restaurantId"]) {
|
|
23
27
|
const s = r[t];
|
|
@@ -28,7 +32,7 @@ function u(r, n = "settings") {
|
|
|
28
32
|
export {
|
|
29
33
|
a,
|
|
30
34
|
c as e,
|
|
31
|
-
|
|
35
|
+
p as l,
|
|
32
36
|
o as p,
|
|
33
37
|
i as w
|
|
34
38
|
};
|