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