@webx-ui/module-inbox 0.9.1 → 0.10.0
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/{FormEditorPage-C3ULFulJ.js → FormEditorPage-CXYnpKAh.js} +261 -248
- package/dist/FormEditorPage-CXYnpKAh.js.map +1 -0
- package/dist/{InboxPage-DsYFI3g9.js → InboxPage-PAtQ48A2.js} +2 -2
- package/dist/{InboxPage-DsYFI3g9.js.map → InboxPage-PAtQ48A2.js.map} +1 -1
- package/dist/{StatusesPage-DIrk5z13.js → StatusesPage-xVeRPm4u.js} +2 -2
- package/dist/{StatusesPage-DIrk5z13.js.map → StatusesPage-xVeRPm4u.js.map} +1 -1
- package/dist/{SubmissionPage-BUd7Gd7d.js → SubmissionPage-DI8jAaud.js} +2 -2
- package/dist/{SubmissionPage-BUd7Gd7d.js.map → SubmissionPage-DI8jAaud.js.map} +1 -1
- package/dist/{index-CZWksX_k.js → index-BJ-mLCee.js} +233 -231
- package/dist/index-BJ-mLCee.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +2 -2
- package/dist/FormEditorPage-C3ULFulJ.js.map +0 -1
- package/dist/index-CZWksX_k.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as D, useModel as H, computed as
|
|
1
|
+
import { defineComponent as D, useModel as H, computed as y, openBlock as x, createBlock as w, unref as e, withCtx as t, createVNode as l, isRef as T, createTextVNode as V, toDisplayString as _, createCommentVNode as F, mergeModels as ae, createElementBlock as N, createElementVNode as A, ref as I, onMounted as ve, Fragment as de, renderList as be, reactive as xe, watch as ye } from "vue";
|
|
2
2
|
import { useRouter as re, useRoute as ge } from "vue-router";
|
|
3
|
-
import { useTranslate as G, useAdmin as ne, emptyLink as se, WxLinkPicker as _e, WxRelationsField as he, useErrorText as
|
|
4
|
-
import { WxCard as B, WxFormItem as W, WxSwitch as pe, WxInputNumber as ue, WxSelect as le, WxText as S, WxAlert as oe, WxAction as K, WxTable as we, toast as
|
|
5
|
-
import { o as C, u as me, _ as J, a as Ne, c as ce, F as Ee } from "./index-
|
|
3
|
+
import { useTranslate as G, useAdmin as ne, emptyLink as se, WxLinkPicker as _e, WxRelationsField as he, useErrorText as Ve, WxScreenHead as ke } from "@webx-ui/module-admin";
|
|
4
|
+
import { WxCard as B, WxFormItem as W, WxSwitch as pe, WxInputNumber as ue, WxSelect as le, WxText as S, WxAlert as oe, WxAction as K, WxTable as we, toast as P, WxInput as q, WxRadioGroup as $e, WxSpace as Ue, WxButton as te, WxIcon as We, WxLink as ze, confirm as Fe, useLocales as Se, localizedValue as Ce, WxSkeleton as Te, WxBadge as Ae, WxTabs as Be, WxTab as R, WxActionBar as Ie } from "@webx-ui/core";
|
|
5
|
+
import { o as C, u as me, _ as J, a as Ne, c as ce, F as Ee } from "./index-BJ-mLCee.js";
|
|
6
6
|
const Le = /* @__PURE__ */ D({
|
|
7
7
|
__name: "FormAntispam",
|
|
8
8
|
props: /* @__PURE__ */ ae({
|
|
@@ -13,39 +13,39 @@ const Le = /* @__PURE__ */ D({
|
|
|
13
13
|
}),
|
|
14
14
|
emits: ["update:modelValue"],
|
|
15
15
|
setup(v) {
|
|
16
|
-
const
|
|
17
|
-
{ value: "off", label:
|
|
18
|
-
{ value: "recaptcha", label:
|
|
19
|
-
{ value: "turnstile", label:
|
|
20
|
-
]),
|
|
21
|
-
const
|
|
22
|
-
return
|
|
23
|
-
}),
|
|
24
|
-
const
|
|
25
|
-
return
|
|
16
|
+
const m = H(v, "modelValue"), u = v, o = G("webx-inbox"), k = C(m, "antispam.honeypot", !0), i = C(m, "antispam.min_seconds", 3), $ = C(m, "antispam.throttle", 5), r = C(m, "antispam.captcha", "off"), U = y(() => [
|
|
17
|
+
{ value: "off", label: o("panel.captcha-off") },
|
|
18
|
+
{ value: "recaptcha", label: o("panel.captcha-recaptcha") },
|
|
19
|
+
{ value: "turnstile", label: o("panel.captcha-turnstile") }
|
|
20
|
+
]), c = y(() => {
|
|
21
|
+
const p = r.value;
|
|
22
|
+
return p !== "recaptcha" && p !== "turnstile" ? null : { provider: p, site: u.site?.[p] ?? null };
|
|
23
|
+
}), g = y(() => {
|
|
24
|
+
const p = c.value?.site;
|
|
25
|
+
return p ? o(`panel.captcha-${c.value.provider}-${p.type}`) : null;
|
|
26
26
|
});
|
|
27
|
-
return (
|
|
27
|
+
return (p, n) => (x(), w(e(B), null, {
|
|
28
28
|
default: t(() => [
|
|
29
29
|
l(e(W), {
|
|
30
|
-
help: e(
|
|
30
|
+
help: e(o)("panel.honeypot-help")
|
|
31
31
|
}, {
|
|
32
32
|
default: t(() => [
|
|
33
33
|
l(e(pe), {
|
|
34
|
-
modelValue: e(
|
|
35
|
-
"onUpdate:modelValue":
|
|
36
|
-
label: e(
|
|
34
|
+
modelValue: e(k),
|
|
35
|
+
"onUpdate:modelValue": n[0] || (n[0] = (h) => T(k) ? k.value = h : null),
|
|
36
|
+
label: e(o)("panel.honeypot")
|
|
37
37
|
}, null, 8, ["modelValue", "label"])
|
|
38
38
|
]),
|
|
39
39
|
_: 1
|
|
40
40
|
}, 8, ["help"]),
|
|
41
41
|
l(e(W), {
|
|
42
|
-
label: e(
|
|
43
|
-
help: e(
|
|
42
|
+
label: e(o)("panel.min-seconds"),
|
|
43
|
+
help: e(o)("panel.min-seconds-help")
|
|
44
44
|
}, {
|
|
45
45
|
default: t(() => [
|
|
46
46
|
l(e(ue), {
|
|
47
|
-
modelValue: e(
|
|
48
|
-
"onUpdate:modelValue":
|
|
47
|
+
modelValue: e(i),
|
|
48
|
+
"onUpdate:modelValue": n[1] || (n[1] = (h) => T(i) ? i.value = h : null),
|
|
49
49
|
min: 0,
|
|
50
50
|
max: 120
|
|
51
51
|
}, null, 8, ["modelValue"])
|
|
@@ -53,13 +53,13 @@ const Le = /* @__PURE__ */ D({
|
|
|
53
53
|
_: 1
|
|
54
54
|
}, 8, ["label", "help"]),
|
|
55
55
|
l(e(W), {
|
|
56
|
-
label: e(
|
|
57
|
-
help: e(
|
|
56
|
+
label: e(o)("panel.throttle"),
|
|
57
|
+
help: e(o)("panel.throttle-help")
|
|
58
58
|
}, {
|
|
59
59
|
default: t(() => [
|
|
60
60
|
l(e(ue), {
|
|
61
61
|
modelValue: e($),
|
|
62
|
-
"onUpdate:modelValue":
|
|
62
|
+
"onUpdate:modelValue": n[2] || (n[2] = (h) => T($) ? $.value = h : null),
|
|
63
63
|
min: 0,
|
|
64
64
|
max: 120
|
|
65
65
|
}, null, 8, ["modelValue"])
|
|
@@ -67,34 +67,34 @@ const Le = /* @__PURE__ */ D({
|
|
|
67
67
|
_: 1
|
|
68
68
|
}, 8, ["label", "help"]),
|
|
69
69
|
l(e(W), {
|
|
70
|
-
label: e(
|
|
71
|
-
help: e(
|
|
70
|
+
label: e(o)("panel.captcha"),
|
|
71
|
+
help: e(o)("panel.captcha-keys")
|
|
72
72
|
}, {
|
|
73
73
|
default: t(() => [
|
|
74
74
|
l(e(le), {
|
|
75
75
|
modelValue: e(r),
|
|
76
|
-
"onUpdate:modelValue":
|
|
76
|
+
"onUpdate:modelValue": n[3] || (n[3] = (h) => T(r) ? r.value = h : null),
|
|
77
77
|
options: U.value
|
|
78
78
|
}, null, 8, ["modelValue", "options"])
|
|
79
79
|
]),
|
|
80
80
|
_: 1
|
|
81
81
|
}, 8, ["label", "help"]),
|
|
82
|
-
|
|
82
|
+
g.value ? (x(), w(e(S), {
|
|
83
83
|
key: 0,
|
|
84
84
|
size: "sm",
|
|
85
85
|
tone: "muted"
|
|
86
86
|
}, {
|
|
87
87
|
default: t(() => [
|
|
88
|
-
|
|
88
|
+
V(_(g.value), 1)
|
|
89
89
|
]),
|
|
90
90
|
_: 1
|
|
91
91
|
})) : F("", !0),
|
|
92
|
-
|
|
92
|
+
c.value?.site && !c.value.site.configured ? (x(), w(e(oe), {
|
|
93
93
|
key: 1,
|
|
94
94
|
type: "warning",
|
|
95
95
|
variant: "soft",
|
|
96
96
|
closable: !1,
|
|
97
|
-
description: e(
|
|
97
|
+
description: e(o)("panel.captcha-unconfigured")
|
|
98
98
|
}, null, 8, ["description"])) : F("", !0)
|
|
99
99
|
]),
|
|
100
100
|
_: 1
|
|
@@ -108,32 +108,32 @@ const Le = /* @__PURE__ */ D({
|
|
|
108
108
|
fields: {}
|
|
109
109
|
},
|
|
110
110
|
setup(v) {
|
|
111
|
-
const
|
|
111
|
+
const m = v;
|
|
112
112
|
me();
|
|
113
|
-
const
|
|
114
|
-
() =>
|
|
115
|
-
),
|
|
116
|
-
() =>
|
|
117
|
-
<x-webx-inbox::form slug="${
|
|
118
|
-
), r =
|
|
119
|
-
() =>
|
|
120
|
-
), U =
|
|
121
|
-
() => `<x-webx-inbox::form slug="${
|
|
122
|
-
<x-webx-inbox::form slug="${
|
|
123
|
-
),
|
|
124
|
-
{ key: "key", label:
|
|
125
|
-
{ key: "title", label:
|
|
126
|
-
{ key: "type", label:
|
|
127
|
-
]),
|
|
128
|
-
async function
|
|
113
|
+
const u = G("webx-inbox"), o = ne(), k = y(
|
|
114
|
+
() => o.state.manifest?.modules.some((n) => n.id === "blocks") ?? !1
|
|
115
|
+
), i = y(() => `<x-webx-inbox::form slug="${m.slug}" />`), $ = y(
|
|
116
|
+
() => k.value ? i.value : `{{-- resources/views/blocks/contact.blade.php --}}
|
|
117
|
+
<x-webx-inbox::form slug="${m.slug}" />`
|
|
118
|
+
), r = y(
|
|
119
|
+
() => m.fields.find((n) => n.type === "hidden" && n.is_enabled)?.key ?? "page"
|
|
120
|
+
), U = y(
|
|
121
|
+
() => `<x-webx-inbox::form slug="${m.slug}" :values="['${r.value}' => url()->current()]" />
|
|
122
|
+
<x-webx-inbox::form slug="${m.slug}" placement="footer" />`
|
|
123
|
+
), c = y(() => [
|
|
124
|
+
{ key: "key", label: u("fields.name") },
|
|
125
|
+
{ key: "title", label: u("fields.title") },
|
|
126
|
+
{ key: "type", label: u("fields.type"), hideBelow: 520 }
|
|
127
|
+
]), g = y(() => m.fields.filter((n) => n.is_enabled));
|
|
128
|
+
async function p(n) {
|
|
129
129
|
try {
|
|
130
|
-
await navigator.clipboard.writeText(
|
|
130
|
+
await navigator.clipboard.writeText(n), P.success(u("panel.copied"));
|
|
131
131
|
} catch {
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
return (
|
|
134
|
+
return (n, h) => (x(), N("div", Me, [
|
|
135
135
|
l(e(B), {
|
|
136
|
-
title: e(
|
|
136
|
+
title: e(u)("panel.embed-blade")
|
|
137
137
|
}, {
|
|
138
138
|
default: t(() => [
|
|
139
139
|
l(e(S), {
|
|
@@ -141,23 +141,23 @@ const Le = /* @__PURE__ */ D({
|
|
|
141
141
|
tone: "muted"
|
|
142
142
|
}, {
|
|
143
143
|
default: t(() => [
|
|
144
|
-
|
|
144
|
+
V(_(e(u)("panel.embed-blade-help")), 1)
|
|
145
145
|
]),
|
|
146
146
|
_: 1
|
|
147
147
|
}),
|
|
148
148
|
A("div", qe, [
|
|
149
|
-
A("code", null, _(
|
|
149
|
+
A("code", null, _(i.value), 1),
|
|
150
150
|
l(e(K), {
|
|
151
151
|
icon: "copy",
|
|
152
|
-
title: e(
|
|
153
|
-
onClick: h[0] || (h[0] = (f) =>
|
|
152
|
+
title: e(u)("panel.copy"),
|
|
153
|
+
onClick: h[0] || (h[0] = (f) => p(i.value))
|
|
154
154
|
}, null, 8, ["title"])
|
|
155
155
|
])
|
|
156
156
|
]),
|
|
157
157
|
_: 1
|
|
158
158
|
}, 8, ["title"]),
|
|
159
159
|
l(e(B), {
|
|
160
|
-
title: e(
|
|
160
|
+
title: e(u)("panel.embed-block")
|
|
161
161
|
}, {
|
|
162
162
|
default: t(() => [
|
|
163
163
|
l(e(S), {
|
|
@@ -165,7 +165,7 @@ const Le = /* @__PURE__ */ D({
|
|
|
165
165
|
tone: "muted"
|
|
166
166
|
}, {
|
|
167
167
|
default: t(() => [
|
|
168
|
-
|
|
168
|
+
V(_(e(u)(k.value ? "panel.embed-block-panel-help" : "panel.embed-block-help")), 1)
|
|
169
169
|
]),
|
|
170
170
|
_: 1
|
|
171
171
|
}),
|
|
@@ -173,15 +173,15 @@ const Le = /* @__PURE__ */ D({
|
|
|
173
173
|
A("code", null, _($.value), 1),
|
|
174
174
|
l(e(K), {
|
|
175
175
|
icon: "copy",
|
|
176
|
-
title: e(
|
|
177
|
-
onClick: h[1] || (h[1] = (f) =>
|
|
176
|
+
title: e(u)("panel.copy"),
|
|
177
|
+
onClick: h[1] || (h[1] = (f) => p($.value))
|
|
178
178
|
}, null, 8, ["title"])
|
|
179
179
|
])
|
|
180
180
|
]),
|
|
181
181
|
_: 1
|
|
182
182
|
}, 8, ["title"]),
|
|
183
183
|
l(e(B), {
|
|
184
|
-
title: e(
|
|
184
|
+
title: e(u)("panel.embed-extras")
|
|
185
185
|
}, {
|
|
186
186
|
default: t(() => [
|
|
187
187
|
l(e(S), {
|
|
@@ -189,7 +189,7 @@ const Le = /* @__PURE__ */ D({
|
|
|
189
189
|
tone: "muted"
|
|
190
190
|
}, {
|
|
191
191
|
default: t(() => [
|
|
192
|
-
|
|
192
|
+
V(_(e(u)("panel.embed-extras-help")), 1)
|
|
193
193
|
]),
|
|
194
194
|
_: 1
|
|
195
195
|
}),
|
|
@@ -197,15 +197,15 @@ const Le = /* @__PURE__ */ D({
|
|
|
197
197
|
A("code", null, _(U.value), 1),
|
|
198
198
|
l(e(K), {
|
|
199
199
|
icon: "copy",
|
|
200
|
-
title: e(
|
|
201
|
-
onClick: h[2] || (h[2] = (f) =>
|
|
200
|
+
title: e(u)("panel.copy"),
|
|
201
|
+
onClick: h[2] || (h[2] = (f) => p(U.value))
|
|
202
202
|
}, null, 8, ["title"])
|
|
203
203
|
])
|
|
204
204
|
]),
|
|
205
205
|
_: 1
|
|
206
206
|
}, 8, ["title"]),
|
|
207
207
|
l(e(B), {
|
|
208
|
-
title: e(
|
|
208
|
+
title: e(u)("panel.embed-names")
|
|
209
209
|
}, {
|
|
210
210
|
default: t(() => [
|
|
211
211
|
l(e(S), {
|
|
@@ -213,16 +213,16 @@ const Le = /* @__PURE__ */ D({
|
|
|
213
213
|
tone: "muted"
|
|
214
214
|
}, {
|
|
215
215
|
default: t(() => [
|
|
216
|
-
|
|
216
|
+
V(_(e(u)("panel.embed-names-help")), 1)
|
|
217
217
|
]),
|
|
218
218
|
_: 1
|
|
219
219
|
}),
|
|
220
220
|
l(e(we), {
|
|
221
|
-
data:
|
|
222
|
-
columns:
|
|
221
|
+
data: g.value,
|
|
222
|
+
columns: c.value,
|
|
223
223
|
"row-key": "id",
|
|
224
224
|
flush: "",
|
|
225
|
-
"empty-text": e(
|
|
225
|
+
"empty-text": e(u)("fields.no-fields")
|
|
226
226
|
}, {
|
|
227
227
|
"cell-key": t(({ row: f }) => [
|
|
228
228
|
l(e(S), {
|
|
@@ -230,16 +230,16 @@ const Le = /* @__PURE__ */ D({
|
|
|
230
230
|
size: "sm"
|
|
231
231
|
}, {
|
|
232
232
|
default: t(() => [
|
|
233
|
-
|
|
233
|
+
V("fields[" + _(f.key) + "]", 1)
|
|
234
234
|
]),
|
|
235
235
|
_: 2
|
|
236
236
|
}, 1024)
|
|
237
237
|
]),
|
|
238
238
|
"cell-title": t(({ row: f }) => [
|
|
239
|
-
|
|
239
|
+
V(_(Object.values(f.title)[0] ?? f.key), 1)
|
|
240
240
|
]),
|
|
241
241
|
"cell-type": t(({ row: f }) => [
|
|
242
|
-
|
|
242
|
+
V(_(e(u)(`fields.type-${f.type}`)), 1)
|
|
243
243
|
]),
|
|
244
244
|
_: 1
|
|
245
245
|
}, 8, ["data", "columns", "empty-text"])
|
|
@@ -260,58 +260,71 @@ const Le = /* @__PURE__ */ D({
|
|
|
260
260
|
}),
|
|
261
261
|
emits: ["update:settings", "update:options"],
|
|
262
262
|
setup(v) {
|
|
263
|
-
const
|
|
263
|
+
const m = H(
|
|
264
264
|
v,
|
|
265
265
|
"settings"
|
|
266
|
-
),
|
|
266
|
+
), u = H(v, "options"), o = G("webx-inbox"), k = C(u, "description", {}), i = C(u, "thank-you.heading", {}), $ = C(u, "thank-you.text", {}), r = C(u, "design.submit-text", {}), U = C(u, "redirect", null), c = y({
|
|
267
267
|
get: () => {
|
|
268
|
-
const
|
|
269
|
-
return typeof
|
|
268
|
+
const g = U.value;
|
|
269
|
+
return typeof g == "string" ? { ...se(), target: "url", url: g } : g ?? { ...se(), target: "none" };
|
|
270
270
|
},
|
|
271
|
-
set: (
|
|
272
|
-
|
|
271
|
+
set: (g) => {
|
|
272
|
+
U.value = g === null || g.target === "none" ? null : g;
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
return (
|
|
275
|
+
return (g, p) => (x(), N("div", Ge, [
|
|
276
276
|
l(e(B), null, {
|
|
277
277
|
default: t(() => [
|
|
278
278
|
l(e(W), {
|
|
279
|
-
label: e(
|
|
279
|
+
label: e(o)("panel.title"),
|
|
280
280
|
error: v.errors.title?.[0],
|
|
281
281
|
required: ""
|
|
282
282
|
}, {
|
|
283
283
|
default: t(() => [
|
|
284
|
-
l(e(
|
|
285
|
-
modelValue:
|
|
286
|
-
"onUpdate:modelValue":
|
|
284
|
+
l(e(q), {
|
|
285
|
+
modelValue: m.value.title,
|
|
286
|
+
"onUpdate:modelValue": p[0] || (p[0] = (n) => m.value.title = n),
|
|
287
287
|
localized: ""
|
|
288
288
|
}, null, 8, ["modelValue"])
|
|
289
289
|
]),
|
|
290
290
|
_: 1
|
|
291
291
|
}, 8, ["label", "error"]),
|
|
292
292
|
l(e(W), {
|
|
293
|
-
label: e(
|
|
294
|
-
help: e(
|
|
293
|
+
label: e(o)("panel.description"),
|
|
294
|
+
help: e(o)("panel.description-help")
|
|
295
|
+
}, {
|
|
296
|
+
default: t(() => [
|
|
297
|
+
l(e(q), {
|
|
298
|
+
modelValue: e(k),
|
|
299
|
+
"onUpdate:modelValue": p[1] || (p[1] = (n) => T(k) ? k.value = n : null),
|
|
300
|
+
localized: ""
|
|
301
|
+
}, null, 8, ["modelValue"])
|
|
302
|
+
]),
|
|
303
|
+
_: 1
|
|
304
|
+
}, 8, ["label", "help"]),
|
|
305
|
+
l(e(W), {
|
|
306
|
+
label: e(o)("panel.slug"),
|
|
307
|
+
help: e(o)("panel.slug-help"),
|
|
295
308
|
error: v.errors.slug?.[0],
|
|
296
309
|
required: ""
|
|
297
310
|
}, {
|
|
298
311
|
default: t(() => [
|
|
299
|
-
l(e(
|
|
300
|
-
modelValue:
|
|
301
|
-
"onUpdate:modelValue":
|
|
312
|
+
l(e(q), {
|
|
313
|
+
modelValue: m.value.slug,
|
|
314
|
+
"onUpdate:modelValue": p[2] || (p[2] = (n) => m.value.slug = n),
|
|
302
315
|
placeholder: "contact"
|
|
303
316
|
}, null, 8, ["modelValue"])
|
|
304
317
|
]),
|
|
305
318
|
_: 1
|
|
306
319
|
}, 8, ["label", "help", "error"]),
|
|
307
320
|
l(e(W), {
|
|
308
|
-
help: e(
|
|
321
|
+
help: e(o)("panel.is-enabled-help")
|
|
309
322
|
}, {
|
|
310
323
|
default: t(() => [
|
|
311
324
|
l(e(pe), {
|
|
312
|
-
modelValue:
|
|
313
|
-
"onUpdate:modelValue":
|
|
314
|
-
label: e(
|
|
325
|
+
modelValue: m.value.is_enabled,
|
|
326
|
+
"onUpdate:modelValue": p[3] || (p[3] = (n) => m.value.is_enabled = n),
|
|
327
|
+
label: e(o)("panel.is-enabled")
|
|
315
328
|
}, null, 8, ["modelValue", "label"])
|
|
316
329
|
]),
|
|
317
330
|
_: 1
|
|
@@ -320,53 +333,53 @@ const Le = /* @__PURE__ */ D({
|
|
|
320
333
|
_: 1
|
|
321
334
|
}),
|
|
322
335
|
l(e(B), {
|
|
323
|
-
title: e(
|
|
336
|
+
title: e(o)("panel.after-sending")
|
|
324
337
|
}, {
|
|
325
338
|
default: t(() => [
|
|
326
339
|
l(e(W), {
|
|
327
|
-
label: e(
|
|
340
|
+
label: e(o)("panel.submit-text")
|
|
328
341
|
}, {
|
|
329
342
|
default: t(() => [
|
|
330
|
-
l(e(
|
|
331
|
-
modelValue: e(
|
|
332
|
-
"onUpdate:modelValue":
|
|
343
|
+
l(e(q), {
|
|
344
|
+
modelValue: e(r),
|
|
345
|
+
"onUpdate:modelValue": p[4] || (p[4] = (n) => T(r) ? r.value = n : null),
|
|
333
346
|
localized: ""
|
|
334
347
|
}, null, 8, ["modelValue"])
|
|
335
348
|
]),
|
|
336
349
|
_: 1
|
|
337
350
|
}, 8, ["label"]),
|
|
338
351
|
l(e(W), {
|
|
339
|
-
label: e(
|
|
352
|
+
label: e(o)("panel.thank-you-heading")
|
|
340
353
|
}, {
|
|
341
354
|
default: t(() => [
|
|
342
|
-
l(e(
|
|
343
|
-
modelValue: e(
|
|
344
|
-
"onUpdate:modelValue":
|
|
355
|
+
l(e(q), {
|
|
356
|
+
modelValue: e(i),
|
|
357
|
+
"onUpdate:modelValue": p[5] || (p[5] = (n) => T(i) ? i.value = n : null),
|
|
345
358
|
localized: ""
|
|
346
359
|
}, null, 8, ["modelValue"])
|
|
347
360
|
]),
|
|
348
361
|
_: 1
|
|
349
362
|
}, 8, ["label"]),
|
|
350
363
|
l(e(W), {
|
|
351
|
-
label: e(
|
|
364
|
+
label: e(o)("panel.thank-you-text")
|
|
352
365
|
}, {
|
|
353
366
|
default: t(() => [
|
|
354
367
|
l(Ne, {
|
|
355
|
-
modelValue: e(
|
|
356
|
-
"onUpdate:modelValue":
|
|
368
|
+
modelValue: e($),
|
|
369
|
+
"onUpdate:modelValue": p[6] || (p[6] = (n) => T($) ? $.value = n : null)
|
|
357
370
|
}, null, 8, ["modelValue"])
|
|
358
371
|
]),
|
|
359
372
|
_: 1
|
|
360
373
|
}, 8, ["label"]),
|
|
361
374
|
l(e(W), {
|
|
362
|
-
label: e(
|
|
363
|
-
help: e(
|
|
375
|
+
label: e(o)("panel.redirect"),
|
|
376
|
+
help: e(o)("panel.redirect-help"),
|
|
364
377
|
error: v.errors["options.redirect"]?.[0]
|
|
365
378
|
}, {
|
|
366
379
|
default: t(() => [
|
|
367
380
|
l(e(_e), {
|
|
368
|
-
modelValue:
|
|
369
|
-
"onUpdate:modelValue":
|
|
381
|
+
modelValue: c.value,
|
|
382
|
+
"onUpdate:modelValue": p[7] || (p[7] = (n) => c.value = n),
|
|
370
383
|
attributes: !1
|
|
371
384
|
}, null, 8, ["modelValue"])
|
|
372
385
|
]),
|
|
@@ -377,17 +390,17 @@ const Le = /* @__PURE__ */ D({
|
|
|
377
390
|
}, 8, ["title"])
|
|
378
391
|
]));
|
|
379
392
|
}
|
|
380
|
-
}), je = /* @__PURE__ */ J(Ke, [["__scopeId", "data-v-
|
|
393
|
+
}), je = /* @__PURE__ */ J(Ke, [["__scopeId", "data-v-1065e341"]]), He = /^[^\s@]+@[^\s@]+$/;
|
|
381
394
|
function j(v) {
|
|
382
395
|
return "admin_id" in v;
|
|
383
396
|
}
|
|
384
|
-
function fe(v,
|
|
385
|
-
return j(v) ?
|
|
386
|
-
(
|
|
397
|
+
function fe(v, m = []) {
|
|
398
|
+
return j(v) ? m.find(
|
|
399
|
+
(o) => o.type === "admin" && o.admin_id === v.admin_id
|
|
387
400
|
)?.problem ?? null : He.test((v.email ?? "").trim()) ? null : "invalid_email";
|
|
388
401
|
}
|
|
389
|
-
function Je(v,
|
|
390
|
-
return (v ?? []).some((
|
|
402
|
+
function Je(v, m = []) {
|
|
403
|
+
return (v ?? []).some((u) => fe(u, m) === null);
|
|
391
404
|
}
|
|
392
405
|
const Qe = {
|
|
393
406
|
key: 1,
|
|
@@ -411,100 +424,100 @@ const Qe = {
|
|
|
411
424
|
}),
|
|
412
425
|
emits: ["update:modelValue"],
|
|
413
426
|
setup(v) {
|
|
414
|
-
const
|
|
415
|
-
get: () =>
|
|
416
|
-
set: (
|
|
417
|
-
|
|
427
|
+
const m = v, u = H(v, "modelValue"), o = ne(), k = ce(o), i = G("webx-inbox"), $ = I([]), r = C(u, "recipients", []), U = C(u, "email_field", ""), c = C(u, "notify_channels", []), g = y({
|
|
428
|
+
get: () => u.value.notify_via ?? m.via ?? "email",
|
|
429
|
+
set: (d) => {
|
|
430
|
+
u.value = { ...u.value, notify_via: d };
|
|
418
431
|
}
|
|
419
|
-
}),
|
|
420
|
-
{ value: "email", label:
|
|
421
|
-
{ value: "channels", label:
|
|
422
|
-
]),
|
|
423
|
-
function ie(
|
|
424
|
-
|
|
432
|
+
}), p = y(() => [
|
|
433
|
+
{ value: "email", label: i("panel.via-email") },
|
|
434
|
+
{ value: "channels", label: i("panel.via-channels") }
|
|
435
|
+
]), n = y(() => !m.notifications || g.value === "email"), h = re(), f = y(() => o.can("notifications.manage")), z = y(() => `${o.basePath}/notifications`.replace(/\/{2,}/g, "/"));
|
|
436
|
+
function ie(d) {
|
|
437
|
+
d.metaKey || d.ctrlKey || d.shiftKey || d.button !== 0 || (d.preventDefault(), h.push("/notifications"));
|
|
425
438
|
}
|
|
426
439
|
ve(async () => {
|
|
427
440
|
try {
|
|
428
|
-
$.value = await
|
|
441
|
+
$.value = await k.recipients();
|
|
429
442
|
} catch {
|
|
430
443
|
}
|
|
431
444
|
});
|
|
432
|
-
const L =
|
|
433
|
-
() => $.value.map((
|
|
434
|
-
), Q =
|
|
435
|
-
{ value: "", label:
|
|
436
|
-
...
|
|
445
|
+
const L = y(
|
|
446
|
+
() => $.value.map((d) => ({ value: d.id, label: `${d.name} · ${d.email}` }))
|
|
447
|
+
), Q = y(() => [
|
|
448
|
+
{ value: "", label: i("panel.no-email-field") },
|
|
449
|
+
...m.fields.filter((d) => d.type === "email").map((d) => ({ value: d.key, label: X(d) }))
|
|
437
450
|
]);
|
|
438
|
-
function X(
|
|
439
|
-
const a = Object.values(
|
|
440
|
-
(
|
|
451
|
+
function X(d) {
|
|
452
|
+
const a = Object.values(d.title ?? {}).find(
|
|
453
|
+
(s) => typeof s == "string" && s.trim() !== ""
|
|
441
454
|
);
|
|
442
|
-
return a === void 0 ?
|
|
455
|
+
return a === void 0 ? d.name ?? d.key : d.name ? `${a} · ${d.name}` : a;
|
|
443
456
|
}
|
|
444
|
-
function
|
|
445
|
-
if (!j(
|
|
446
|
-
const a = fe(
|
|
447
|
-
return a === null ? null :
|
|
457
|
+
function O(d) {
|
|
458
|
+
if (!j(d)) return null;
|
|
459
|
+
const a = fe(d, m.reported);
|
|
460
|
+
return a === null ? null : i(`panel.recipient-${a}`);
|
|
448
461
|
}
|
|
449
|
-
function E(
|
|
450
|
-
r.value = [...r.value,
|
|
462
|
+
function E(d) {
|
|
463
|
+
r.value = [...r.value, d];
|
|
451
464
|
}
|
|
452
|
-
async function Y(
|
|
453
|
-
const a = r.value[
|
|
465
|
+
async function Y(d) {
|
|
466
|
+
const a = r.value[d];
|
|
454
467
|
a !== void 0 && (j(a) || (a.email ?? "").trim() !== "") && !await Fe({
|
|
455
|
-
title:
|
|
456
|
-
message:
|
|
457
|
-
confirmText:
|
|
458
|
-
cancelText:
|
|
468
|
+
title: i("panel.remove-recipient-title"),
|
|
469
|
+
message: i("panel.remove-recipient-text"),
|
|
470
|
+
confirmText: i("panel.remove"),
|
|
471
|
+
cancelText: i("panel.cancel"),
|
|
459
472
|
tone: "danger"
|
|
460
|
-
}) || (r.value = r.value.filter((b, M) => M !==
|
|
473
|
+
}) || (r.value = r.value.filter((b, M) => M !== d));
|
|
461
474
|
}
|
|
462
|
-
function Z(
|
|
463
|
-
r.value = r.value.map((
|
|
475
|
+
function Z(d, a) {
|
|
476
|
+
r.value = r.value.map((s, b) => b === d ? { admin_id: a } : s);
|
|
464
477
|
}
|
|
465
|
-
function ee(
|
|
466
|
-
r.value = r.value.map((
|
|
478
|
+
function ee(d, a) {
|
|
479
|
+
r.value = r.value.map((s, b) => b === d ? { email: a } : s);
|
|
467
480
|
}
|
|
468
|
-
return (
|
|
481
|
+
return (d, a) => (x(), w(e(B), {
|
|
469
482
|
class: "wx-inbox-notifications",
|
|
470
|
-
title:
|
|
483
|
+
title: m.notifications ? void 0 : e(i)("panel.recipients")
|
|
471
484
|
}, {
|
|
472
485
|
default: t(() => [
|
|
473
486
|
l(e(W), {
|
|
474
|
-
label: e(
|
|
475
|
-
help:
|
|
487
|
+
label: e(i)("panel.email-field"),
|
|
488
|
+
help: m.notifications ? e(i)("panel.email-field-help-channels") : e(i)("panel.email-field-help"),
|
|
476
489
|
error: v.errors["options.email_field"]?.[0]
|
|
477
490
|
}, {
|
|
478
491
|
default: t(() => [
|
|
479
492
|
l(e(le), {
|
|
480
493
|
modelValue: e(U),
|
|
481
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
494
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => T(U) ? U.value = s : null),
|
|
482
495
|
options: Q.value
|
|
483
496
|
}, null, 8, ["modelValue", "options"])
|
|
484
497
|
]),
|
|
485
498
|
_: 1
|
|
486
499
|
}, 8, ["label", "help", "error"]),
|
|
487
|
-
|
|
500
|
+
m.notifications ? (x(), w(e(W), {
|
|
488
501
|
key: 0,
|
|
489
|
-
label: e(
|
|
502
|
+
label: e(i)("panel.notify-via")
|
|
490
503
|
}, {
|
|
491
504
|
default: t(() => [
|
|
492
505
|
l(e($e), {
|
|
493
|
-
modelValue:
|
|
494
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
495
|
-
options:
|
|
506
|
+
modelValue: g.value,
|
|
507
|
+
"onUpdate:modelValue": a[1] || (a[1] = (s) => g.value = s),
|
|
508
|
+
options: p.value,
|
|
496
509
|
inline: ""
|
|
497
510
|
}, null, 8, ["modelValue", "options"])
|
|
498
511
|
]),
|
|
499
512
|
_: 1
|
|
500
513
|
}, 8, ["label"])) : F("", !0),
|
|
501
|
-
|
|
502
|
-
|
|
514
|
+
n.value ? (x(), N("section", Qe, [
|
|
515
|
+
m.notifications ? (x(), w(e(S), {
|
|
503
516
|
key: 0,
|
|
504
517
|
weight: "medium"
|
|
505
518
|
}, {
|
|
506
519
|
default: t(() => [
|
|
507
|
-
|
|
520
|
+
V(_(e(i)("panel.recipients")), 1)
|
|
508
521
|
]),
|
|
509
522
|
_: 1
|
|
510
523
|
})) : F("", !0),
|
|
@@ -513,40 +526,40 @@ const Qe = {
|
|
|
513
526
|
tone: "muted"
|
|
514
527
|
}, {
|
|
515
528
|
default: t(() => [
|
|
516
|
-
|
|
529
|
+
V(_(e(i)("panel.recipients-help")), 1)
|
|
517
530
|
]),
|
|
518
531
|
_: 1
|
|
519
532
|
}),
|
|
520
|
-
v.errors["options.recipients"] ? (
|
|
533
|
+
v.errors["options.recipients"] ? (x(), w(e(oe), {
|
|
521
534
|
key: 1,
|
|
522
535
|
type: "danger",
|
|
523
536
|
variant: "soft",
|
|
524
537
|
description: v.errors["options.recipients"]?.[0]
|
|
525
538
|
}, null, 8, ["description"])) : F("", !0),
|
|
526
539
|
A("div", Xe, [
|
|
527
|
-
e(r).length === 0 ? (
|
|
540
|
+
e(r).length === 0 ? (x(), w(e(S), {
|
|
528
541
|
key: 0,
|
|
529
542
|
size: "sm",
|
|
530
543
|
tone: "placeholder"
|
|
531
544
|
}, {
|
|
532
545
|
default: t(() => [
|
|
533
|
-
|
|
546
|
+
V(_(e(i)("panel.no-recipients")), 1)
|
|
534
547
|
]),
|
|
535
548
|
_: 1
|
|
536
549
|
})) : F("", !0),
|
|
537
|
-
(
|
|
550
|
+
(x(!0), N(de, null, be(e(r), (s, b) => (x(), N("div", {
|
|
538
551
|
key: b,
|
|
539
552
|
class: "wx-inbox-recipients__item"
|
|
540
553
|
}, [
|
|
541
554
|
A("div", Ye, [
|
|
542
|
-
e(j)(
|
|
555
|
+
e(j)(s) ? (x(), w(e(le), {
|
|
543
556
|
key: 0,
|
|
544
|
-
"model-value":
|
|
557
|
+
"model-value": s.admin_id,
|
|
545
558
|
options: L.value,
|
|
546
559
|
"onUpdate:modelValue": (M) => Z(b, Number(M))
|
|
547
|
-
}, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : (
|
|
560
|
+
}, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : (x(), w(e(q), {
|
|
548
561
|
key: 1,
|
|
549
|
-
"model-value":
|
|
562
|
+
"model-value": s.email,
|
|
550
563
|
type: "email",
|
|
551
564
|
placeholder: "sales@example.com",
|
|
552
565
|
"onUpdate:modelValue": (M) => ee(b, String(M))
|
|
@@ -554,17 +567,17 @@ const Qe = {
|
|
|
554
567
|
l(e(K), {
|
|
555
568
|
icon: "trash",
|
|
556
569
|
tone: "danger",
|
|
557
|
-
title: e(
|
|
570
|
+
title: e(i)("panel.remove"),
|
|
558
571
|
onClick: (M) => Y(b)
|
|
559
572
|
}, null, 8, ["title", "onClick"])
|
|
560
573
|
]),
|
|
561
|
-
|
|
574
|
+
O(s) ? (x(), w(e(S), {
|
|
562
575
|
key: 0,
|
|
563
576
|
size: "sm",
|
|
564
577
|
tone: "danger"
|
|
565
578
|
}, {
|
|
566
579
|
default: t(() => [
|
|
567
|
-
|
|
580
|
+
V(_(O(s)), 1)
|
|
568
581
|
]),
|
|
569
582
|
_: 2
|
|
570
583
|
}, 1024)) : F("", !0)
|
|
@@ -576,32 +589,32 @@ const Qe = {
|
|
|
576
589
|
variant: "outline",
|
|
577
590
|
icon: "user",
|
|
578
591
|
disabled: L.value.length === 0,
|
|
579
|
-
onClick: a[2] || (a[2] = (
|
|
592
|
+
onClick: a[2] || (a[2] = (s) => E({ admin_id: Number(L.value[0]?.value) }))
|
|
580
593
|
}, {
|
|
581
594
|
default: t(() => [
|
|
582
|
-
|
|
595
|
+
V(_(e(i)("panel.add-admin")), 1)
|
|
583
596
|
]),
|
|
584
597
|
_: 1
|
|
585
598
|
}, 8, ["disabled"]),
|
|
586
599
|
l(e(te), {
|
|
587
600
|
variant: "outline",
|
|
588
|
-
onClick: a[3] || (a[3] = (
|
|
601
|
+
onClick: a[3] || (a[3] = (s) => E({ email: "" }))
|
|
589
602
|
}, {
|
|
590
603
|
icon: t(() => [
|
|
591
604
|
l(e(We), { name: "mail" })
|
|
592
605
|
]),
|
|
593
606
|
default: t(() => [
|
|
594
|
-
|
|
607
|
+
V(" " + _(e(i)("panel.add-email")), 1)
|
|
595
608
|
]),
|
|
596
609
|
_: 1
|
|
597
610
|
})
|
|
598
611
|
]),
|
|
599
612
|
_: 1
|
|
600
613
|
})
|
|
601
|
-
])) : (
|
|
614
|
+
])) : (x(), N("section", Ze, [
|
|
602
615
|
l(e(S), { weight: "medium" }, {
|
|
603
616
|
default: t(() => [
|
|
604
|
-
|
|
617
|
+
V(_(e(i)("panel.notify-through")), 1)
|
|
605
618
|
]),
|
|
606
619
|
_: 1
|
|
607
620
|
}),
|
|
@@ -610,28 +623,28 @@ const Qe = {
|
|
|
610
623
|
tone: "muted"
|
|
611
624
|
}, {
|
|
612
625
|
default: t(() => [
|
|
613
|
-
|
|
626
|
+
V(_(e(i)("panel.notify-through-help")), 1)
|
|
614
627
|
]),
|
|
615
628
|
_: 1
|
|
616
629
|
}),
|
|
617
630
|
A("div", el, [
|
|
618
631
|
l(e(he), {
|
|
619
|
-
modelValue: e(
|
|
620
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
632
|
+
modelValue: e(c),
|
|
633
|
+
"onUpdate:modelValue": a[4] || (a[4] = (s) => T(c) ? c.value = s : null),
|
|
621
634
|
target: "notify-inbox-submission",
|
|
622
635
|
sortable: !1,
|
|
623
|
-
"add-text": e(
|
|
624
|
-
"empty-text": e(
|
|
625
|
-
"none-text": e(
|
|
636
|
+
"add-text": e(i)("panel.pick-channels"),
|
|
637
|
+
"empty-text": e(i)("panel.no-channels"),
|
|
638
|
+
"none-text": e(i)("panel.no-channels-yet")
|
|
626
639
|
}, null, 8, ["modelValue", "add-text", "empty-text", "none-text"]),
|
|
627
|
-
f.value ? (
|
|
640
|
+
f.value ? (x(), w(e(ze), {
|
|
628
641
|
key: 0,
|
|
629
642
|
href: z.value,
|
|
630
643
|
size: "sm",
|
|
631
644
|
onClick: ie
|
|
632
645
|
}, {
|
|
633
646
|
default: t(() => [
|
|
634
|
-
|
|
647
|
+
V(_(e(i)("panel.set-up-channels")), 1)
|
|
635
648
|
]),
|
|
636
649
|
_: 1
|
|
637
650
|
}, 8, ["href"])) : F("", !0)
|
|
@@ -647,58 +660,58 @@ const Qe = {
|
|
|
647
660
|
base: { default: "/inbox" }
|
|
648
661
|
},
|
|
649
662
|
setup(v) {
|
|
650
|
-
const
|
|
663
|
+
const m = v, u = ne(), o = ce(u), k = ge(), i = re(), $ = Se();
|
|
651
664
|
me();
|
|
652
|
-
const r = G("webx-inbox"), U =
|
|
665
|
+
const r = G("webx-inbox"), U = Ve(), c = I(null), g = I([]), p = I(!0), n = I(!1), h = I({});
|
|
653
666
|
let f = xe({
|
|
654
667
|
slug: "",
|
|
655
668
|
title: {},
|
|
656
669
|
is_enabled: !0
|
|
657
670
|
});
|
|
658
|
-
const z = I({}), L = I(["general", "fields", "notifications", "antispam", "embed"].includes(String(
|
|
659
|
-
() => f.is_enabled && !Je(z.value.recipients,
|
|
660
|
-
), X =
|
|
661
|
-
if (
|
|
662
|
-
const a =
|
|
671
|
+
const z = I({}), L = I(["general", "fields", "notifications", "antispam", "embed"].includes(String(k.query.tab)) ? String(k.query.tab) : "general"), Q = y(
|
|
672
|
+
() => f.is_enabled && !Je(z.value.recipients, c.value?.recipients) && !X.value
|
|
673
|
+
), X = y(() => {
|
|
674
|
+
if (c.value?.notifications !== !0) return !1;
|
|
675
|
+
const a = c.value.channels ?? [];
|
|
663
676
|
return (z.value.notify_channels ?? []).some(
|
|
664
|
-
(
|
|
677
|
+
(s) => a.find((b) => b.id === s)?.sends ?? !0
|
|
665
678
|
);
|
|
666
|
-
}),
|
|
667
|
-
() =>
|
|
668
|
-
), Z =
|
|
679
|
+
}), O = y(() => u.can("inbox.manage")), E = y(() => Number(k.params.id)), Y = y(
|
|
680
|
+
() => c.value === null ? "" : Ce(f.title, $.active.value, f.slug)
|
|
681
|
+
), Z = y(() => `${m.base}?form=${E.value}`);
|
|
669
682
|
async function ee() {
|
|
670
|
-
|
|
683
|
+
p.value = !0;
|
|
671
684
|
try {
|
|
672
|
-
const a = await
|
|
673
|
-
|
|
685
|
+
const a = await o.form(E.value);
|
|
686
|
+
c.value = a, g.value = a.fields ?? [], f.slug = a.slug, f.title = { ...a.title }, f.is_enabled = a.is_enabled, z.value = { ...a.options };
|
|
674
687
|
} catch (a) {
|
|
675
|
-
|
|
688
|
+
P.danger(U(a)), i.replace(m.base);
|
|
676
689
|
} finally {
|
|
677
|
-
|
|
690
|
+
p.value = !1;
|
|
678
691
|
}
|
|
679
692
|
}
|
|
680
693
|
ye(E, () => {
|
|
681
694
|
ee();
|
|
682
695
|
}, { immediate: !0 });
|
|
683
|
-
async function
|
|
684
|
-
|
|
696
|
+
async function d() {
|
|
697
|
+
n.value = !0, h.value = {};
|
|
685
698
|
try {
|
|
686
|
-
const a = await
|
|
699
|
+
const a = await o.saveForm(E.value, {
|
|
687
700
|
slug: f.slug.trim(),
|
|
688
701
|
title: f.title,
|
|
689
702
|
is_enabled: f.is_enabled,
|
|
690
703
|
options: z.value
|
|
691
704
|
});
|
|
692
|
-
|
|
705
|
+
c.value = a, P.success(r("panel.saved"));
|
|
693
706
|
} catch (a) {
|
|
694
|
-
const
|
|
695
|
-
|
|
707
|
+
const s = a.body;
|
|
708
|
+
s?.errors ? (h.value = s.errors, P.danger(r("panel.failed"))) : P.danger(U(a));
|
|
696
709
|
} finally {
|
|
697
|
-
|
|
710
|
+
n.value = !1;
|
|
698
711
|
}
|
|
699
712
|
}
|
|
700
|
-
return (a,
|
|
701
|
-
|
|
713
|
+
return (a, s) => (x(), N("div", al, [
|
|
714
|
+
p.value ? (x(), w(e(B), { key: 0 }, {
|
|
702
715
|
default: t(() => [
|
|
703
716
|
l(e(Te), {
|
|
704
717
|
title: "",
|
|
@@ -706,28 +719,28 @@ const Qe = {
|
|
|
706
719
|
})
|
|
707
720
|
]),
|
|
708
721
|
_: 1
|
|
709
|
-
})) :
|
|
710
|
-
l(e(
|
|
722
|
+
})) : c.value ? (x(), N(de, { key: 1 }, [
|
|
723
|
+
l(e(ke), {
|
|
711
724
|
class: "wx-inbox-editor__head",
|
|
712
725
|
title: Y.value,
|
|
713
|
-
subtitle:
|
|
726
|
+
subtitle: c.value.slug,
|
|
714
727
|
back: Z.value,
|
|
715
728
|
"back-label": e(r)("panel.forms")
|
|
716
729
|
}, {
|
|
717
730
|
"title-after": t(() => [
|
|
718
|
-
e(f).is_enabled ? F("", !0) : (
|
|
731
|
+
e(f).is_enabled ? F("", !0) : (x(), w(e(Ae), {
|
|
719
732
|
key: 0,
|
|
720
733
|
type: "default"
|
|
721
734
|
}, {
|
|
722
735
|
default: t(() => [
|
|
723
|
-
|
|
736
|
+
V(_(e(r)("panel.off")), 1)
|
|
724
737
|
]),
|
|
725
738
|
_: 1
|
|
726
739
|
}))
|
|
727
740
|
]),
|
|
728
741
|
_: 1
|
|
729
742
|
}, 8, ["title", "subtitle", "back", "back-label"]),
|
|
730
|
-
Q.value ? (
|
|
743
|
+
Q.value ? (x(), w(e(oe), {
|
|
731
744
|
key: 0,
|
|
732
745
|
class: "wx-inbox-editor__silent",
|
|
733
746
|
type: "warning",
|
|
@@ -738,79 +751,79 @@ const Qe = {
|
|
|
738
751
|
}, null, 8, ["title", "description"])) : F("", !0),
|
|
739
752
|
l(e(Be), {
|
|
740
753
|
modelValue: L.value,
|
|
741
|
-
"onUpdate:modelValue":
|
|
754
|
+
"onUpdate:modelValue": s[5] || (s[5] = (b) => L.value = b),
|
|
742
755
|
class: "wx-inbox-editor__tabs",
|
|
743
756
|
"keep-alive": ""
|
|
744
757
|
}, {
|
|
745
758
|
default: t(() => [
|
|
746
|
-
l(e(
|
|
759
|
+
l(e(R), {
|
|
747
760
|
value: "general",
|
|
748
761
|
label: e(r)("panel.tab-general")
|
|
749
762
|
}, {
|
|
750
763
|
default: t(() => [
|
|
751
764
|
l(je, {
|
|
752
765
|
settings: e(f),
|
|
753
|
-
"onUpdate:settings":
|
|
766
|
+
"onUpdate:settings": s[0] || (s[0] = (b) => T(f) ? f.value = b : f = b),
|
|
754
767
|
options: z.value,
|
|
755
|
-
"onUpdate:options":
|
|
768
|
+
"onUpdate:options": s[1] || (s[1] = (b) => z.value = b),
|
|
756
769
|
errors: h.value
|
|
757
770
|
}, null, 8, ["settings", "options", "errors"])
|
|
758
771
|
]),
|
|
759
772
|
_: 1
|
|
760
773
|
}, 8, ["label"]),
|
|
761
|
-
l(e(
|
|
774
|
+
l(e(R), {
|
|
762
775
|
value: "fields",
|
|
763
776
|
label: e(r)("panel.tab-fields")
|
|
764
777
|
}, {
|
|
765
778
|
default: t(() => [
|
|
766
779
|
l(Ee, {
|
|
767
|
-
modelValue:
|
|
768
|
-
"onUpdate:modelValue":
|
|
769
|
-
form:
|
|
770
|
-
"can-manage":
|
|
780
|
+
modelValue: g.value,
|
|
781
|
+
"onUpdate:modelValue": s[2] || (s[2] = (b) => g.value = b),
|
|
782
|
+
form: c.value,
|
|
783
|
+
"can-manage": O.value
|
|
771
784
|
}, null, 8, ["modelValue", "form", "can-manage"])
|
|
772
785
|
]),
|
|
773
786
|
_: 1
|
|
774
787
|
}, 8, ["label"]),
|
|
775
|
-
l(e(
|
|
788
|
+
l(e(R), {
|
|
776
789
|
value: "notifications",
|
|
777
790
|
label: e(r)("panel.tab-notifications")
|
|
778
791
|
}, {
|
|
779
792
|
default: t(() => [
|
|
780
793
|
l(tl, {
|
|
781
794
|
modelValue: z.value,
|
|
782
|
-
"onUpdate:modelValue":
|
|
783
|
-
fields:
|
|
795
|
+
"onUpdate:modelValue": s[3] || (s[3] = (b) => z.value = b),
|
|
796
|
+
fields: g.value,
|
|
784
797
|
errors: h.value,
|
|
785
|
-
reported:
|
|
786
|
-
notifications:
|
|
787
|
-
via:
|
|
798
|
+
reported: c.value.recipients,
|
|
799
|
+
notifications: c.value.notifications,
|
|
800
|
+
via: c.value.notify_via
|
|
788
801
|
}, null, 8, ["modelValue", "fields", "errors", "reported", "notifications", "via"])
|
|
789
802
|
]),
|
|
790
803
|
_: 1
|
|
791
804
|
}, 8, ["label"]),
|
|
792
|
-
l(e(
|
|
805
|
+
l(e(R), {
|
|
793
806
|
value: "antispam",
|
|
794
807
|
label: e(r)("panel.tab-antispam")
|
|
795
808
|
}, {
|
|
796
809
|
default: t(() => [
|
|
797
810
|
l(Le, {
|
|
798
811
|
modelValue: z.value,
|
|
799
|
-
"onUpdate:modelValue":
|
|
800
|
-
site:
|
|
812
|
+
"onUpdate:modelValue": s[4] || (s[4] = (b) => z.value = b),
|
|
813
|
+
site: c.value.captcha
|
|
801
814
|
}, null, 8, ["modelValue", "site"])
|
|
802
815
|
]),
|
|
803
816
|
_: 1
|
|
804
817
|
}, 8, ["label"]),
|
|
805
|
-
l(e(
|
|
818
|
+
l(e(R), {
|
|
806
819
|
value: "embed",
|
|
807
820
|
label: e(r)("panel.tab-embed")
|
|
808
821
|
}, {
|
|
809
822
|
default: t(() => [
|
|
810
823
|
l(De, {
|
|
811
|
-
form:
|
|
824
|
+
form: c.value,
|
|
812
825
|
slug: e(f).slug,
|
|
813
|
-
fields:
|
|
826
|
+
fields: g.value
|
|
814
827
|
}, null, 8, ["form", "slug", "fields"])
|
|
815
828
|
]),
|
|
816
829
|
_: 1
|
|
@@ -818,15 +831,15 @@ const Qe = {
|
|
|
818
831
|
]),
|
|
819
832
|
_: 1
|
|
820
833
|
}, 8, ["modelValue"]),
|
|
821
|
-
|
|
834
|
+
O.value ? (x(), w(e(Ie), { key: 1 }, {
|
|
822
835
|
default: t(() => [
|
|
823
836
|
l(e(te), {
|
|
824
837
|
type: "primary",
|
|
825
|
-
loading:
|
|
826
|
-
onClick:
|
|
838
|
+
loading: n.value,
|
|
839
|
+
onClick: d
|
|
827
840
|
}, {
|
|
828
841
|
default: t(() => [
|
|
829
|
-
|
|
842
|
+
V(_(e(r)("panel.save")), 1)
|
|
830
843
|
]),
|
|
831
844
|
_: 1
|
|
832
845
|
}, 8, ["loading"])
|
|
@@ -840,4 +853,4 @@ const Qe = {
|
|
|
840
853
|
export {
|
|
841
854
|
rl as default
|
|
842
855
|
};
|
|
843
|
-
//# sourceMappingURL=FormEditorPage-
|
|
856
|
+
//# sourceMappingURL=FormEditorPage-CXYnpKAh.js.map
|