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