@webx-ui/module-seo 0.2.1 → 0.2.3
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/SeoLayout.d.ts +16 -7
- package/dist/index.js +731 -804
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useAdmin as
|
|
3
|
-
import {
|
|
4
|
-
import { useRouter as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as E, computed as U, openBlock as y, createBlock as W, unref as e, withCtx as t, renderSlot as ve, createVNode as l, createTextVNode as w, toDisplayString as h, ref as C, isRef as P, createElementVNode as j, withKeys as We, createElementBlock as F, Fragment as se, createCommentVNode as O, renderList as ge, useModel as Ce, resolveDynamicComponent as Te, mergeModels as ze, watch as be, createSlots as ye, markRaw as De } from "vue";
|
|
2
|
+
import { useAdmin as K, useTranslate as J, WxListScreen as Oe, WxDate as _e, useErrorText as le, WxRowMenu as te } from "@webx-ui/module-admin";
|
|
3
|
+
import { WxButton as I, useModal as ie, WxDialog as de, WxSpace as X, WxInput as N, WxAlert as Y, WxText as R, WxBadge as M, WxDescriptions as Re, WxDescriptionsItem as Le, WxEmpty as je, createModal as Z, WxTable as re, WxLink as Ae, useLocales as Be, WxTabs as Pe, WxTab as oe, WxFormItem as z, WxTextarea as me, WxCheckboxGroup as Fe, WxCodeEditor as Ne, localizedValue as xe, WxSelect as ae, WxSwitch as we, toast as B, confirm as ke, WxInputNumber as Ie } from "@webx-ui/core";
|
|
4
|
+
import { useRouter as Me, useRoute as Ee } from "vue-router";
|
|
5
|
+
const Ke = {
|
|
6
6
|
module: {
|
|
7
7
|
title: "SEO"
|
|
8
8
|
},
|
|
@@ -26,7 +26,6 @@ const Je = {
|
|
|
26
26
|
status: "Code",
|
|
27
27
|
hits: "Hits",
|
|
28
28
|
"last-hit": "Last used",
|
|
29
|
-
never: "never",
|
|
30
29
|
loop: "Points at itself",
|
|
31
30
|
"any-kind": "Any kind",
|
|
32
31
|
exact: "Exact",
|
|
@@ -90,242 +89,229 @@ const Je = {
|
|
|
90
89
|
preview: "In search results"
|
|
91
90
|
}
|
|
92
91
|
}, he = /* @__PURE__ */ new WeakSet();
|
|
93
|
-
function
|
|
92
|
+
function q() {
|
|
94
93
|
try {
|
|
95
|
-
const { i18n:
|
|
96
|
-
he.has(
|
|
94
|
+
const { i18n: n } = K();
|
|
95
|
+
he.has(n) || (n.defaults("webx-seo", Ke), he.add(n));
|
|
97
96
|
} catch {
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
|
-
const
|
|
99
|
+
const ue = /* @__PURE__ */ E({
|
|
101
100
|
__name: "SeoLayout",
|
|
102
101
|
props: {
|
|
103
102
|
base: {},
|
|
104
103
|
current: {}
|
|
105
104
|
},
|
|
106
105
|
emits: ["test"],
|
|
107
|
-
setup(
|
|
108
|
-
const d =
|
|
109
|
-
|
|
110
|
-
const s =
|
|
106
|
+
setup(n, { emit: r }) {
|
|
107
|
+
const d = n, c = r, a = K(), i = Me(), f = Ee();
|
|
108
|
+
q();
|
|
109
|
+
const s = J("webx-seo"), S = U(
|
|
111
110
|
() => a.state.manifest?.modules.find((p) => p.id === "seo")?.title ?? s("module.title")
|
|
112
|
-
),
|
|
111
|
+
), k = U(() => [
|
|
113
112
|
{ value: "rules", label: s("page.rules") },
|
|
114
113
|
{ value: "redirects", label: s("page.redirects") },
|
|
115
114
|
{ value: "aliases", label: s("page.automatic") }
|
|
116
|
-
]),
|
|
115
|
+
]), g = U({
|
|
117
116
|
get: () => d.current,
|
|
118
117
|
set: (p) => {
|
|
119
|
-
const
|
|
120
|
-
|
|
118
|
+
const u = p === "rules" ? d.base : `${d.base}/${String(p)}`;
|
|
119
|
+
u !== f.path && i.push(u);
|
|
121
120
|
}
|
|
122
121
|
});
|
|
123
|
-
return (p,
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
return (p, u) => (y(), W(e(Oe), {
|
|
123
|
+
view: g.value,
|
|
124
|
+
"onUpdate:view": u[1] || (u[1] = (V) => g.value = V),
|
|
125
|
+
title: S.value,
|
|
126
|
+
views: k.value
|
|
127
|
+
}, {
|
|
128
|
+
actions: t(() => [
|
|
129
|
+
ve(p.$slots, "actions"),
|
|
130
|
+
l(e(I), {
|
|
131
|
+
variant: "outline",
|
|
132
|
+
icon: "search",
|
|
133
|
+
onClick: u[0] || (u[0] = (V) => c("test"))
|
|
134
|
+
}, {
|
|
126
135
|
default: t(() => [
|
|
127
|
-
|
|
128
|
-
]),
|
|
129
|
-
_: 1
|
|
130
|
-
}),
|
|
131
|
-
l(e(G), { size: "sm" }, {
|
|
132
|
-
default: t(() => [
|
|
133
|
-
l(e(Ae), {
|
|
134
|
-
modelValue: v.value,
|
|
135
|
-
"onUpdate:modelValue": b[0] || (b[0] = (k) => v.value = k),
|
|
136
|
-
options: V.value,
|
|
137
|
-
size: "sm"
|
|
138
|
-
}, null, 8, ["modelValue", "options"]),
|
|
139
|
-
l(e(N), {
|
|
140
|
-
variant: "outline",
|
|
141
|
-
icon: "search",
|
|
142
|
-
onClick: b[1] || (b[1] = (k) => c("test"))
|
|
143
|
-
}, {
|
|
144
|
-
default: t(() => [
|
|
145
|
-
f(m(e(s)("page.test")), 1)
|
|
146
|
-
]),
|
|
147
|
-
_: 1
|
|
148
|
-
})
|
|
136
|
+
w(h(e(s)("page.test")), 1)
|
|
149
137
|
]),
|
|
150
138
|
_: 1
|
|
151
139
|
})
|
|
152
140
|
]),
|
|
153
|
-
|
|
154
|
-
|
|
141
|
+
default: t(() => [
|
|
142
|
+
ve(p.$slots, "default")
|
|
143
|
+
]),
|
|
144
|
+
_: 3
|
|
145
|
+
}, 8, ["view", "title", "views"]));
|
|
155
146
|
}
|
|
156
|
-
})
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
match_type: n.match_type ?? void 0,
|
|
169
|
-
is_active: n.is_active ?? void 0,
|
|
170
|
-
sort: n.sort || void 0,
|
|
171
|
-
page: n.page,
|
|
172
|
-
per_page: n.per_page
|
|
147
|
+
});
|
|
148
|
+
function G(n) {
|
|
149
|
+
const r = `${n.apiPath}/seo`, d = (i) => i.data, c = (i) => ({
|
|
150
|
+
...i.meta,
|
|
151
|
+
data: i.data
|
|
152
|
+
}), a = (i) => ({
|
|
153
|
+
q: i.q || void 0,
|
|
154
|
+
match_type: i.match_type ?? void 0,
|
|
155
|
+
is_active: i.is_active ?? void 0,
|
|
156
|
+
sort: i.sort || void 0,
|
|
157
|
+
page: i.page,
|
|
158
|
+
per_page: i.per_page
|
|
173
159
|
});
|
|
174
160
|
return {
|
|
175
|
-
urls: (
|
|
176
|
-
query: a(
|
|
161
|
+
urls: (i = {}) => n.http.get(`${r}/urls`, {
|
|
162
|
+
query: a(i)
|
|
177
163
|
}).then(c),
|
|
178
|
-
url: (
|
|
179
|
-
createUrl: (
|
|
180
|
-
updateUrl: (
|
|
181
|
-
removeUrl: (
|
|
182
|
-
redirects: (
|
|
164
|
+
url: (i) => n.http.get(`${r}/urls/${i}`).then(d),
|
|
165
|
+
createUrl: (i) => n.http.post(`${r}/urls`, i).then(d),
|
|
166
|
+
updateUrl: (i, f) => n.http.put(`${r}/urls/${i}`, f).then(d),
|
|
167
|
+
removeUrl: (i) => n.http.delete(`${r}/urls/${i}`),
|
|
168
|
+
redirects: (i = {}) => n.http.get(
|
|
183
169
|
`${r}/redirects`,
|
|
184
|
-
{ query: a(
|
|
170
|
+
{ query: a(i) }
|
|
185
171
|
).then(c),
|
|
186
|
-
createRedirect: (
|
|
187
|
-
updateRedirect: (
|
|
188
|
-
removeRedirect: (
|
|
189
|
-
aliases: (
|
|
172
|
+
createRedirect: (i) => n.http.post(`${r}/redirects`, i).then(d),
|
|
173
|
+
updateRedirect: (i, f) => n.http.put(`${r}/redirects/${i}`, f).then(d),
|
|
174
|
+
removeRedirect: (i) => n.http.delete(`${r}/redirects/${i}`),
|
|
175
|
+
aliases: (i = {}) => n.http.get(`${r}/aliases`, {
|
|
190
176
|
query: {
|
|
191
|
-
q:
|
|
192
|
-
locale:
|
|
193
|
-
page:
|
|
194
|
-
per_page:
|
|
177
|
+
q: i.q || void 0,
|
|
178
|
+
locale: i.locale ?? void 0,
|
|
179
|
+
page: i.page,
|
|
180
|
+
per_page: i.per_page
|
|
195
181
|
}
|
|
196
182
|
}).then(c),
|
|
197
183
|
// A POST because it carries an address in its body, and an address in a query string is an
|
|
198
184
|
// address somebody has to escape twice.
|
|
199
|
-
test: (
|
|
185
|
+
test: (i, f = null) => n.http.post(`${r}/test-url`, { url: i, locale: f ?? void 0 }).then(d)
|
|
200
186
|
};
|
|
201
187
|
}
|
|
202
|
-
const
|
|
188
|
+
const Je = { class: "wx-seo-test" }, qe = {
|
|
203
189
|
key: 3,
|
|
204
190
|
class: "wx-seo-test__matched"
|
|
205
|
-
},
|
|
191
|
+
}, He = {
|
|
206
192
|
key: 4,
|
|
207
193
|
class: "wx-seo-test__result"
|
|
208
|
-
},
|
|
194
|
+
}, Ge = {
|
|
209
195
|
key: 5,
|
|
210
196
|
class: "wx-seo-test__chain"
|
|
211
|
-
},
|
|
197
|
+
}, Qe = /* @__PURE__ */ E({
|
|
212
198
|
__name: "TestUrlDialog",
|
|
213
|
-
setup(
|
|
214
|
-
const { open: r } =
|
|
215
|
-
|
|
216
|
-
const a =
|
|
217
|
-
const
|
|
218
|
-
return
|
|
219
|
-
{ label: a("card.title"), value:
|
|
220
|
-
{ label: a("card.h1"), value:
|
|
221
|
-
{ label: a("card.description"), value:
|
|
222
|
-
{ label: a("card.keywords"), value:
|
|
223
|
-
{ label: a("card.canonical"), value:
|
|
224
|
-
{ label: a("card.robots"), value:
|
|
199
|
+
setup(n) {
|
|
200
|
+
const { open: r } = ie(), d = K(), c = G(d);
|
|
201
|
+
q();
|
|
202
|
+
const a = J("webx-seo"), i = C(""), f = C(!1), s = C(null), S = U(() => {
|
|
203
|
+
const g = s.value?.seo;
|
|
204
|
+
return g ? [
|
|
205
|
+
{ label: a("card.title"), value: g.title },
|
|
206
|
+
{ label: a("card.h1"), value: g.h1 },
|
|
207
|
+
{ label: a("card.description"), value: g.description },
|
|
208
|
+
{ label: a("card.keywords"), value: g.keywords },
|
|
209
|
+
{ label: a("card.canonical"), value: g.canonical },
|
|
210
|
+
{ label: a("card.robots"), value: g.robots }
|
|
225
211
|
].filter((p) => p.value) : [];
|
|
226
212
|
});
|
|
227
|
-
async function
|
|
228
|
-
if (
|
|
229
|
-
|
|
213
|
+
async function k() {
|
|
214
|
+
if (i.value.trim() !== "") {
|
|
215
|
+
f.value = !0;
|
|
230
216
|
try {
|
|
231
|
-
s.value = await c.test(
|
|
217
|
+
s.value = await c.test(i.value);
|
|
232
218
|
} finally {
|
|
233
|
-
|
|
219
|
+
f.value = !1;
|
|
234
220
|
}
|
|
235
221
|
}
|
|
236
222
|
}
|
|
237
|
-
return (
|
|
223
|
+
return (g, p) => (y(), W(e(de), {
|
|
238
224
|
open: e(r),
|
|
239
|
-
"onUpdate:open": p[1] || (p[1] = (
|
|
225
|
+
"onUpdate:open": p[1] || (p[1] = (u) => P(r) ? r.value = u : null),
|
|
240
226
|
title: e(a)("page.test"),
|
|
241
227
|
width: 720
|
|
242
228
|
}, {
|
|
243
229
|
default: t(() => [
|
|
244
|
-
|
|
245
|
-
l(e(
|
|
230
|
+
j("div", Je, [
|
|
231
|
+
l(e(X), {
|
|
246
232
|
size: "sm",
|
|
247
233
|
class: "wx-seo-test__ask"
|
|
248
234
|
}, {
|
|
249
235
|
default: t(() => [
|
|
250
|
-
l(e(
|
|
251
|
-
modelValue:
|
|
252
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
236
|
+
l(e(N), {
|
|
237
|
+
modelValue: i.value,
|
|
238
|
+
"onUpdate:modelValue": p[0] || (p[0] = (u) => i.value = u),
|
|
253
239
|
placeholder: e(a)("page.test-placeholder"),
|
|
254
240
|
class: "wx-seo-test__input",
|
|
255
|
-
onKeyup:
|
|
241
|
+
onKeyup: We(k, ["enter"])
|
|
256
242
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
257
|
-
l(e(
|
|
243
|
+
l(e(I), {
|
|
258
244
|
type: "primary",
|
|
259
|
-
loading:
|
|
260
|
-
onClick:
|
|
245
|
+
loading: f.value,
|
|
246
|
+
onClick: k
|
|
261
247
|
}, {
|
|
262
248
|
default: t(() => [
|
|
263
|
-
|
|
249
|
+
w(h(e(a)("page.test-run")), 1)
|
|
264
250
|
]),
|
|
265
251
|
_: 1
|
|
266
252
|
}, 8, ["loading"])
|
|
267
253
|
]),
|
|
268
254
|
_: 1
|
|
269
255
|
}),
|
|
270
|
-
s.value ? (
|
|
271
|
-
s.value.redirect ? (
|
|
256
|
+
s.value ? (y(), F(se, { key: 0 }, [
|
|
257
|
+
s.value.redirect ? (y(), W(e(Y), {
|
|
272
258
|
key: 0,
|
|
273
259
|
type: "warning",
|
|
274
260
|
description: e(a)("page.test-redirected", {
|
|
275
261
|
target: s.value.redirect.target,
|
|
276
262
|
status: s.value.redirect.status
|
|
277
263
|
})
|
|
278
|
-
}, null, 8, ["description"])) :
|
|
279
|
-
s.value.route ? (
|
|
264
|
+
}, null, 8, ["description"])) : O("", !0),
|
|
265
|
+
s.value.route ? (y(), W(e(Y), {
|
|
280
266
|
key: 1,
|
|
281
267
|
type: "info",
|
|
282
268
|
description: s.value.route.kind === "alias" ? e(a)("page.occupied-alias", { target: s.value.route.target ?? s.value.route.path }) : e(a)("page.occupied", { path: s.value.route.path })
|
|
283
|
-
}, null, 8, ["description"])) :
|
|
284
|
-
s.value.matched ? (
|
|
285
|
-
l(e(
|
|
269
|
+
}, null, 8, ["description"])) : O("", !0),
|
|
270
|
+
s.value.matched ? (y(), F("div", qe, [
|
|
271
|
+
l(e(R), {
|
|
286
272
|
size: "sm",
|
|
287
273
|
tone: "muted"
|
|
288
274
|
}, {
|
|
289
275
|
default: t(() => [
|
|
290
|
-
|
|
276
|
+
w(h(e(a)("page.test-matched")), 1)
|
|
291
277
|
]),
|
|
292
278
|
_: 1
|
|
293
279
|
}),
|
|
294
|
-
l(e(
|
|
280
|
+
l(e(X), {
|
|
295
281
|
size: "sm",
|
|
296
282
|
align: "center"
|
|
297
283
|
}, {
|
|
298
284
|
default: t(() => [
|
|
299
|
-
l(e(
|
|
285
|
+
l(e(M), null, {
|
|
300
286
|
default: t(() => [
|
|
301
|
-
|
|
287
|
+
w(h(e(a)(`page.${s.value.matched.match_type}`)), 1)
|
|
302
288
|
]),
|
|
303
289
|
_: 1
|
|
304
290
|
}),
|
|
305
|
-
l(e(
|
|
291
|
+
l(e(R), {
|
|
306
292
|
mono: "",
|
|
307
293
|
size: "sm"
|
|
308
294
|
}, {
|
|
309
295
|
default: t(() => [
|
|
310
|
-
|
|
296
|
+
w(h(s.value.matched.pattern), 1)
|
|
311
297
|
]),
|
|
312
298
|
_: 1
|
|
313
299
|
})
|
|
314
300
|
]),
|
|
315
301
|
_: 1
|
|
316
302
|
})
|
|
317
|
-
])) : (
|
|
303
|
+
])) : (y(), W(e(Y), {
|
|
318
304
|
key: 2,
|
|
319
305
|
type: "info",
|
|
320
306
|
description: e(a)("page.test-none")
|
|
321
307
|
}, null, 8, ["description"])),
|
|
322
|
-
|
|
323
|
-
l(e(
|
|
308
|
+
S.value.length > 0 ? (y(), F("div", He, [
|
|
309
|
+
l(e(R), {
|
|
324
310
|
size: "sm",
|
|
325
311
|
tone: "muted"
|
|
326
312
|
}, {
|
|
327
313
|
default: t(() => [
|
|
328
|
-
|
|
314
|
+
w(h(e(a)("page.test-result")), 1)
|
|
329
315
|
]),
|
|
330
316
|
_: 1
|
|
331
317
|
}),
|
|
@@ -335,47 +321,47 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
335
321
|
size: "sm"
|
|
336
322
|
}, {
|
|
337
323
|
default: t(() => [
|
|
338
|
-
(
|
|
339
|
-
key:
|
|
340
|
-
label:
|
|
324
|
+
(y(!0), F(se, null, ge(S.value, (u) => (y(), W(e(Le), {
|
|
325
|
+
key: u.label,
|
|
326
|
+
label: u.label
|
|
341
327
|
}, {
|
|
342
328
|
default: t(() => [
|
|
343
|
-
|
|
329
|
+
w(h(u.value), 1)
|
|
344
330
|
]),
|
|
345
331
|
_: 2
|
|
346
332
|
}, 1032, ["label"]))), 128))
|
|
347
333
|
]),
|
|
348
334
|
_: 1
|
|
349
335
|
})
|
|
350
|
-
])) :
|
|
351
|
-
s.value.chain.length > 0 ? (
|
|
352
|
-
l(e(
|
|
336
|
+
])) : O("", !0),
|
|
337
|
+
s.value.chain.length > 0 ? (y(), F("div", Ge, [
|
|
338
|
+
l(e(R), {
|
|
353
339
|
size: "sm",
|
|
354
340
|
tone: "muted"
|
|
355
341
|
}, {
|
|
356
342
|
default: t(() => [
|
|
357
|
-
|
|
343
|
+
w(h(e(a)("page.test-chain")), 1)
|
|
358
344
|
]),
|
|
359
345
|
_: 1
|
|
360
346
|
}),
|
|
361
|
-
l(e(
|
|
347
|
+
l(e(X), {
|
|
362
348
|
size: "xs",
|
|
363
349
|
wrap: ""
|
|
364
350
|
}, {
|
|
365
351
|
default: t(() => [
|
|
366
|
-
(
|
|
367
|
-
key:
|
|
352
|
+
(y(!0), F(se, null, ge(s.value.chain, (u) => (y(), W(e(M), {
|
|
353
|
+
key: u.source
|
|
368
354
|
}, {
|
|
369
355
|
default: t(() => [
|
|
370
|
-
|
|
356
|
+
w(h(u.source) + " · " + h(u.priority), 1)
|
|
371
357
|
]),
|
|
372
358
|
_: 2
|
|
373
359
|
}, 1024))), 128))
|
|
374
360
|
]),
|
|
375
361
|
_: 1
|
|
376
362
|
})
|
|
377
|
-
])) :
|
|
378
|
-
], 64)) :
|
|
363
|
+
])) : O("", !0)
|
|
364
|
+
], 64)) : f.value ? O("", !0) : (y(), W(e(je), {
|
|
379
365
|
key: 1,
|
|
380
366
|
icon: "search",
|
|
381
367
|
description: e(a)("page.test-empty")
|
|
@@ -385,150 +371,142 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
385
371
|
_: 1
|
|
386
372
|
}, 8, ["open", "title"]));
|
|
387
373
|
}
|
|
388
|
-
}),
|
|
374
|
+
}), Q = (n, r) => {
|
|
375
|
+
const d = n.__vccOpts || n;
|
|
376
|
+
for (const [c, a] of r)
|
|
377
|
+
d[c] = a;
|
|
378
|
+
return d;
|
|
379
|
+
}, ce = /* @__PURE__ */ Q(Qe, [["__scopeId", "data-v-116e47cd"]]), Xe = /* @__PURE__ */ E({
|
|
389
380
|
__name: "SeoAliasesPage",
|
|
390
381
|
props: {
|
|
391
382
|
base: { default: "/seo" }
|
|
392
383
|
},
|
|
393
|
-
setup(
|
|
394
|
-
const r =
|
|
395
|
-
|
|
396
|
-
const a =
|
|
384
|
+
setup(n) {
|
|
385
|
+
const r = n, d = K(), c = G(d);
|
|
386
|
+
q();
|
|
387
|
+
const a = J("webx-seo"), i = C(null), f = C(!1), s = Z(ce), S = U(() => (d.state.manifest?.locales?.length ?? 1) > 1), k = U(() => [
|
|
397
388
|
{ key: "pattern", label: a("page.address"), sortable: !1 },
|
|
398
389
|
{ key: "target", label: a("page.target") },
|
|
399
390
|
{
|
|
400
391
|
key: "locale",
|
|
401
392
|
label: a("page.language"),
|
|
402
393
|
align: "center",
|
|
403
|
-
hidden: !
|
|
394
|
+
hidden: !S.value,
|
|
404
395
|
hideBelow: 760
|
|
405
396
|
},
|
|
406
397
|
{ key: "created_at", label: a("page.moved-at"), hideBelow: 900, hideOnCards: !0 }
|
|
407
398
|
]);
|
|
408
|
-
async function
|
|
409
|
-
|
|
399
|
+
async function g(p) {
|
|
400
|
+
f.value = !0;
|
|
410
401
|
try {
|
|
411
|
-
|
|
402
|
+
i.value = await c.aliases({
|
|
412
403
|
q: p.search,
|
|
413
404
|
page: p.page,
|
|
414
405
|
per_page: p.perPage
|
|
415
406
|
});
|
|
416
407
|
} finally {
|
|
417
|
-
|
|
408
|
+
f.value = !1;
|
|
418
409
|
}
|
|
419
410
|
}
|
|
420
|
-
return (p,
|
|
411
|
+
return (p, u) => (y(), W(ue, {
|
|
421
412
|
base: r.base,
|
|
422
413
|
current: "aliases",
|
|
423
|
-
onTest:
|
|
414
|
+
onTest: u[0] || (u[0] = (V) => e(s)({}))
|
|
424
415
|
}, {
|
|
425
416
|
default: t(() => [
|
|
426
|
-
l(e(
|
|
427
|
-
|
|
428
|
-
|
|
417
|
+
l(e(Y), {
|
|
418
|
+
type: "info",
|
|
419
|
+
variant: "soft",
|
|
420
|
+
description: e(a)("page.aliases-help"),
|
|
421
|
+
class: "wx-seo-aliases__note"
|
|
422
|
+
}, null, 8, ["description"]),
|
|
423
|
+
l(e(re), {
|
|
424
|
+
data: i.value,
|
|
425
|
+
columns: k.value,
|
|
426
|
+
"row-key": "id",
|
|
427
|
+
searchable: "",
|
|
428
|
+
flush: "",
|
|
429
|
+
loading: f.value,
|
|
430
|
+
"search-placeholder": e(a)("page.search-aliases"),
|
|
431
|
+
"empty-text": e(a)("page.aliases-empty"),
|
|
432
|
+
onStateChange: g
|
|
433
|
+
}, {
|
|
434
|
+
"cell-pattern": t(({ row: V }) => [
|
|
435
|
+
l(e(R), {
|
|
436
|
+
mono: "",
|
|
437
|
+
size: "sm"
|
|
438
|
+
}, {
|
|
439
|
+
default: t(() => [
|
|
440
|
+
w(h(V.pattern), 1)
|
|
441
|
+
]),
|
|
442
|
+
_: 2
|
|
443
|
+
}, 1024)
|
|
429
444
|
]),
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
}, null, 8, ["description"]),
|
|
437
|
-
l(e(ce), {
|
|
438
|
-
data: n.value,
|
|
439
|
-
columns: V.value,
|
|
440
|
-
"row-key": "id",
|
|
441
|
-
searchable: "",
|
|
442
|
-
flush: "",
|
|
443
|
-
loading: h.value,
|
|
444
|
-
"search-placeholder": e(a)("page.search-aliases"),
|
|
445
|
-
"empty-text": e(a)("page.aliases-empty"),
|
|
446
|
-
onStateChange: v
|
|
445
|
+
"cell-target": t(({ row: V }) => [
|
|
446
|
+
V.target && V.target_url ? (y(), W(e(Ae), {
|
|
447
|
+
key: 0,
|
|
448
|
+
href: V.target_url,
|
|
449
|
+
external: "",
|
|
450
|
+
size: "sm"
|
|
447
451
|
}, {
|
|
448
|
-
|
|
449
|
-
l(e(
|
|
452
|
+
default: t(() => [
|
|
453
|
+
l(e(R), {
|
|
450
454
|
mono: "",
|
|
451
455
|
size: "sm"
|
|
452
456
|
}, {
|
|
453
457
|
default: t(() => [
|
|
454
|
-
|
|
458
|
+
w(h(V.target), 1)
|
|
455
459
|
]),
|
|
456
460
|
_: 2
|
|
457
461
|
}, 1024)
|
|
458
462
|
]),
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
default: t(() => [
|
|
467
|
-
l(e(L), {
|
|
468
|
-
mono: "",
|
|
469
|
-
size: "sm"
|
|
470
|
-
}, {
|
|
471
|
-
default: t(() => [
|
|
472
|
-
f(m(k.target), 1)
|
|
473
|
-
]),
|
|
474
|
-
_: 2
|
|
475
|
-
}, 1024)
|
|
476
|
-
]),
|
|
477
|
-
_: 2
|
|
478
|
-
}, 1032, ["href"])) : (x(), U(e(F), {
|
|
479
|
-
key: 1,
|
|
480
|
-
type: "warning"
|
|
481
|
-
}, {
|
|
482
|
-
default: t(() => [
|
|
483
|
-
f(m(e(a)("page.gone")), 1)
|
|
484
|
-
]),
|
|
485
|
-
_: 1
|
|
486
|
-
}))
|
|
487
|
-
]),
|
|
488
|
-
"cell-locale": t(({ row: k }) => [
|
|
489
|
-
l(e(F), null, {
|
|
490
|
-
default: t(() => [
|
|
491
|
-
f(m(k.locale), 1)
|
|
492
|
-
]),
|
|
493
|
-
_: 2
|
|
494
|
-
}, 1024)
|
|
495
|
-
]),
|
|
496
|
-
"cell-created_at": t(({ row: k }) => [
|
|
497
|
-
l(e(L), {
|
|
498
|
-
size: "sm",
|
|
499
|
-
tone: "muted"
|
|
500
|
-
}, {
|
|
501
|
-
default: t(() => [
|
|
502
|
-
f(m(k.created_at ? new Date(k.created_at).toLocaleString() : ""), 1)
|
|
503
|
-
]),
|
|
504
|
-
_: 2
|
|
505
|
-
}, 1024)
|
|
463
|
+
_: 2
|
|
464
|
+
}, 1032, ["href"])) : (y(), W(e(M), {
|
|
465
|
+
key: 1,
|
|
466
|
+
type: "warning"
|
|
467
|
+
}, {
|
|
468
|
+
default: t(() => [
|
|
469
|
+
w(h(e(a)("page.gone")), 1)
|
|
506
470
|
]),
|
|
507
471
|
_: 1
|
|
508
|
-
}
|
|
472
|
+
}))
|
|
473
|
+
]),
|
|
474
|
+
"cell-locale": t(({ row: V }) => [
|
|
475
|
+
l(e(M), null, {
|
|
476
|
+
default: t(() => [
|
|
477
|
+
w(h(V.locale), 1)
|
|
478
|
+
]),
|
|
479
|
+
_: 2
|
|
480
|
+
}, 1024)
|
|
481
|
+
]),
|
|
482
|
+
"cell-created_at": t(({ row: V }) => [
|
|
483
|
+
V.created_at ? (y(), W(e(_e), {
|
|
484
|
+
key: 0,
|
|
485
|
+
value: V.created_at
|
|
486
|
+
}, null, 8, ["value"])) : O("", !0)
|
|
509
487
|
]),
|
|
510
488
|
_: 1
|
|
511
|
-
})
|
|
489
|
+
}, 8, ["data", "columns", "loading", "search-placeholder", "empty-text"])
|
|
512
490
|
]),
|
|
513
491
|
_: 1
|
|
514
492
|
}, 8, ["base"]));
|
|
515
493
|
}
|
|
516
|
-
}),
|
|
494
|
+
}), Ye = /* @__PURE__ */ Q(Xe, [["__scopeId", "data-v-6816a871"]]), ne = [
|
|
517
495
|
"noindex",
|
|
518
496
|
"nofollow",
|
|
519
497
|
"noarchive",
|
|
520
498
|
"nosnippet",
|
|
521
499
|
"noimageindex"
|
|
522
|
-
],
|
|
500
|
+
], Ze = { class: "wx-seo" }, et = { class: "wx-seo__fields" }, tt = { class: "wx-seo__count" }, at = { class: "wx-seo__count" }, lt = {
|
|
523
501
|
key: 0,
|
|
524
502
|
class: "wx-seo__preview"
|
|
525
|
-
},
|
|
503
|
+
}, st = { class: "wx-seo__snippet" }, ot = {
|
|
526
504
|
key: 0,
|
|
527
505
|
class: "wx-seo__snippet-address"
|
|
528
|
-
},
|
|
506
|
+
}, nt = { class: "wx-seo__snippet-title" }, it = { class: "wx-seo__snippet-text" }, dt = { class: "wx-seo__fields" }, rt = { class: "wx-seo__fields" }, ut = /* @__PURE__ */ E({
|
|
529
507
|
name: "WxSeo",
|
|
530
508
|
__name: "SeoCard",
|
|
531
|
-
props: /* @__PURE__ */
|
|
509
|
+
props: /* @__PURE__ */ ze({
|
|
532
510
|
mediaField: { default: void 0 },
|
|
533
511
|
disabled: { type: Boolean, default: !1 },
|
|
534
512
|
titleLimit: { default: 60 },
|
|
@@ -540,98 +518,98 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
540
518
|
modelModifiers: {}
|
|
541
519
|
}),
|
|
542
520
|
emits: ["update:modelValue"],
|
|
543
|
-
setup(
|
|
544
|
-
const r =
|
|
545
|
-
|
|
546
|
-
const c =
|
|
521
|
+
setup(n) {
|
|
522
|
+
const r = n, d = Ce(n, "modelValue");
|
|
523
|
+
q();
|
|
524
|
+
const c = J("webx-seo"), a = Be(), i = C(null), f = C(!1);
|
|
547
525
|
function s(_) {
|
|
548
|
-
return
|
|
526
|
+
return U({
|
|
549
527
|
get: () => d.value?.[_],
|
|
550
528
|
set: ($) => {
|
|
551
529
|
d.value = { ...d.value ?? {}, [_]: $ };
|
|
552
530
|
}
|
|
553
531
|
});
|
|
554
532
|
}
|
|
555
|
-
const
|
|
533
|
+
const S = s("title"), k = s("h1"), g = s("description"), p = s("keywords"), u = s("og_title"), V = s("og_description"), L = U({
|
|
556
534
|
get: () => d.value?.canonical ?? "",
|
|
557
535
|
set: (_) => {
|
|
558
536
|
d.value = { ...d.value ?? {}, canonical: _.trim() === "" ? null : _ };
|
|
559
537
|
}
|
|
560
|
-
}),
|
|
538
|
+
}), A = U({
|
|
561
539
|
get: () => d.value?.og_image ?? null,
|
|
562
540
|
set: (_) => {
|
|
563
541
|
d.value = { ...d.value ?? {}, og_image: _ };
|
|
564
542
|
}
|
|
565
|
-
}),
|
|
566
|
-
() =>
|
|
567
|
-
),
|
|
568
|
-
get: () =>
|
|
543
|
+
}), D = U(() => (d.value?.robots ?? "").split(",").map((_) => _.trim())), m = U(
|
|
544
|
+
() => D.value.filter((_) => _ !== "" && !ne.includes(_))
|
|
545
|
+
), b = U({
|
|
546
|
+
get: () => D.value.filter((_) => ne.includes(_)),
|
|
569
547
|
set: (_) => {
|
|
570
|
-
const $ = [..._, ...
|
|
548
|
+
const $ = [..._, ...m.value].join(", ");
|
|
571
549
|
d.value = { ...d.value ?? {}, robots: $ === "" ? null : $ };
|
|
572
550
|
}
|
|
573
|
-
}),
|
|
574
|
-
() =>
|
|
575
|
-
),
|
|
551
|
+
}), o = U(
|
|
552
|
+
() => ne.map((_) => ({ value: _, label: c(`card.${_}`) }))
|
|
553
|
+
), x = U({
|
|
576
554
|
get: () => {
|
|
577
|
-
if (
|
|
555
|
+
if (i.value !== null) return i.value;
|
|
578
556
|
const _ = d.value?.json_ld;
|
|
579
557
|
return _ == null ? "" : JSON.stringify(_, null, 2);
|
|
580
558
|
},
|
|
581
559
|
set: (_) => {
|
|
582
|
-
if (
|
|
583
|
-
|
|
560
|
+
if (i.value = _, _.trim() === "") {
|
|
561
|
+
f.value = !1, d.value = { ...d.value ?? {}, json_ld: null };
|
|
584
562
|
return;
|
|
585
563
|
}
|
|
586
564
|
try {
|
|
587
|
-
d.value = { ...d.value ?? {}, json_ld: JSON.parse(_) },
|
|
565
|
+
d.value = { ...d.value ?? {}, json_ld: JSON.parse(_) }, f.value = !1;
|
|
588
566
|
} catch {
|
|
589
|
-
|
|
567
|
+
f.value = !0;
|
|
590
568
|
}
|
|
591
569
|
}
|
|
592
570
|
});
|
|
593
|
-
function
|
|
571
|
+
function v(_) {
|
|
594
572
|
return xe(_, a.active.value);
|
|
595
573
|
}
|
|
596
|
-
const ee =
|
|
597
|
-
title:
|
|
598
|
-
description:
|
|
599
|
-
})),
|
|
600
|
-
title:
|
|
601
|
-
description:
|
|
602
|
-
address:
|
|
603
|
-
})), Se =
|
|
604
|
-
() =>
|
|
574
|
+
const ee = U(() => ({
|
|
575
|
+
title: v(S.value).length,
|
|
576
|
+
description: v(g.value).length
|
|
577
|
+
})), H = U(() => ({
|
|
578
|
+
title: v(S.value),
|
|
579
|
+
description: v(g.value),
|
|
580
|
+
address: L.value || (r.site ?? "")
|
|
581
|
+
})), Se = U(() => H.value.title !== "" || H.value.description !== ""), Ue = U(
|
|
582
|
+
() => m.value.length === 0 ? void 0 : c("card.robots-kept", { directives: m.value.join(", ") })
|
|
605
583
|
);
|
|
606
|
-
function
|
|
584
|
+
function pe(_, $) {
|
|
607
585
|
return _ > $ ? "warning" : "muted";
|
|
608
586
|
}
|
|
609
|
-
return (_, $) => (
|
|
610
|
-
l(e(
|
|
587
|
+
return (_, $) => (y(), F("div", Ze, [
|
|
588
|
+
l(e(Pe), { "keep-alive": "" }, {
|
|
611
589
|
default: t(() => [
|
|
612
|
-
l(e(
|
|
590
|
+
l(e(oe), {
|
|
613
591
|
label: e(c)("card.section-page"),
|
|
614
592
|
value: "page"
|
|
615
593
|
}, {
|
|
616
594
|
default: t(() => [
|
|
617
|
-
|
|
618
|
-
l(e(
|
|
595
|
+
j("div", et, [
|
|
596
|
+
l(e(z), {
|
|
619
597
|
label: e(c)("card.title"),
|
|
620
|
-
disabled:
|
|
598
|
+
disabled: n.disabled
|
|
621
599
|
}, {
|
|
622
600
|
default: t(() => [
|
|
623
|
-
l(e(
|
|
624
|
-
modelValue: e(
|
|
625
|
-
"onUpdate:modelValue": $[0] || ($[0] = (
|
|
601
|
+
l(e(N), {
|
|
602
|
+
modelValue: e(S),
|
|
603
|
+
"onUpdate:modelValue": $[0] || ($[0] = (T) => P(S) ? S.value = T : null),
|
|
626
604
|
localized: ""
|
|
627
605
|
}, null, 8, ["modelValue"]),
|
|
628
|
-
|
|
629
|
-
l(e(
|
|
606
|
+
j("div", tt, [
|
|
607
|
+
l(e(R), {
|
|
630
608
|
size: "sm",
|
|
631
|
-
tone:
|
|
609
|
+
tone: pe(ee.value.title, n.titleLimit)
|
|
632
610
|
}, {
|
|
633
611
|
default: t(() => [
|
|
634
|
-
|
|
612
|
+
w(h(ee.value.title) + " / " + h(n.titleLimit), 1)
|
|
635
613
|
]),
|
|
636
614
|
_: 1
|
|
637
615
|
}, 8, ["tone"])
|
|
@@ -639,37 +617,37 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
639
617
|
]),
|
|
640
618
|
_: 1
|
|
641
619
|
}, 8, ["label", "disabled"]),
|
|
642
|
-
l(e(
|
|
620
|
+
l(e(z), {
|
|
643
621
|
label: e(c)("card.h1"),
|
|
644
|
-
disabled:
|
|
622
|
+
disabled: n.disabled
|
|
645
623
|
}, {
|
|
646
624
|
default: t(() => [
|
|
647
|
-
l(e(
|
|
648
|
-
modelValue: e(
|
|
649
|
-
"onUpdate:modelValue": $[1] || ($[1] = (
|
|
625
|
+
l(e(N), {
|
|
626
|
+
modelValue: e(k),
|
|
627
|
+
"onUpdate:modelValue": $[1] || ($[1] = (T) => P(k) ? k.value = T : null),
|
|
650
628
|
localized: ""
|
|
651
629
|
}, null, 8, ["modelValue"])
|
|
652
630
|
]),
|
|
653
631
|
_: 1
|
|
654
632
|
}, 8, ["label", "disabled"]),
|
|
655
|
-
l(e(
|
|
633
|
+
l(e(z), {
|
|
656
634
|
label: e(c)("card.description"),
|
|
657
|
-
disabled:
|
|
635
|
+
disabled: n.disabled
|
|
658
636
|
}, {
|
|
659
637
|
default: t(() => [
|
|
660
|
-
l(e(
|
|
661
|
-
modelValue: e(
|
|
662
|
-
"onUpdate:modelValue": $[2] || ($[2] = (
|
|
638
|
+
l(e(me), {
|
|
639
|
+
modelValue: e(g),
|
|
640
|
+
"onUpdate:modelValue": $[2] || ($[2] = (T) => P(g) ? g.value = T : null),
|
|
663
641
|
localized: "",
|
|
664
642
|
rows: 3
|
|
665
643
|
}, null, 8, ["modelValue"]),
|
|
666
|
-
|
|
667
|
-
l(e(
|
|
644
|
+
j("div", at, [
|
|
645
|
+
l(e(R), {
|
|
668
646
|
size: "sm",
|
|
669
|
-
tone:
|
|
647
|
+
tone: pe(ee.value.description, n.descriptionLimit)
|
|
670
648
|
}, {
|
|
671
649
|
default: t(() => [
|
|
672
|
-
|
|
650
|
+
w(h(ee.value.description) + " / " + h(n.descriptionLimit), 1)
|
|
673
651
|
]),
|
|
674
652
|
_: 1
|
|
675
653
|
}, 8, ["tone"])
|
|
@@ -677,76 +655,76 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
677
655
|
]),
|
|
678
656
|
_: 1
|
|
679
657
|
}, 8, ["label", "disabled"]),
|
|
680
|
-
l(e(
|
|
658
|
+
l(e(z), {
|
|
681
659
|
label: e(c)("card.keywords"),
|
|
682
|
-
disabled:
|
|
660
|
+
disabled: n.disabled
|
|
683
661
|
}, {
|
|
684
662
|
default: t(() => [
|
|
685
|
-
l(e(
|
|
663
|
+
l(e(N), {
|
|
686
664
|
modelValue: e(p),
|
|
687
|
-
"onUpdate:modelValue": $[3] || ($[3] = (
|
|
665
|
+
"onUpdate:modelValue": $[3] || ($[3] = (T) => P(p) ? p.value = T : null),
|
|
688
666
|
localized: ""
|
|
689
667
|
}, null, 8, ["modelValue"])
|
|
690
668
|
]),
|
|
691
669
|
_: 1
|
|
692
670
|
}, 8, ["label", "disabled"]),
|
|
693
|
-
Se.value ? (
|
|
694
|
-
l(e(
|
|
671
|
+
Se.value ? (y(), F("div", lt, [
|
|
672
|
+
l(e(R), {
|
|
695
673
|
size: "sm",
|
|
696
674
|
tone: "muted"
|
|
697
675
|
}, {
|
|
698
676
|
default: t(() => [
|
|
699
|
-
|
|
677
|
+
w(h(e(c)("card.preview")), 1)
|
|
700
678
|
]),
|
|
701
679
|
_: 1
|
|
702
680
|
}),
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
681
|
+
j("div", st, [
|
|
682
|
+
H.value.address ? (y(), F("div", ot, h(H.value.address), 1)) : O("", !0),
|
|
683
|
+
j("div", nt, h(H.value.title), 1),
|
|
684
|
+
j("div", it, h(H.value.description), 1)
|
|
707
685
|
])
|
|
708
|
-
])) :
|
|
686
|
+
])) : O("", !0)
|
|
709
687
|
])
|
|
710
688
|
]),
|
|
711
689
|
_: 1
|
|
712
690
|
}, 8, ["label"]),
|
|
713
|
-
l(e(
|
|
691
|
+
l(e(oe), {
|
|
714
692
|
label: e(c)("card.section-share"),
|
|
715
693
|
value: "share"
|
|
716
694
|
}, {
|
|
717
695
|
default: t(() => [
|
|
718
|
-
|
|
719
|
-
|
|
696
|
+
j("div", dt, [
|
|
697
|
+
n.mediaField ? (y(), W(Te(n.mediaField), {
|
|
720
698
|
key: 0,
|
|
721
|
-
modelValue:
|
|
722
|
-
"onUpdate:modelValue": $[4] || ($[4] = (
|
|
699
|
+
modelValue: A.value,
|
|
700
|
+
"onUpdate:modelValue": $[4] || ($[4] = (T) => A.value = T),
|
|
723
701
|
label: e(c)("card.og-image"),
|
|
724
702
|
aspect: "16/9",
|
|
725
703
|
accept: "image",
|
|
726
|
-
disabled:
|
|
727
|
-
}, null, 8, ["modelValue", "label", "disabled"])) :
|
|
728
|
-
l(e(
|
|
704
|
+
disabled: n.disabled
|
|
705
|
+
}, null, 8, ["modelValue", "label", "disabled"])) : O("", !0),
|
|
706
|
+
l(e(z), {
|
|
729
707
|
label: e(c)("card.og-title"),
|
|
730
708
|
help: e(c)("card.og-help"),
|
|
731
|
-
disabled:
|
|
709
|
+
disabled: n.disabled
|
|
732
710
|
}, {
|
|
733
711
|
default: t(() => [
|
|
734
|
-
l(e(
|
|
735
|
-
modelValue: e(
|
|
736
|
-
"onUpdate:modelValue": $[5] || ($[5] = (
|
|
712
|
+
l(e(N), {
|
|
713
|
+
modelValue: e(u),
|
|
714
|
+
"onUpdate:modelValue": $[5] || ($[5] = (T) => P(u) ? u.value = T : null),
|
|
737
715
|
localized: ""
|
|
738
716
|
}, null, 8, ["modelValue"])
|
|
739
717
|
]),
|
|
740
718
|
_: 1
|
|
741
719
|
}, 8, ["label", "help", "disabled"]),
|
|
742
|
-
l(e(
|
|
720
|
+
l(e(z), {
|
|
743
721
|
label: e(c)("card.og-description"),
|
|
744
|
-
disabled:
|
|
722
|
+
disabled: n.disabled
|
|
745
723
|
}, {
|
|
746
724
|
default: t(() => [
|
|
747
|
-
l(e(
|
|
748
|
-
modelValue: e(
|
|
749
|
-
"onUpdate:modelValue": $[6] || ($[6] = (
|
|
725
|
+
l(e(me), {
|
|
726
|
+
modelValue: e(V),
|
|
727
|
+
"onUpdate:modelValue": $[6] || ($[6] = (T) => P(V) ? V.value = T : null),
|
|
750
728
|
localized: "",
|
|
751
729
|
rows: 2
|
|
752
730
|
}, null, 8, ["modelValue"])
|
|
@@ -757,51 +735,51 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
757
735
|
]),
|
|
758
736
|
_: 1
|
|
759
737
|
}, 8, ["label"]),
|
|
760
|
-
l(e(
|
|
738
|
+
l(e(oe), {
|
|
761
739
|
label: e(c)("card.section-advanced"),
|
|
762
740
|
value: "advanced"
|
|
763
741
|
}, {
|
|
764
742
|
default: t(() => [
|
|
765
|
-
|
|
766
|
-
l(e(
|
|
743
|
+
j("div", rt, [
|
|
744
|
+
l(e(z), {
|
|
767
745
|
label: e(c)("card.canonical"),
|
|
768
746
|
help: e(c)("card.canonical-help"),
|
|
769
|
-
disabled:
|
|
747
|
+
disabled: n.disabled
|
|
770
748
|
}, {
|
|
771
749
|
default: t(() => [
|
|
772
|
-
l(e(
|
|
773
|
-
modelValue:
|
|
774
|
-
"onUpdate:modelValue": $[7] || ($[7] = (
|
|
750
|
+
l(e(N), {
|
|
751
|
+
modelValue: L.value,
|
|
752
|
+
"onUpdate:modelValue": $[7] || ($[7] = (T) => L.value = T),
|
|
775
753
|
placeholder: "https://example.com/page"
|
|
776
754
|
}, null, 8, ["modelValue"])
|
|
777
755
|
]),
|
|
778
756
|
_: 1
|
|
779
757
|
}, 8, ["label", "help", "disabled"]),
|
|
780
|
-
l(e(
|
|
758
|
+
l(e(z), {
|
|
781
759
|
label: e(c)("card.robots"),
|
|
782
|
-
help:
|
|
783
|
-
disabled:
|
|
760
|
+
help: Ue.value,
|
|
761
|
+
disabled: n.disabled
|
|
784
762
|
}, {
|
|
785
763
|
default: t(() => [
|
|
786
764
|
l(e(Fe), {
|
|
787
|
-
modelValue:
|
|
788
|
-
"onUpdate:modelValue": $[8] || ($[8] = (
|
|
789
|
-
options:
|
|
765
|
+
modelValue: b.value,
|
|
766
|
+
"onUpdate:modelValue": $[8] || ($[8] = (T) => b.value = T),
|
|
767
|
+
options: o.value
|
|
790
768
|
}, null, 8, ["modelValue", "options"])
|
|
791
769
|
]),
|
|
792
770
|
_: 1
|
|
793
771
|
}, 8, ["label", "help", "disabled"]),
|
|
794
|
-
|
|
772
|
+
n.structuredData ? (y(), W(e(z), {
|
|
795
773
|
key: 0,
|
|
796
774
|
label: e(c)("card.json-ld"),
|
|
797
775
|
help: e(c)("card.json-ld-help"),
|
|
798
|
-
error:
|
|
799
|
-
disabled:
|
|
776
|
+
error: f.value ? e(c)("card.json-ld-invalid") : void 0,
|
|
777
|
+
disabled: n.disabled
|
|
800
778
|
}, {
|
|
801
779
|
default: t(() => [
|
|
802
|
-
l(e(
|
|
803
|
-
modelValue:
|
|
804
|
-
"onUpdate:modelValue": $[9] || ($[9] = (
|
|
780
|
+
l(e(Ne), {
|
|
781
|
+
modelValue: x.value,
|
|
782
|
+
"onUpdate:modelValue": $[9] || ($[9] = (T) => x.value = T),
|
|
805
783
|
language: "json",
|
|
806
784
|
lint: "",
|
|
807
785
|
"min-height": "120px",
|
|
@@ -809,7 +787,7 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
809
787
|
}, null, 8, ["modelValue"])
|
|
810
788
|
]),
|
|
811
789
|
_: 1
|
|
812
|
-
}, 8, ["label", "help", "error", "disabled"])) :
|
|
790
|
+
}, 8, ["label", "help", "error", "disabled"])) : O("", !0)
|
|
813
791
|
])
|
|
814
792
|
]),
|
|
815
793
|
_: 1
|
|
@@ -819,93 +797,93 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
819
797
|
})
|
|
820
798
|
]));
|
|
821
799
|
}
|
|
822
|
-
}), Ve = /* @__PURE__ */
|
|
800
|
+
}), Ve = /* @__PURE__ */ Q(ut, [["__scopeId", "data-v-60b7936d"]]), ct = { class: "wx-seo-redirect" }, pt = { class: "wx-seo-redirect__row" }, vt = /* @__PURE__ */ E({
|
|
823
801
|
__name: "SeoRedirectDialog",
|
|
824
802
|
props: {
|
|
825
803
|
redirect: { default: null }
|
|
826
804
|
},
|
|
827
|
-
setup(
|
|
828
|
-
const r =
|
|
829
|
-
|
|
830
|
-
const s =
|
|
805
|
+
setup(n) {
|
|
806
|
+
const r = n, { resolve: d, dismiss: c, open: a } = ie(), i = K(), f = G(i);
|
|
807
|
+
q();
|
|
808
|
+
const s = J("webx-seo"), S = le(), k = C(!1), g = C({}), p = C(null), u = C({
|
|
831
809
|
match_type: "exact",
|
|
832
810
|
pattern: "",
|
|
833
811
|
target: "",
|
|
834
812
|
status: 301,
|
|
835
813
|
is_active: !0
|
|
836
|
-
}),
|
|
814
|
+
}), V = U(() => r.redirect !== null), L = U(() => [
|
|
837
815
|
{ value: "exact", label: s("page.exact") },
|
|
838
816
|
{ value: "mask", label: s("page.mask") },
|
|
839
817
|
{ value: "regex", label: s("page.regex") }
|
|
840
|
-
]),
|
|
818
|
+
]), A = [
|
|
841
819
|
{ value: 301, label: "301" },
|
|
842
820
|
{ value: 302, label: "302" }
|
|
843
821
|
];
|
|
844
|
-
|
|
822
|
+
be(
|
|
845
823
|
() => r.redirect,
|
|
846
|
-
(
|
|
847
|
-
|
|
848
|
-
match_type:
|
|
849
|
-
pattern:
|
|
850
|
-
target:
|
|
851
|
-
status:
|
|
852
|
-
is_active:
|
|
853
|
-
},
|
|
824
|
+
(o) => {
|
|
825
|
+
u.value = {
|
|
826
|
+
match_type: o?.match_type ?? "exact",
|
|
827
|
+
pattern: o?.pattern ?? "",
|
|
828
|
+
target: o?.target ?? "",
|
|
829
|
+
status: o?.status ?? 301,
|
|
830
|
+
is_active: o?.is_active ?? !0
|
|
831
|
+
}, g.value = {}, p.value = null, D();
|
|
854
832
|
},
|
|
855
833
|
{ immediate: !0 }
|
|
856
834
|
);
|
|
857
|
-
async function
|
|
858
|
-
const
|
|
859
|
-
if (
|
|
860
|
-
|
|
835
|
+
async function D() {
|
|
836
|
+
const o = u.value.pattern.trim();
|
|
837
|
+
if (u.value.match_type !== "exact" || o === "") {
|
|
838
|
+
p.value = null;
|
|
861
839
|
return;
|
|
862
840
|
}
|
|
863
841
|
try {
|
|
864
|
-
|
|
842
|
+
p.value = (await f.test(o)).route;
|
|
865
843
|
} catch {
|
|
866
|
-
|
|
844
|
+
p.value = null;
|
|
867
845
|
}
|
|
868
846
|
}
|
|
869
|
-
function
|
|
870
|
-
return
|
|
847
|
+
function m(o) {
|
|
848
|
+
return g.value[o]?.[0];
|
|
871
849
|
}
|
|
872
|
-
async function
|
|
873
|
-
|
|
850
|
+
async function b() {
|
|
851
|
+
k.value = !0, g.value = {};
|
|
874
852
|
try {
|
|
875
|
-
const
|
|
876
|
-
B.success(s("page.saved")), d(
|
|
877
|
-
} catch (
|
|
878
|
-
const
|
|
879
|
-
|
|
853
|
+
const o = r.redirect ? await f.updateRedirect(r.redirect.id, u.value) : await f.createRedirect(u.value);
|
|
854
|
+
B.success(s("page.saved")), d(o);
|
|
855
|
+
} catch (o) {
|
|
856
|
+
const x = o.body;
|
|
857
|
+
x?.errors ? (g.value = x.errors, B.danger(s("page.failed"))) : B.danger(S(o, s("page.failed")));
|
|
880
858
|
} finally {
|
|
881
|
-
|
|
859
|
+
k.value = !1;
|
|
882
860
|
}
|
|
883
861
|
}
|
|
884
|
-
return (
|
|
862
|
+
return (o, x) => (y(), W(e(de), {
|
|
885
863
|
open: e(a),
|
|
886
|
-
"onUpdate:open":
|
|
864
|
+
"onUpdate:open": x[6] || (x[6] = (v) => P(a) ? a.value = v : null),
|
|
887
865
|
title: e(s)("page.redirect"),
|
|
888
866
|
width: 640
|
|
889
867
|
}, {
|
|
890
868
|
footer: t(() => [
|
|
891
|
-
l(e(
|
|
869
|
+
l(e(X), { size: "sm" }, {
|
|
892
870
|
default: t(() => [
|
|
893
|
-
l(e(
|
|
871
|
+
l(e(I), {
|
|
894
872
|
variant: "outline",
|
|
895
|
-
onClick:
|
|
873
|
+
onClick: x[5] || (x[5] = (v) => e(c)())
|
|
896
874
|
}, {
|
|
897
875
|
default: t(() => [
|
|
898
|
-
|
|
876
|
+
w(h(e(s)("page.cancel")), 1)
|
|
899
877
|
]),
|
|
900
878
|
_: 1
|
|
901
879
|
}),
|
|
902
|
-
l(e(
|
|
880
|
+
l(e(I), {
|
|
903
881
|
type: "primary",
|
|
904
|
-
loading:
|
|
905
|
-
onClick:
|
|
882
|
+
loading: k.value,
|
|
883
|
+
onClick: b
|
|
906
884
|
}, {
|
|
907
885
|
default: t(() => [
|
|
908
|
-
|
|
886
|
+
w(h(V.value ? e(s)("page.save") : e(s)("page.new-redirect")), 1)
|
|
909
887
|
]),
|
|
910
888
|
_: 1
|
|
911
889
|
}, 8, ["loading"])
|
|
@@ -914,75 +892,75 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
914
892
|
})
|
|
915
893
|
]),
|
|
916
894
|
default: t(() => [
|
|
917
|
-
|
|
918
|
-
l(e(
|
|
895
|
+
j("div", ct, [
|
|
896
|
+
l(e(z), {
|
|
919
897
|
label: e(s)("page.kind")
|
|
920
898
|
}, {
|
|
921
899
|
default: t(() => [
|
|
922
900
|
l(e(ae), {
|
|
923
|
-
modelValue:
|
|
924
|
-
"onUpdate:modelValue":
|
|
925
|
-
options:
|
|
926
|
-
onChange:
|
|
901
|
+
modelValue: u.value.match_type,
|
|
902
|
+
"onUpdate:modelValue": x[0] || (x[0] = (v) => u.value.match_type = v),
|
|
903
|
+
options: L.value,
|
|
904
|
+
onChange: D
|
|
927
905
|
}, null, 8, ["modelValue", "options"])
|
|
928
906
|
]),
|
|
929
907
|
_: 1
|
|
930
908
|
}, 8, ["label"]),
|
|
931
|
-
l(e(
|
|
909
|
+
l(e(z), {
|
|
932
910
|
label: e(s)("page.address"),
|
|
933
911
|
help: e(s)("page.address-help"),
|
|
934
|
-
error:
|
|
912
|
+
error: m("pattern")
|
|
935
913
|
}, {
|
|
936
914
|
default: t(() => [
|
|
937
|
-
l(e(
|
|
938
|
-
modelValue:
|
|
939
|
-
"onUpdate:modelValue":
|
|
915
|
+
l(e(N), {
|
|
916
|
+
modelValue: u.value.pattern,
|
|
917
|
+
"onUpdate:modelValue": x[1] || (x[1] = (v) => u.value.pattern = v),
|
|
940
918
|
placeholder: "/old-address",
|
|
941
|
-
onBlur:
|
|
919
|
+
onBlur: D
|
|
942
920
|
}, null, 8, ["modelValue"])
|
|
943
921
|
]),
|
|
944
922
|
_: 1
|
|
945
923
|
}, 8, ["label", "help", "error"]),
|
|
946
|
-
|
|
924
|
+
p.value ? (y(), W(e(Y), {
|
|
947
925
|
key: 0,
|
|
948
926
|
type: "warning",
|
|
949
927
|
variant: "soft",
|
|
950
|
-
description:
|
|
951
|
-
}, null, 8, ["description"])) :
|
|
952
|
-
l(e(
|
|
928
|
+
description: p.value.kind === "alias" ? e(s)("page.occupied-alias", { target: p.value.target ?? p.value.path }) : e(s)("page.occupied", { path: p.value.path })
|
|
929
|
+
}, null, 8, ["description"])) : O("", !0),
|
|
930
|
+
l(e(z), {
|
|
953
931
|
label: e(s)("page.target"),
|
|
954
932
|
help: e(s)("page.target-help"),
|
|
955
|
-
error:
|
|
933
|
+
error: m("target")
|
|
956
934
|
}, {
|
|
957
935
|
default: t(() => [
|
|
958
|
-
l(e(
|
|
959
|
-
modelValue:
|
|
960
|
-
"onUpdate:modelValue":
|
|
936
|
+
l(e(N), {
|
|
937
|
+
modelValue: u.value.target,
|
|
938
|
+
"onUpdate:modelValue": x[2] || (x[2] = (v) => u.value.target = v),
|
|
961
939
|
placeholder: "/new-address"
|
|
962
940
|
}, null, 8, ["modelValue"])
|
|
963
941
|
]),
|
|
964
942
|
_: 1
|
|
965
943
|
}, 8, ["label", "help", "error"]),
|
|
966
|
-
|
|
967
|
-
l(e(
|
|
944
|
+
j("div", pt, [
|
|
945
|
+
l(e(z), {
|
|
968
946
|
label: e(s)("page.status")
|
|
969
947
|
}, {
|
|
970
948
|
default: t(() => [
|
|
971
949
|
l(e(ae), {
|
|
972
|
-
modelValue:
|
|
973
|
-
"onUpdate:modelValue":
|
|
974
|
-
options:
|
|
950
|
+
modelValue: u.value.status,
|
|
951
|
+
"onUpdate:modelValue": x[3] || (x[3] = (v) => u.value.status = v),
|
|
952
|
+
options: A
|
|
975
953
|
}, null, 8, ["modelValue"])
|
|
976
954
|
]),
|
|
977
955
|
_: 1
|
|
978
956
|
}, 8, ["label"]),
|
|
979
|
-
l(e(
|
|
957
|
+
l(e(z), {
|
|
980
958
|
label: e(s)("page.state")
|
|
981
959
|
}, {
|
|
982
960
|
default: t(() => [
|
|
983
961
|
l(e(we), {
|
|
984
|
-
modelValue:
|
|
985
|
-
"onUpdate:modelValue":
|
|
962
|
+
modelValue: u.value.is_active,
|
|
963
|
+
"onUpdate:modelValue": x[4] || (x[4] = (v) => u.value.is_active = v)
|
|
986
964
|
}, null, 8, ["modelValue"])
|
|
987
965
|
]),
|
|
988
966
|
_: 1
|
|
@@ -993,17 +971,17 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
993
971
|
_: 1
|
|
994
972
|
}, 8, ["open", "title"]));
|
|
995
973
|
}
|
|
996
|
-
}),
|
|
974
|
+
}), gt = /* @__PURE__ */ Q(vt, [["__scopeId", "data-v-685edbd5"]]), mt = /* @__PURE__ */ E({
|
|
997
975
|
__name: "SeoRedirectsPage",
|
|
998
976
|
props: {
|
|
999
977
|
base: { default: "/seo" }
|
|
1000
978
|
},
|
|
1001
|
-
setup(
|
|
1002
|
-
const r =
|
|
1003
|
-
|
|
1004
|
-
const a =
|
|
1005
|
-
let
|
|
1006
|
-
const
|
|
979
|
+
setup(n) {
|
|
980
|
+
const r = n, d = K(), c = G(d);
|
|
981
|
+
q();
|
|
982
|
+
const a = J("webx-seo"), i = le(), f = C(null), s = C(!1);
|
|
983
|
+
let S = { page: 1, perPage: 20, sort: null, search: "" };
|
|
984
|
+
const k = d.can("seo.manage"), g = Z(gt), p = Z(ce), u = U(() => [
|
|
1007
985
|
{ key: "pattern", label: a("page.address"), sortable: !0 },
|
|
1008
986
|
{ key: "target", label: a("page.target") },
|
|
1009
987
|
{ key: "status", label: a("page.status"), align: "center", hideBelow: 560 },
|
|
@@ -1016,180 +994,152 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
1016
994
|
hideOnCards: !0
|
|
1017
995
|
},
|
|
1018
996
|
{ key: "is_active", label: a("page.state"), align: "center", hideBelow: 660 },
|
|
1019
|
-
{
|
|
1020
|
-
key: "actions",
|
|
1021
|
-
label: "",
|
|
1022
|
-
width: 56,
|
|
1023
|
-
align: "right",
|
|
1024
|
-
hidden: !w,
|
|
1025
|
-
hideOnCards: !0
|
|
1026
|
-
}
|
|
997
|
+
{ key: "actions", label: "", width: 56, align: "right", hidden: !k, hideOnCards: !0 }
|
|
1027
998
|
]);
|
|
1028
|
-
|
|
1029
|
-
|
|
999
|
+
function V(m) {
|
|
1000
|
+
return [
|
|
1001
|
+
{
|
|
1002
|
+
key: "delete",
|
|
1003
|
+
icon: "trash",
|
|
1004
|
+
label: a("page.delete"),
|
|
1005
|
+
danger: !0,
|
|
1006
|
+
run: () => D(m)
|
|
1007
|
+
}
|
|
1008
|
+
];
|
|
1009
|
+
}
|
|
1010
|
+
async function L(m) {
|
|
1011
|
+
S = m, s.value = !0;
|
|
1030
1012
|
try {
|
|
1031
|
-
|
|
1032
|
-
q:
|
|
1033
|
-
sort:
|
|
1034
|
-
page:
|
|
1035
|
-
per_page:
|
|
1013
|
+
f.value = await c.redirects({
|
|
1014
|
+
q: m.search,
|
|
1015
|
+
sort: m.sort ? `${m.sort.order === "desc" ? "-" : ""}${m.sort.key}` : "-hits",
|
|
1016
|
+
page: m.page,
|
|
1017
|
+
per_page: m.perPage
|
|
1036
1018
|
});
|
|
1037
1019
|
} finally {
|
|
1038
|
-
|
|
1020
|
+
s.value = !1;
|
|
1039
1021
|
}
|
|
1040
1022
|
}
|
|
1041
|
-
async function
|
|
1042
|
-
await
|
|
1023
|
+
async function A(m) {
|
|
1024
|
+
await g({ redirect: m }) && L(S);
|
|
1043
1025
|
}
|
|
1044
|
-
async function
|
|
1026
|
+
async function D(m) {
|
|
1045
1027
|
if (await ke({
|
|
1046
|
-
title: a("page.delete-title", { pattern:
|
|
1028
|
+
title: a("page.delete-title", { pattern: m.pattern }),
|
|
1047
1029
|
message: a("page.delete-text"),
|
|
1048
1030
|
confirmText: a("page.delete"),
|
|
1049
1031
|
cancelText: a("page.cancel"),
|
|
1050
1032
|
tone: "danger"
|
|
1051
1033
|
}))
|
|
1052
1034
|
try {
|
|
1053
|
-
await c.removeRedirect(
|
|
1054
|
-
} catch (
|
|
1055
|
-
B.danger(i
|
|
1035
|
+
await c.removeRedirect(m.id), B.success(a("page.deleted")), L(S);
|
|
1036
|
+
} catch (o) {
|
|
1037
|
+
B.danger(i(o));
|
|
1056
1038
|
}
|
|
1057
1039
|
}
|
|
1058
|
-
return (
|
|
1040
|
+
return (m, b) => (y(), W(ue, {
|
|
1059
1041
|
base: r.base,
|
|
1060
1042
|
current: "redirects",
|
|
1061
|
-
onTest:
|
|
1062
|
-
}, {
|
|
1043
|
+
onTest: b[1] || (b[1] = (o) => e(p)({}))
|
|
1044
|
+
}, ye({
|
|
1063
1045
|
default: t(() => [
|
|
1064
|
-
l(e(
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1046
|
+
l(e(re), {
|
|
1047
|
+
data: f.value,
|
|
1048
|
+
columns: u.value,
|
|
1049
|
+
"row-key": "id",
|
|
1050
|
+
searchable: "",
|
|
1051
|
+
clickable: e(k),
|
|
1052
|
+
hover: e(k),
|
|
1053
|
+
flush: "",
|
|
1054
|
+
loading: s.value,
|
|
1055
|
+
"search-placeholder": e(a)("page.search-redirects"),
|
|
1056
|
+
"empty-text": e(a)("page.empty"),
|
|
1057
|
+
onRowClick: A,
|
|
1058
|
+
onStateChange: L
|
|
1059
|
+
}, {
|
|
1060
|
+
"cell-pattern": t(({ row: o }) => [
|
|
1061
|
+
l(e(R), {
|
|
1062
|
+
mono: "",
|
|
1063
|
+
size: "sm"
|
|
1081
1064
|
}, {
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
mono: "",
|
|
1085
|
-
size: "sm"
|
|
1086
|
-
}, {
|
|
1087
|
-
default: t(() => [
|
|
1088
|
-
f(m(i.pattern), 1)
|
|
1089
|
-
]),
|
|
1090
|
-
_: 2
|
|
1091
|
-
}, 1024),
|
|
1092
|
-
i.is_loop ? (x(), U(e(F), {
|
|
1093
|
-
key: 0,
|
|
1094
|
-
type: "warning"
|
|
1095
|
-
}, {
|
|
1096
|
-
default: t(() => [
|
|
1097
|
-
f(m(e(a)("page.loop")), 1)
|
|
1098
|
-
]),
|
|
1099
|
-
_: 1
|
|
1100
|
-
})) : R("", !0)
|
|
1101
|
-
]),
|
|
1102
|
-
"cell-target": t(({ row: i }) => [
|
|
1103
|
-
l(e(L), {
|
|
1104
|
-
mono: "",
|
|
1105
|
-
size: "sm"
|
|
1106
|
-
}, {
|
|
1107
|
-
default: t(() => [
|
|
1108
|
-
f(m(i.target), 1)
|
|
1109
|
-
]),
|
|
1110
|
-
_: 2
|
|
1111
|
-
}, 1024)
|
|
1112
|
-
]),
|
|
1113
|
-
"cell-last_hit_at": t(({ row: i }) => [
|
|
1114
|
-
l(e(L), {
|
|
1115
|
-
size: "sm",
|
|
1116
|
-
tone: i.last_hit_at ? "default" : "muted"
|
|
1117
|
-
}, {
|
|
1118
|
-
default: t(() => [
|
|
1119
|
-
f(m(i.last_hit_at ? new Date(i.last_hit_at).toLocaleString() : e(a)("page.never")), 1)
|
|
1120
|
-
]),
|
|
1121
|
-
_: 2
|
|
1122
|
-
}, 1032, ["tone"])
|
|
1065
|
+
default: t(() => [
|
|
1066
|
+
w(h(o.pattern), 1)
|
|
1123
1067
|
]),
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
_: 2
|
|
1133
|
-
}, 1032, ["type"])
|
|
1068
|
+
_: 2
|
|
1069
|
+
}, 1024),
|
|
1070
|
+
o.is_loop ? (y(), W(e(M), {
|
|
1071
|
+
key: 0,
|
|
1072
|
+
type: "warning"
|
|
1073
|
+
}, {
|
|
1074
|
+
default: t(() => [
|
|
1075
|
+
w(h(e(a)("page.loop")), 1)
|
|
1134
1076
|
]),
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
title: e(a)("page.delete"),
|
|
1146
|
-
onClick: (u) => O(i)
|
|
1147
|
-
}, null, 8, ["title", "onClick"])
|
|
1148
|
-
]),
|
|
1149
|
-
_: 2
|
|
1150
|
-
}, 1024)) : R("", !0)
|
|
1077
|
+
_: 1
|
|
1078
|
+
})) : O("", !0)
|
|
1079
|
+
]),
|
|
1080
|
+
"cell-target": t(({ row: o }) => [
|
|
1081
|
+
l(e(R), {
|
|
1082
|
+
mono: "",
|
|
1083
|
+
size: "sm"
|
|
1084
|
+
}, {
|
|
1085
|
+
default: t(() => [
|
|
1086
|
+
w(h(o.target), 1)
|
|
1151
1087
|
]),
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1088
|
+
_: 2
|
|
1089
|
+
}, 1024)
|
|
1090
|
+
]),
|
|
1091
|
+
"cell-last_hit_at": t(({ row: o }) => [
|
|
1092
|
+
l(e(_e), {
|
|
1093
|
+
value: o.last_hit_at,
|
|
1094
|
+
tone: o.last_hit_at ? "default" : "muted"
|
|
1095
|
+
}, null, 8, ["value", "tone"])
|
|
1096
|
+
]),
|
|
1097
|
+
"cell-is_active": t(({ row: o }) => [
|
|
1098
|
+
l(e(M), {
|
|
1099
|
+
type: o.is_active ? "success" : "default",
|
|
1100
|
+
dot: ""
|
|
1101
|
+
}, {
|
|
1102
|
+
default: t(() => [
|
|
1103
|
+
w(h(o.is_active ? e(a)("page.active") : e(a)("page.inactive")), 1)
|
|
1167
1104
|
]),
|
|
1168
|
-
_:
|
|
1169
|
-
},
|
|
1105
|
+
_: 2
|
|
1106
|
+
}, 1032, ["type"])
|
|
1170
1107
|
]),
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
]),
|
|
1187
|
-
key: "0"
|
|
1188
|
-
} : void 0
|
|
1189
|
-
]), 1024)
|
|
1108
|
+
"card-actions": t(({ row: o }) => [
|
|
1109
|
+
e(k) ? (y(), W(e(te), {
|
|
1110
|
+
key: 0,
|
|
1111
|
+
actions: V(o),
|
|
1112
|
+
label: o.pattern
|
|
1113
|
+
}, null, 8, ["actions", "label"])) : O("", !0)
|
|
1114
|
+
]),
|
|
1115
|
+
"cell-actions": t(({ row: o }) => [
|
|
1116
|
+
l(e(te), {
|
|
1117
|
+
actions: V(o),
|
|
1118
|
+
label: o.pattern
|
|
1119
|
+
}, null, 8, ["actions", "label"])
|
|
1120
|
+
]),
|
|
1121
|
+
_: 1
|
|
1122
|
+
}, 8, ["data", "columns", "clickable", "hover", "loading", "search-placeholder", "empty-text"])
|
|
1190
1123
|
]),
|
|
1191
|
-
_:
|
|
1192
|
-
},
|
|
1124
|
+
_: 2
|
|
1125
|
+
}, [
|
|
1126
|
+
e(k) ? {
|
|
1127
|
+
name: "actions",
|
|
1128
|
+
fn: t(() => [
|
|
1129
|
+
l(e(I), {
|
|
1130
|
+
type: "primary",
|
|
1131
|
+
icon: "add",
|
|
1132
|
+
onClick: b[0] || (b[0] = (o) => A(null))
|
|
1133
|
+
}, {
|
|
1134
|
+
default: t(() => [
|
|
1135
|
+
w(h(e(a)("page.new-redirect")), 1)
|
|
1136
|
+
]),
|
|
1137
|
+
_: 1
|
|
1138
|
+
})
|
|
1139
|
+
]),
|
|
1140
|
+
key: "0"
|
|
1141
|
+
} : void 0
|
|
1142
|
+
]), 1032, ["base"]));
|
|
1193
1143
|
}
|
|
1194
1144
|
}), $e = [
|
|
1195
1145
|
"title",
|
|
@@ -1203,96 +1153,96 @@ const Xe = { class: "wx-seo-test" }, Ye = {
|
|
|
1203
1153
|
"robots",
|
|
1204
1154
|
"json_ld"
|
|
1205
1155
|
];
|
|
1206
|
-
function
|
|
1207
|
-
return xe(
|
|
1156
|
+
function fe(n, r) {
|
|
1157
|
+
return xe(n.title, r);
|
|
1208
1158
|
}
|
|
1209
|
-
function
|
|
1210
|
-
if (!
|
|
1159
|
+
function ht(n) {
|
|
1160
|
+
if (!n) return {};
|
|
1211
1161
|
const r = {};
|
|
1212
1162
|
for (const d of $e) {
|
|
1213
|
-
const c =
|
|
1163
|
+
const c = n[d];
|
|
1214
1164
|
c != null && Object.assign(r, { [d]: c });
|
|
1215
1165
|
}
|
|
1216
1166
|
return r;
|
|
1217
1167
|
}
|
|
1218
|
-
function
|
|
1219
|
-
const d = { ...
|
|
1168
|
+
function ft(n, r) {
|
|
1169
|
+
const d = { ...n };
|
|
1220
1170
|
for (const c of $e)
|
|
1221
1171
|
Object.assign(d, { [c]: r[c] ?? null });
|
|
1222
1172
|
return d;
|
|
1223
1173
|
}
|
|
1224
|
-
const
|
|
1174
|
+
const bt = { class: "wx-seo-rule" }, yt = { class: "wx-seo-rule__where" }, _t = /* @__PURE__ */ E({
|
|
1225
1175
|
__name: "SeoUrlDialog",
|
|
1226
1176
|
props: {
|
|
1227
1177
|
rule: { default: null },
|
|
1228
1178
|
mediaField: { default: void 0 }
|
|
1229
1179
|
},
|
|
1230
|
-
setup(
|
|
1231
|
-
const r =
|
|
1232
|
-
|
|
1233
|
-
const s =
|
|
1180
|
+
setup(n) {
|
|
1181
|
+
const r = n, { resolve: d, dismiss: c, open: a } = ie(), i = K(), f = G(i);
|
|
1182
|
+
q();
|
|
1183
|
+
const s = J("webx-seo"), S = le(), k = C(!1), g = C({}), p = C({
|
|
1234
1184
|
match_type: "exact",
|
|
1235
1185
|
pattern: "",
|
|
1236
1186
|
priority: 0,
|
|
1237
1187
|
is_active: !0
|
|
1238
|
-
}),
|
|
1188
|
+
}), u = C({}), V = U(() => r.rule !== null), L = U(() => [
|
|
1239
1189
|
{ value: "exact", label: s("page.exact") },
|
|
1240
1190
|
{ value: "mask", label: s("page.mask") },
|
|
1241
1191
|
{ value: "regex", label: s("page.regex") }
|
|
1242
1192
|
]);
|
|
1243
|
-
|
|
1193
|
+
be(
|
|
1244
1194
|
() => r.rule,
|
|
1245
|
-
(
|
|
1246
|
-
|
|
1247
|
-
match_type:
|
|
1248
|
-
pattern:
|
|
1249
|
-
priority:
|
|
1250
|
-
is_active:
|
|
1251
|
-
},
|
|
1195
|
+
(m) => {
|
|
1196
|
+
p.value = {
|
|
1197
|
+
match_type: m?.match_type ?? "exact",
|
|
1198
|
+
pattern: m?.pattern ?? "",
|
|
1199
|
+
priority: m?.priority ?? 0,
|
|
1200
|
+
is_active: m?.is_active ?? !0
|
|
1201
|
+
}, u.value = ht(m), g.value = {};
|
|
1252
1202
|
},
|
|
1253
1203
|
{ immediate: !0 }
|
|
1254
1204
|
);
|
|
1255
|
-
function
|
|
1256
|
-
return
|
|
1205
|
+
function A(m) {
|
|
1206
|
+
return g.value[m]?.[0];
|
|
1257
1207
|
}
|
|
1258
|
-
async function
|
|
1259
|
-
|
|
1260
|
-
const
|
|
1208
|
+
async function D() {
|
|
1209
|
+
k.value = !0, g.value = {};
|
|
1210
|
+
const m = ft(p.value, u.value);
|
|
1261
1211
|
try {
|
|
1262
|
-
const
|
|
1263
|
-
B.success(s("page.saved")), d(
|
|
1264
|
-
} catch (
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1212
|
+
const b = r.rule ? await f.updateUrl(r.rule.id, m) : await f.createUrl(m);
|
|
1213
|
+
B.success(s("page.saved")), d(b);
|
|
1214
|
+
} catch (b) {
|
|
1215
|
+
const o = b.body;
|
|
1216
|
+
o?.errors ? (g.value = o.errors, B.danger(s("page.failed"))) : B.danger(S(b, s("page.failed")));
|
|
1267
1217
|
} finally {
|
|
1268
|
-
|
|
1218
|
+
k.value = !1;
|
|
1269
1219
|
}
|
|
1270
1220
|
}
|
|
1271
|
-
return (
|
|
1221
|
+
return (m, b) => (y(), W(e(de), {
|
|
1272
1222
|
open: e(a),
|
|
1273
|
-
"onUpdate:open":
|
|
1223
|
+
"onUpdate:open": b[6] || (b[6] = (o) => P(a) ? a.value = o : null),
|
|
1274
1224
|
title: e(s)("page.rule"),
|
|
1275
1225
|
width: 860
|
|
1276
1226
|
}, {
|
|
1277
1227
|
footer: t(() => [
|
|
1278
|
-
l(e(
|
|
1228
|
+
l(e(X), { size: "sm" }, {
|
|
1279
1229
|
default: t(() => [
|
|
1280
|
-
l(e(
|
|
1230
|
+
l(e(I), {
|
|
1281
1231
|
variant: "outline",
|
|
1282
|
-
onClick:
|
|
1232
|
+
onClick: b[5] || (b[5] = (o) => e(c)())
|
|
1283
1233
|
}, {
|
|
1284
1234
|
default: t(() => [
|
|
1285
|
-
|
|
1235
|
+
w(h(e(s)("page.cancel")), 1)
|
|
1286
1236
|
]),
|
|
1287
1237
|
_: 1
|
|
1288
1238
|
}),
|
|
1289
|
-
l(e(
|
|
1239
|
+
l(e(I), {
|
|
1290
1240
|
type: "primary",
|
|
1291
|
-
loading:
|
|
1292
|
-
onClick:
|
|
1241
|
+
loading: k.value,
|
|
1242
|
+
onClick: D
|
|
1293
1243
|
}, {
|
|
1294
1244
|
default: t(() => [
|
|
1295
|
-
|
|
1245
|
+
w(h(V.value ? e(s)("page.save") : e(s)("page.new-rule")), 1)
|
|
1296
1246
|
]),
|
|
1297
1247
|
_: 1
|
|
1298
1248
|
}, 8, ["loading"])
|
|
@@ -1301,63 +1251,63 @@ const kt = { class: "wx-seo-rule" }, Vt = { class: "wx-seo-rule__where" }, $t =
|
|
|
1301
1251
|
})
|
|
1302
1252
|
]),
|
|
1303
1253
|
default: t(() => [
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
l(e(
|
|
1254
|
+
j("div", bt, [
|
|
1255
|
+
j("div", yt, [
|
|
1256
|
+
l(e(z), {
|
|
1307
1257
|
label: e(s)("page.kind")
|
|
1308
1258
|
}, {
|
|
1309
1259
|
default: t(() => [
|
|
1310
1260
|
l(e(ae), {
|
|
1311
|
-
modelValue:
|
|
1312
|
-
"onUpdate:modelValue":
|
|
1313
|
-
options:
|
|
1261
|
+
modelValue: p.value.match_type,
|
|
1262
|
+
"onUpdate:modelValue": b[0] || (b[0] = (o) => p.value.match_type = o),
|
|
1263
|
+
options: L.value
|
|
1314
1264
|
}, null, 8, ["modelValue", "options"])
|
|
1315
1265
|
]),
|
|
1316
1266
|
_: 1
|
|
1317
1267
|
}, 8, ["label"]),
|
|
1318
|
-
l(e(
|
|
1268
|
+
l(e(z), {
|
|
1319
1269
|
label: e(s)("page.address"),
|
|
1320
1270
|
help: e(s)("page.address-help"),
|
|
1321
|
-
error:
|
|
1271
|
+
error: A("pattern"),
|
|
1322
1272
|
class: "wx-seo-rule__address"
|
|
1323
1273
|
}, {
|
|
1324
1274
|
default: t(() => [
|
|
1325
|
-
l(e(
|
|
1326
|
-
modelValue:
|
|
1327
|
-
"onUpdate:modelValue":
|
|
1275
|
+
l(e(N), {
|
|
1276
|
+
modelValue: p.value.pattern,
|
|
1277
|
+
"onUpdate:modelValue": b[1] || (b[1] = (o) => p.value.pattern = o),
|
|
1328
1278
|
placeholder: "/catalog/shoes"
|
|
1329
1279
|
}, null, 8, ["modelValue"])
|
|
1330
1280
|
]),
|
|
1331
1281
|
_: 1
|
|
1332
1282
|
}, 8, ["label", "help", "error"]),
|
|
1333
|
-
l(e(
|
|
1283
|
+
l(e(z), {
|
|
1334
1284
|
label: e(s)("page.priority"),
|
|
1335
1285
|
help: e(s)("page.priority-help")
|
|
1336
1286
|
}, {
|
|
1337
1287
|
default: t(() => [
|
|
1338
|
-
l(e(
|
|
1339
|
-
modelValue:
|
|
1340
|
-
"onUpdate:modelValue":
|
|
1288
|
+
l(e(Ie), {
|
|
1289
|
+
modelValue: p.value.priority,
|
|
1290
|
+
"onUpdate:modelValue": b[2] || (b[2] = (o) => p.value.priority = o),
|
|
1341
1291
|
step: 10
|
|
1342
1292
|
}, null, 8, ["modelValue"])
|
|
1343
1293
|
]),
|
|
1344
1294
|
_: 1
|
|
1345
1295
|
}, 8, ["label", "help"]),
|
|
1346
|
-
l(e(
|
|
1296
|
+
l(e(z), {
|
|
1347
1297
|
label: e(s)("page.state")
|
|
1348
1298
|
}, {
|
|
1349
1299
|
default: t(() => [
|
|
1350
1300
|
l(e(we), {
|
|
1351
|
-
modelValue:
|
|
1352
|
-
"onUpdate:modelValue":
|
|
1301
|
+
modelValue: p.value.is_active,
|
|
1302
|
+
"onUpdate:modelValue": b[3] || (b[3] = (o) => p.value.is_active = o)
|
|
1353
1303
|
}, null, 8, ["modelValue"])
|
|
1354
1304
|
]),
|
|
1355
1305
|
_: 1
|
|
1356
1306
|
}, 8, ["label"])
|
|
1357
1307
|
]),
|
|
1358
1308
|
l(Ve, {
|
|
1359
|
-
modelValue:
|
|
1360
|
-
"onUpdate:modelValue":
|
|
1309
|
+
modelValue: u.value,
|
|
1310
|
+
"onUpdate:modelValue": b[4] || (b[4] = (o) => u.value = o),
|
|
1361
1311
|
"media-field": r.mediaField
|
|
1362
1312
|
}, null, 8, ["modelValue", "media-field"])
|
|
1363
1313
|
])
|
|
@@ -1365,213 +1315,190 @@ const kt = { class: "wx-seo-rule" }, Vt = { class: "wx-seo-rule__where" }, $t =
|
|
|
1365
1315
|
_: 1
|
|
1366
1316
|
}, 8, ["open", "title"]));
|
|
1367
1317
|
}
|
|
1368
|
-
}),
|
|
1318
|
+
}), xt = /* @__PURE__ */ Q(_t, [["__scopeId", "data-v-fa975d05"]]), wt = /* @__PURE__ */ E({
|
|
1369
1319
|
__name: "SeoUrlsPage",
|
|
1370
1320
|
props: {
|
|
1371
1321
|
base: { default: "/seo" },
|
|
1372
1322
|
mediaField: { default: void 0 }
|
|
1373
1323
|
},
|
|
1374
|
-
setup(
|
|
1375
|
-
const r =
|
|
1376
|
-
|
|
1377
|
-
const a =
|
|
1378
|
-
let
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1381
|
-
),
|
|
1324
|
+
setup(n) {
|
|
1325
|
+
const r = n, d = K(), c = G(d);
|
|
1326
|
+
q();
|
|
1327
|
+
const a = J("webx-seo"), i = le(), f = C(null), s = C(!1), S = C("any");
|
|
1328
|
+
let k = { page: 1, perPage: 20, sort: null, search: "" };
|
|
1329
|
+
const g = d.can("seo.manage"), p = Z(
|
|
1330
|
+
xt
|
|
1331
|
+
), u = Z(ce), V = U(() => [
|
|
1382
1332
|
{ value: "any", label: a("page.any-kind") },
|
|
1383
1333
|
{ value: "exact", label: a("page.exact") },
|
|
1384
1334
|
{ value: "mask", label: a("page.mask") },
|
|
1385
1335
|
{ value: "regex", label: a("page.regex") }
|
|
1386
|
-
]),
|
|
1336
|
+
]), L = U(() => [
|
|
1387
1337
|
{ key: "pattern", label: a("page.address") },
|
|
1388
1338
|
{ key: "match_type", label: a("page.kind"), hideBelow: 560 },
|
|
1389
1339
|
{ key: "title", label: a("page.title"), hideBelow: 900 },
|
|
1390
1340
|
{ key: "priority", label: a("page.priority"), align: "center", hideBelow: 760 },
|
|
1391
1341
|
{ key: "is_active", label: a("page.state"), align: "center", hideBelow: 660 },
|
|
1392
|
-
{
|
|
1393
|
-
key: "actions",
|
|
1394
|
-
label: "",
|
|
1395
|
-
width: 56,
|
|
1396
|
-
align: "right",
|
|
1397
|
-
hidden: !V,
|
|
1398
|
-
hideOnCards: !0
|
|
1399
|
-
}
|
|
1342
|
+
{ key: "actions", label: "", width: 56, align: "right", hidden: !g, hideOnCards: !0 }
|
|
1400
1343
|
]);
|
|
1401
|
-
|
|
1402
|
-
|
|
1344
|
+
function A(o) {
|
|
1345
|
+
return [
|
|
1346
|
+
{
|
|
1347
|
+
key: "delete",
|
|
1348
|
+
icon: "trash",
|
|
1349
|
+
label: a("page.delete"),
|
|
1350
|
+
danger: !0,
|
|
1351
|
+
run: () => b(o)
|
|
1352
|
+
}
|
|
1353
|
+
];
|
|
1354
|
+
}
|
|
1355
|
+
async function D(o) {
|
|
1356
|
+
k = o, s.value = !0;
|
|
1403
1357
|
try {
|
|
1404
|
-
|
|
1405
|
-
q:
|
|
1406
|
-
match_type:
|
|
1407
|
-
page:
|
|
1408
|
-
per_page:
|
|
1358
|
+
f.value = await c.urls({
|
|
1359
|
+
q: o.search,
|
|
1360
|
+
match_type: S.value === "any" ? null : S.value,
|
|
1361
|
+
page: o.page,
|
|
1362
|
+
per_page: o.perPage
|
|
1409
1363
|
});
|
|
1410
1364
|
} finally {
|
|
1411
|
-
|
|
1365
|
+
s.value = !1;
|
|
1412
1366
|
}
|
|
1413
1367
|
}
|
|
1414
|
-
async function
|
|
1415
|
-
await
|
|
1368
|
+
async function m(o) {
|
|
1369
|
+
await p({ rule: o, mediaField: r.mediaField }) && D(k);
|
|
1416
1370
|
}
|
|
1417
|
-
async function
|
|
1371
|
+
async function b(o) {
|
|
1418
1372
|
if (await ke({
|
|
1419
|
-
title: a("page.delete-title", { pattern:
|
|
1373
|
+
title: a("page.delete-title", { pattern: o.pattern }),
|
|
1420
1374
|
message: a("page.delete-text"),
|
|
1421
1375
|
confirmText: a("page.delete"),
|
|
1422
1376
|
cancelText: a("page.cancel"),
|
|
1423
1377
|
tone: "danger"
|
|
1424
1378
|
}))
|
|
1425
1379
|
try {
|
|
1426
|
-
await c.removeUrl(
|
|
1427
|
-
} catch (
|
|
1428
|
-
B.danger(
|
|
1380
|
+
await c.removeUrl(o.id), B.success(a("page.deleted")), D(k);
|
|
1381
|
+
} catch (v) {
|
|
1382
|
+
B.danger(i(v));
|
|
1429
1383
|
}
|
|
1430
1384
|
}
|
|
1431
|
-
return (
|
|
1385
|
+
return (o, x) => (y(), W(ue, {
|
|
1432
1386
|
base: r.base,
|
|
1433
1387
|
current: "rules",
|
|
1434
|
-
onTest:
|
|
1435
|
-
}, {
|
|
1388
|
+
onTest: x[2] || (x[2] = (v) => e(u)({}))
|
|
1389
|
+
}, ye({
|
|
1436
1390
|
default: t(() => [
|
|
1437
|
-
l(e(
|
|
1438
|
-
|
|
1439
|
-
|
|
1391
|
+
l(e(re), {
|
|
1392
|
+
data: f.value,
|
|
1393
|
+
columns: L.value,
|
|
1394
|
+
"row-key": "id",
|
|
1395
|
+
searchable: "",
|
|
1396
|
+
clickable: e(g),
|
|
1397
|
+
hover: e(g),
|
|
1398
|
+
flush: "",
|
|
1399
|
+
loading: s.value,
|
|
1400
|
+
"search-placeholder": e(a)("page.search-rules"),
|
|
1401
|
+
"empty-text": e(a)("page.empty"),
|
|
1402
|
+
onRowClick: m,
|
|
1403
|
+
onStateChange: D
|
|
1404
|
+
}, {
|
|
1405
|
+
actions: t(() => [
|
|
1406
|
+
l(e(ae), {
|
|
1407
|
+
modelValue: S.value,
|
|
1408
|
+
"onUpdate:modelValue": x[1] || (x[1] = (v) => S.value = v),
|
|
1409
|
+
options: V.value,
|
|
1410
|
+
class: "wx-seo-urls__kind"
|
|
1411
|
+
}, null, 8, ["modelValue", "options"])
|
|
1440
1412
|
]),
|
|
1441
|
-
|
|
1442
|
-
l(e(
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
"row-key": "id",
|
|
1446
|
-
searchable: "",
|
|
1447
|
-
hover: "",
|
|
1448
|
-
flush: "",
|
|
1449
|
-
loading: h.value,
|
|
1450
|
-
"search-placeholder": e(a)("page.search-rules"),
|
|
1451
|
-
"empty-text": e(a)("page.empty"),
|
|
1452
|
-
onStateChange: O,
|
|
1453
|
-
onRowClick: u[4] || (u[4] = (g) => e(V) ? S(g) : void 0)
|
|
1413
|
+
"cell-pattern": t(({ row: v }) => [
|
|
1414
|
+
l(e(R), {
|
|
1415
|
+
mono: "",
|
|
1416
|
+
size: "sm"
|
|
1454
1417
|
}, {
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
modelValue: s.value,
|
|
1458
|
-
"onUpdate:modelValue": u[1] || (u[1] = (g) => s.value = g),
|
|
1459
|
-
options: b.value,
|
|
1460
|
-
class: "wx-seo-urls__kind"
|
|
1461
|
-
}, null, 8, ["modelValue", "options"])
|
|
1462
|
-
]),
|
|
1463
|
-
"cell-pattern": t(({ row: g }) => [
|
|
1464
|
-
l(e(L), {
|
|
1465
|
-
mono: "",
|
|
1466
|
-
size: "sm"
|
|
1467
|
-
}, {
|
|
1468
|
-
default: t(() => [
|
|
1469
|
-
f(m(g.pattern), 1)
|
|
1470
|
-
]),
|
|
1471
|
-
_: 2
|
|
1472
|
-
}, 1024)
|
|
1473
|
-
]),
|
|
1474
|
-
"cell-match_type": t(({ row: g }) => [
|
|
1475
|
-
l(e(F), null, {
|
|
1476
|
-
default: t(() => [
|
|
1477
|
-
f(m(e(a)(`page.${g.match_type}`)), 1)
|
|
1478
|
-
]),
|
|
1479
|
-
_: 2
|
|
1480
|
-
}, 1024)
|
|
1481
|
-
]),
|
|
1482
|
-
"cell-title": t(({ row: g }) => [
|
|
1483
|
-
e(be)(g) ? (x(), U(e(L), {
|
|
1484
|
-
key: 0,
|
|
1485
|
-
size: "sm"
|
|
1486
|
-
}, {
|
|
1487
|
-
default: t(() => [
|
|
1488
|
-
f(m(e(be)(g)), 1)
|
|
1489
|
-
]),
|
|
1490
|
-
_: 2
|
|
1491
|
-
}, 1024)) : (x(), U(e(L), {
|
|
1492
|
-
key: 1,
|
|
1493
|
-
size: "sm",
|
|
1494
|
-
tone: "muted"
|
|
1495
|
-
}, {
|
|
1496
|
-
default: t(() => [...u[6] || (u[6] = [
|
|
1497
|
-
f("—", -1)
|
|
1498
|
-
])]),
|
|
1499
|
-
_: 1
|
|
1500
|
-
}))
|
|
1501
|
-
]),
|
|
1502
|
-
"cell-is_active": t(({ row: g }) => [
|
|
1503
|
-
l(e(F), {
|
|
1504
|
-
type: g.is_active ? "success" : "default",
|
|
1505
|
-
dot: ""
|
|
1506
|
-
}, {
|
|
1507
|
-
default: t(() => [
|
|
1508
|
-
f(m(g.is_active ? e(a)("page.active") : e(a)("page.inactive")), 1)
|
|
1509
|
-
]),
|
|
1510
|
-
_: 2
|
|
1511
|
-
}, 1032, ["type"])
|
|
1418
|
+
default: t(() => [
|
|
1419
|
+
w(h(v.pattern), 1)
|
|
1512
1420
|
]),
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
},
|
|
1520
|
-
default: t(() => [
|
|
1521
|
-
l(e(se), {
|
|
1522
|
-
type: "remove",
|
|
1523
|
-
title: e(a)("page.delete"),
|
|
1524
|
-
onClick: (D) => y(g)
|
|
1525
|
-
}, null, 8, ["title", "onClick"])
|
|
1526
|
-
]),
|
|
1527
|
-
_: 2
|
|
1528
|
-
}, 1024)) : R("", !0)
|
|
1421
|
+
_: 2
|
|
1422
|
+
}, 1024)
|
|
1423
|
+
]),
|
|
1424
|
+
"cell-match_type": t(({ row: v }) => [
|
|
1425
|
+
l(e(M), null, {
|
|
1426
|
+
default: t(() => [
|
|
1427
|
+
w(h(e(a)(`page.${v.match_type}`)), 1)
|
|
1529
1428
|
]),
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
onClick: (D) => y(g)
|
|
1541
|
-
}, null, 8, ["title", "onClick"])
|
|
1542
|
-
]),
|
|
1543
|
-
_: 2
|
|
1544
|
-
}, 1024)
|
|
1429
|
+
_: 2
|
|
1430
|
+
}, 1024)
|
|
1431
|
+
]),
|
|
1432
|
+
"cell-title": t(({ row: v }) => [
|
|
1433
|
+
e(fe)(v) ? (y(), W(e(R), {
|
|
1434
|
+
key: 0,
|
|
1435
|
+
size: "sm"
|
|
1436
|
+
}, {
|
|
1437
|
+
default: t(() => [
|
|
1438
|
+
w(h(e(fe)(v)), 1)
|
|
1545
1439
|
]),
|
|
1440
|
+
_: 2
|
|
1441
|
+
}, 1024)) : (y(), W(e(R), {
|
|
1442
|
+
key: 1,
|
|
1443
|
+
size: "sm",
|
|
1444
|
+
tone: "muted"
|
|
1445
|
+
}, {
|
|
1446
|
+
default: t(() => [...x[3] || (x[3] = [
|
|
1447
|
+
w("—", -1)
|
|
1448
|
+
])]),
|
|
1546
1449
|
_: 1
|
|
1547
|
-
}
|
|
1450
|
+
}))
|
|
1548
1451
|
]),
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1452
|
+
"cell-is_active": t(({ row: v }) => [
|
|
1453
|
+
l(e(M), {
|
|
1454
|
+
type: v.is_active ? "success" : "default",
|
|
1455
|
+
dot: ""
|
|
1456
|
+
}, {
|
|
1457
|
+
default: t(() => [
|
|
1458
|
+
w(h(v.is_active ? e(a)("page.active") : e(a)("page.inactive")), 1)
|
|
1459
|
+
]),
|
|
1460
|
+
_: 2
|
|
1461
|
+
}, 1032, ["type"])
|
|
1462
|
+
]),
|
|
1463
|
+
"card-actions": t(({ row: v }) => [
|
|
1464
|
+
e(g) ? (y(), W(e(te), {
|
|
1465
|
+
key: 0,
|
|
1466
|
+
actions: A(v),
|
|
1467
|
+
label: v.pattern
|
|
1468
|
+
}, null, 8, ["actions", "label"])) : O("", !0)
|
|
1469
|
+
]),
|
|
1470
|
+
"cell-actions": t(({ row: v }) => [
|
|
1471
|
+
l(e(te), {
|
|
1472
|
+
actions: A(v),
|
|
1473
|
+
label: v.pattern
|
|
1474
|
+
}, null, 8, ["actions", "label"])
|
|
1475
|
+
]),
|
|
1476
|
+
_: 1
|
|
1477
|
+
}, 8, ["data", "columns", "clickable", "hover", "loading", "search-placeholder", "empty-text"])
|
|
1568
1478
|
]),
|
|
1569
|
-
_:
|
|
1570
|
-
},
|
|
1479
|
+
_: 2
|
|
1480
|
+
}, [
|
|
1481
|
+
e(g) ? {
|
|
1482
|
+
name: "actions",
|
|
1483
|
+
fn: t(() => [
|
|
1484
|
+
l(e(I), {
|
|
1485
|
+
type: "primary",
|
|
1486
|
+
icon: "add",
|
|
1487
|
+
onClick: x[0] || (x[0] = (v) => m(null))
|
|
1488
|
+
}, {
|
|
1489
|
+
default: t(() => [
|
|
1490
|
+
w(h(e(a)("page.new-rule")), 1)
|
|
1491
|
+
]),
|
|
1492
|
+
_: 1
|
|
1493
|
+
})
|
|
1494
|
+
]),
|
|
1495
|
+
key: "0"
|
|
1496
|
+
} : void 0
|
|
1497
|
+
]), 1032, ["base"]));
|
|
1571
1498
|
}
|
|
1572
|
-
}),
|
|
1573
|
-
function
|
|
1574
|
-
const r =
|
|
1499
|
+
}), kt = /* @__PURE__ */ Q(wt, [["__scopeId", "data-v-7a990610"]]);
|
|
1500
|
+
function Wt(n = {}) {
|
|
1501
|
+
const r = n.path ?? "/seo", d = n.mediaField ? De(n.mediaField) : void 0;
|
|
1575
1502
|
return {
|
|
1576
1503
|
id: "seo",
|
|
1577
1504
|
path: r,
|
|
@@ -1581,13 +1508,13 @@ function Lt(o = {}) {
|
|
|
1581
1508
|
{
|
|
1582
1509
|
path: r,
|
|
1583
1510
|
name: "webx.seo",
|
|
1584
|
-
component:
|
|
1511
|
+
component: kt,
|
|
1585
1512
|
props: { base: r, mediaField: d }
|
|
1586
1513
|
},
|
|
1587
1514
|
{
|
|
1588
1515
|
path: `${r}/redirects`,
|
|
1589
1516
|
name: "webx.seo.redirects",
|
|
1590
|
-
component:
|
|
1517
|
+
component: mt,
|
|
1591
1518
|
props: { base: r }
|
|
1592
1519
|
},
|
|
1593
1520
|
// The trail of renames, from `webx-ui/routing`. The screen is here whether or not any
|
|
@@ -1596,7 +1523,7 @@ function Lt(o = {}) {
|
|
|
1596
1523
|
{
|
|
1597
1524
|
path: `${r}/aliases`,
|
|
1598
1525
|
name: "webx.seo.aliases",
|
|
1599
|
-
component:
|
|
1526
|
+
component: Ye,
|
|
1600
1527
|
props: { base: r }
|
|
1601
1528
|
}
|
|
1602
1529
|
],
|
|
@@ -1613,15 +1540,15 @@ function Lt(o = {}) {
|
|
|
1613
1540
|
}
|
|
1614
1541
|
export {
|
|
1615
1542
|
Ve as WxSeo,
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1543
|
+
Ye as WxSeoAliasesPage,
|
|
1544
|
+
mt as WxSeoRedirectsPage,
|
|
1545
|
+
kt as WxSeoUrlsPage,
|
|
1546
|
+
G as createSeoApi,
|
|
1547
|
+
ne as robotsDirectives,
|
|
1548
|
+
ft as ruleInput,
|
|
1549
|
+
fe as ruleTitle,
|
|
1550
|
+
Wt as seo,
|
|
1551
|
+
Ke as seoMessages,
|
|
1552
|
+
ht as seoOf
|
|
1626
1553
|
};
|
|
1627
1554
|
//# sourceMappingURL=index.js.map
|