@oktis-works/admin 0.4.20 → 0.4.23
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/client/_astro/{ActivityWidget.BbEtaaM-.js → ActivityWidget.DaftIB1V.js} +2 -2
- package/dist/client/_astro/AdminBar.B-diRxPt.js +253 -0
- package/dist/client/_astro/{AtGlanceWidget.C1hpeDlx.js → AtGlanceWidget.q_xwhOJa.js} +3 -3
- package/dist/client/_astro/BaseLayout.sayhdG_g.css +1 -0
- package/dist/client/_astro/ContentEditor.B1b1Ixz0.js +3 -0
- package/dist/client/_astro/ContentEditor.DGTZ51kU.js +1 -0
- package/dist/client/_astro/ContentTypeWorkspace.CFzwh3Rc.js +1 -0
- package/dist/client/_astro/CustomFieldsManager.DqCE6rSX.js +5 -0
- package/dist/client/_astro/DashboardHome.HrqKA0mK.js +1 -0
- package/dist/client/_astro/DashboardLayout.astro_astro_type_script_index_0_lang.sBNUxHjt.js +1 -0
- package/dist/client/_astro/{DashboardLayout.CGou4voc.css → DashboardLayout.cOPI1C7I.css} +1 -1
- package/dist/client/_astro/{Footer.rUGgtlfI.js → Footer.nQEKIcjo.js} +2 -2
- package/dist/client/_astro/GeneralSettings.C5lXnnvB.js +1 -0
- package/dist/client/_astro/LogsManager.BSXD0gFG.js +1 -0
- package/dist/client/_astro/MediaLibrary.9tlXDGsx.js +1 -0
- package/dist/client/_astro/MenuManager.CfLmtMhF.js +1 -0
- package/dist/client/_astro/PluginManager.Ba2R7ZVx.js +98 -0
- package/dist/client/_astro/PostTypesManager.DqbyhhLF.js +1 -0
- package/dist/client/_astro/QuickDraftWidget.J5LOLOY3.js +17 -0
- package/dist/client/_astro/ResourceHubs.sI10AY3z.js +1 -0
- package/dist/client/_astro/TaxonomiesManager.BFd3zjNe.js +1 -0
- package/dist/client/_astro/TaxonomyTermsManager.C7ClYXtt.js +1 -0
- package/dist/client/_astro/ThemeManager.C4t-yZay.js +129 -0
- package/dist/client/_astro/UserCreateForm.B-7pKOO6.js +1 -0
- package/dist/client/_astro/UsersManager.aI6-3vtM.js +1 -0
- package/dist/client/_astro/WebhooksManager.C3E91U9V.js +1 -0
- package/dist/client/_astro/api.DSIz0zxF.js +1 -0
- package/dist/client/_astro/ar.9BcNkJMI.js +1 -0
- package/dist/client/_astro/client.BDaUmf7m.js +1 -0
- package/dist/client/_astro/custom-fields.pl-GPt9A.css +1 -0
- package/dist/client/_astro/dist.BqeNZlzo.js +1 -0
- package/dist/client/_astro/es-ES.DgqDFCmG.js +1 -0
- package/dist/client/_astro/extensions.BD4YTWQq.js +1 -0
- package/dist/client/_astro/he.11dIJHQw.js +1 -0
- package/dist/client/_astro/i18n.Tk18hqHh.js +1 -0
- package/dist/client/_astro/it.yCdgk3Xj.js +1 -0
- package/dist/client/_astro/ja.BIm7Hwe_.js +1 -0
- package/dist/client/_astro/{login.astro_astro_type_script_index_0_lang.O-AlzgHd.js → login.astro_astro_type_script_index_0_lang.CJiWhdn-.js} +1 -1
- package/dist/client/_astro/lucide.DlU56wZ1.js +4 -0
- package/dist/client/_astro/pl.dUwrcITB.js +1 -0
- package/dist/client/_astro/pt-BR.BvjbjXKW.js +1 -0
- package/dist/client/_astro/rolldown-runtime.BpQH8Ho1.js +1 -0
- package/dist/client/_astro/ru.lmDiQaSu.js +1 -0
- package/dist/client/_astro/solid.TEtyrbLc.js +1 -0
- package/dist/client/_astro/sw._qHdoFbp.js +1 -0
- package/dist/client/_astro/tr.Do-lr98T.js +1 -0
- package/dist/client/_astro/uk.DTUX-N1c.js +1 -0
- package/dist/client/_astro/{version.BQq07lEn.js → version.Cvcb-3YL.js} +1 -1
- package/dist/client/_astro/web.C8wWxyYF.js +1 -0
- package/dist/client/_astro/yo.BIYG0J7I.js +1 -0
- package/dist/client/_astro/zh-CN.C7Iod1E1.js +1 -0
- package/dist/server/chunks/{ContentEditor_DS7flRjR.mjs → ContentEditor_Bz6HNlOl.mjs} +11 -31
- package/dist/server/chunks/{DashboardLayout_09DepSVn.mjs → DashboardLayout_DnvPikNH.mjs} +42 -17
- package/dist/server/chunks/MediaLibrary_CfwJY7WG.mjs +466 -0
- package/dist/server/chunks/{_slug__l8CTaLpP.mjs → _slug__Bf1zTrrT.mjs} +1 -1
- package/dist/server/chunks/access_Iqz1YRc2.mjs +138 -0
- package/dist/server/chunks/{ar_B0LfQbpu.mjs → ar_DlCzOUGe.mjs} +22 -2
- package/dist/server/chunks/custom-fields_HXTX5-i-.mjs +1297 -0
- package/dist/server/chunks/{edit_hSCrM2Gq.mjs → edit_ibDxQgfc.mjs} +2 -2
- package/dist/server/chunks/{es-ES_dBEm2FNw.mjs → es-ES_DD40B9Zr.mjs} +22 -2
- package/dist/server/chunks/{general_Ct9MU7b-.mjs → general_VinYjg7Y.mjs} +2 -2
- package/dist/server/chunks/{he_DRWoI1A5.mjs → he_8WSAyM_S.mjs} +22 -2
- package/dist/server/chunks/{i18n_BqFK0MIW.mjs → i18n_BgHPm3Sm.mjs} +337 -57
- package/dist/server/chunks/{index_CBfRX_VO.mjs → index_BIz2E9Ay.mjs} +3 -3
- package/dist/server/chunks/{index_uv0IHg8r.mjs → index_DmY8Cm8s.mjs} +2 -2
- package/dist/server/chunks/{index_DQ5pFuPN.mjs → index_DvyRjH_d.mjs} +2 -2
- package/dist/server/chunks/{index_Cv2j9xC_.mjs → index_WfuyDGIh.mjs} +2 -2
- package/dist/server/chunks/{index_B77wdzK2.mjs → index_kl5K78eg.mjs} +1 -1
- package/dist/server/chunks/{it_BDY3lerP.mjs → it_DEDC6yxf.mjs} +22 -2
- package/dist/server/chunks/{ja_C-EybQiV.mjs → ja_BRQi6rW3.mjs} +22 -2
- package/dist/server/chunks/{login_D-Z6bo6E.mjs → login_s3hMBW1K.mjs} +1 -1
- package/dist/server/chunks/logs_DUQUxzzy.mjs +160 -0
- package/dist/server/chunks/menus_CgKz8KBb.mjs +532 -0
- package/dist/server/chunks/{new_DpJfTahF.mjs → new_CU0A50ce.mjs} +2 -2
- package/dist/server/chunks/{new_XOnqlHm3.mjs → new_CZuza7Tx.mjs} +2 -2
- package/dist/server/chunks/{pl_DH5LKmVG.mjs → pl_CKanAk0F.mjs} +22 -2
- package/dist/server/chunks/plugins_fppkr9jv.mjs +133 -0
- package/dist/server/chunks/{post-types_DziideHh.mjs → post-types_BAWPD3pX.mjs} +2 -2
- package/dist/server/chunks/{pt-BR_CBnqy3xP.mjs → pt-BR_CoM1872j.mjs} +263 -13
- package/dist/server/chunks/{ru_CFa1xYFr.mjs → ru_CuNXt2MB.mjs} +22 -2
- package/dist/server/chunks/{sw_QZf7NSsI.mjs → sw_RLMWPkos.mjs} +22 -2
- package/dist/server/chunks/{taxonomies_Bc6xPaKp.mjs → taxonomies_BACV08DC.mjs} +2 -2
- package/dist/server/chunks/{taxonomy_Cv4_KTTL.mjs → taxonomy_CZLTclnV.mjs} +30 -15
- package/dist/server/chunks/themes_DHNmoF_s.mjs +132 -0
- package/dist/server/chunks/{tr_Fjry5R-K.mjs → tr_Dz8pqyTZ.mjs} +22 -2
- package/dist/server/chunks/{uk_Bxc3qY45.mjs → uk_BjwqlweA.mjs} +22 -2
- package/dist/server/chunks/{upload_CB_L9tkU.mjs → upload_BZgCqIbH.mjs} +2 -2
- package/dist/server/chunks/webhooks_D0qA5-De.mjs +300 -0
- package/dist/server/chunks/{yo_BARL-Qrh.mjs → yo_Dv14KWVR.mjs} +22 -2
- package/dist/server/chunks/{zh-CN_CkjPJL88.mjs → zh-CN_DjIZCWzG.mjs} +22 -2
- package/dist/server/entry.mjs +77 -50
- package/dist/server/virtual_astro_middleware.mjs +1 -1
- package/package.json +1 -1
- package/dist/client/_astro/AdminBar.CU2eba2D.js +0 -253
- package/dist/client/_astro/BaseLayout.Y8xW22CP.css +0 -1
- package/dist/client/_astro/ContentEditor.Bc5Jq8Dv.js +0 -1
- package/dist/client/_astro/ContentEditor.DvpaqJBD.js +0 -3
- package/dist/client/_astro/ContentTypeWorkspace.DakVi21h.js +0 -1
- package/dist/client/_astro/CustomFieldsManager.B7WOTvb7.js +0 -3
- package/dist/client/_astro/DashboardHome.CUfuLLDH.js +0 -1
- package/dist/client/_astro/DashboardLayout.astro_astro_type_script_index_0_lang.Dpnx6U2l.js +0 -4
- package/dist/client/_astro/FieldTypePicker.Cyfzqug-.js +0 -1
- package/dist/client/_astro/GeneralSettings.C4mnJ7P2.js +0 -1
- package/dist/client/_astro/MediaLibrary.2geQYfXB.js +0 -1
- package/dist/client/_astro/PluginManager.D3pm88iu.js +0 -93
- package/dist/client/_astro/PostTypesManager.Cyhr3VEJ.js +0 -1
- package/dist/client/_astro/QuickDraftWidget.CPljoS31.js +0 -17
- package/dist/client/_astro/ResourceHubs.DpCJERsJ.js +0 -1
- package/dist/client/_astro/TaxonomiesManager.P3bc-fnu.js +0 -1
- package/dist/client/_astro/TaxonomyTermsManager.BxP9gwm7.js +0 -1
- package/dist/client/_astro/ThemeManager.3MUOwqex.js +0 -129
- package/dist/client/_astro/UserCreateForm.C3RiEJEa.js +0 -1
- package/dist/client/_astro/UsersManager.DR9XR3FX.js +0 -1
- package/dist/client/_astro/api.25OAsWO0.js +0 -1
- package/dist/client/_astro/ar.CwC9hXB9.js +0 -1
- package/dist/client/_astro/client.W0NY0lEa.js +0 -1
- package/dist/client/_astro/custom-fields.IjuRIdAC.css +0 -1
- package/dist/client/_astro/es-ES.qNcd-cVX.js +0 -1
- package/dist/client/_astro/extensions.Bj86CHnv.js +0 -1
- package/dist/client/_astro/he.DfZ0ZzM-.js +0 -1
- package/dist/client/_astro/i18n.C24_pkIi.js +0 -1
- package/dist/client/_astro/it.PFmLQj2s.js +0 -1
- package/dist/client/_astro/ja.CMi5cD8g.js +0 -1
- package/dist/client/_astro/pl.CRExzLlj.js +0 -1
- package/dist/client/_astro/pt-BR.BPvwNpKR.js +0 -1
- package/dist/client/_astro/ru.CWV-tkZ3.js +0 -1
- package/dist/client/_astro/solid.DN8T1HsY.js +0 -1
- package/dist/client/_astro/src.Cq47pnsg.js +0 -1
- package/dist/client/_astro/sw.B5x6GU4s.js +0 -1
- package/dist/client/_astro/tr.BzxCGQu8.js +0 -1
- package/dist/client/_astro/uk.DJHMwNRU.js +0 -1
- package/dist/client/_astro/web.Bze9SKEA.js +0 -1
- package/dist/client/_astro/yo.DNw_hOnW.js +0 -1
- package/dist/client/_astro/zh-CN.Bs7H6Unx.js +0 -1
- package/dist/server/chunks/FieldTypePicker_CXwpmcQ3.mjs +0 -79
- package/dist/server/chunks/MediaLibrary_Xs09kLza.mjs +0 -335
- package/dist/server/chunks/ResourceHubs_Dwb0xyPZ.mjs +0 -453
- package/dist/server/chunks/access_D93W5BWD.mjs +0 -34
- package/dist/server/chunks/custom-fields_Dp7DHJ0M.mjs +0 -488
- package/dist/server/chunks/operations_0sYvzzNC.mjs +0 -34
- package/dist/server/chunks/plugins_Clk92l6Q.mjs +0 -156
- package/dist/server/chunks/resources_dPTDnpAf.mjs +0 -34
- package/dist/server/chunks/themes_BRtDtEK7.mjs +0 -155
- /package/dist/server/chunks/{BaseLayout_m8b8Eemd.mjs → BaseLayout_CXafpVV9.mjs} +0 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
|
+
import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
|
+
import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BgHPm3Sm.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_DnvPikNH.mjs";
|
|
6
|
+
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
7
|
+
import { For, Show, createSignal, onCleanup, onMount } from "solid-js";
|
|
8
|
+
//#region src/components/apps/settings/WebhooksManager.tsx
|
|
9
|
+
var _tmpl$ = [
|
|
10
|
+
"<div",
|
|
11
|
+
" class=\"webhook-event-select__dropdown\" role=\"listbox\"><input class=\"input\"",
|
|
12
|
+
"><div class=\"webhook-event-select__options\">",
|
|
13
|
+
"</div></div>"
|
|
14
|
+
];
|
|
15
|
+
var _tmpl$2 = [
|
|
16
|
+
"<div",
|
|
17
|
+
" class=\"webhook-event-select\"><button type=\"button\" class=\"input webhook-event-select__trigger\" aria-haspopup=\"listbox\"",
|
|
18
|
+
"><span>",
|
|
19
|
+
"</span><span aria-hidden=\"true\">⌄</span></button><!--$-->",
|
|
20
|
+
"<!--/--><div class=\"webhook-event-select__chips\">",
|
|
21
|
+
"</div></div>"
|
|
22
|
+
];
|
|
23
|
+
var _tmpl$3 = [
|
|
24
|
+
"<span",
|
|
25
|
+
" class=\"muted\">",
|
|
26
|
+
"</span>"
|
|
27
|
+
];
|
|
28
|
+
var _tmpl$4 = [
|
|
29
|
+
"<label",
|
|
30
|
+
" class=\"webhook-event-option\"><input type=\"checkbox\"",
|
|
31
|
+
"><span><!--$-->",
|
|
32
|
+
"<!--/--><small>",
|
|
33
|
+
"</small></span></label>"
|
|
34
|
+
];
|
|
35
|
+
var _tmpl$5 = [
|
|
36
|
+
"<button",
|
|
37
|
+
" type=\"button\" class=\"webhook-event-chip\"><!--$-->",
|
|
38
|
+
"<!--/--> ×</button>"
|
|
39
|
+
];
|
|
40
|
+
var _tmpl$6 = [
|
|
41
|
+
"<div",
|
|
42
|
+
" class=\"notice notice--error\">",
|
|
43
|
+
"</div>"
|
|
44
|
+
];
|
|
45
|
+
var _tmpl$7 = [
|
|
46
|
+
"<div",
|
|
47
|
+
" class=\"table-scroll\"><table class=\"table\"><thead><tr><th>",
|
|
48
|
+
"</th><th>",
|
|
49
|
+
"</th><th>",
|
|
50
|
+
"</th><th>",
|
|
51
|
+
"</th><th>",
|
|
52
|
+
"</th></tr></thead><tbody>",
|
|
53
|
+
"</tbody></table></div>"
|
|
54
|
+
];
|
|
55
|
+
var _tmpl$8 = [
|
|
56
|
+
"<div",
|
|
57
|
+
" class=\"resource-hub webhooks-manager\"><!--$-->",
|
|
58
|
+
"<!--/--><div class=\"card-header-row\"><div><h3>",
|
|
59
|
+
"</h3><p>",
|
|
60
|
+
"</p></div><button class=\"btn btn-primary\" type=\"button\">",
|
|
61
|
+
"</button></div><!--$-->",
|
|
62
|
+
"<!--/--><section class=\"card\">",
|
|
63
|
+
"</section><style>.webhook-event-select{position:relative}.webhook-event-select__trigger{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer}.webhook-event-select__dropdown{position:absolute;z-index:20;top:calc(100% + .25rem);left:0;right:0;background:var(--color-surface,#fff);border:1px solid var(--color-border,#dcdcde);box-shadow:0 8px 22px rgba(0,0,0,.14);padding:.6rem}.webhook-event-select__options{max-height:240px;overflow:auto;margin-top:.5rem;display:grid;gap:.2rem}.webhook-event-option{display:flex!important;align-items:flex-start;gap:.5rem!important;padding:.45rem;border-radius:4px;cursor:pointer}.webhook-event-option:hover{background:var(--color-surface-muted,#f5f5f5)}.webhook-event-option span{display:grid;gap:.12rem}.webhook-event-option small{color:var(--color-muted);font-size:.75rem}.webhook-event-select__chips{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.4rem}.webhook-event-chip{border:1px solid var(--color-border,#dcdcde);background:var(--color-surface-muted,#f5f5f5);border-radius:999px;padding:.2rem .55rem;cursor:pointer;font-size:.78rem}</style></div>"
|
|
64
|
+
];
|
|
65
|
+
var _tmpl$9 = [
|
|
66
|
+
"<label",
|
|
67
|
+
"><!--$-->",
|
|
68
|
+
"<!--/--><input class=\"input\" type=\"password\"",
|
|
69
|
+
"></label>"
|
|
70
|
+
];
|
|
71
|
+
var _tmpl$0 = [
|
|
72
|
+
"<div",
|
|
73
|
+
" class=\"form-grid\"><label><!--$-->",
|
|
74
|
+
"<!--/--><input class=\"input\"",
|
|
75
|
+
"></label><label><!--$-->",
|
|
76
|
+
"<!--/--><input class=\"input\" type=\"password\"",
|
|
77
|
+
"></label></div>"
|
|
78
|
+
];
|
|
79
|
+
var _tmpl$1 = [
|
|
80
|
+
"<div",
|
|
81
|
+
" class=\"form-grid\"><label><!--$-->",
|
|
82
|
+
"<!--/--><input class=\"input\" type=\"password\"",
|
|
83
|
+
"></label><label><!--$-->",
|
|
84
|
+
"<!--/--><input class=\"input\"",
|
|
85
|
+
"></label></div>"
|
|
86
|
+
];
|
|
87
|
+
var _tmpl$10 = [
|
|
88
|
+
"<section",
|
|
89
|
+
" class=\"card\"><h3>",
|
|
90
|
+
"</h3><form class=\"resource-form\"><label><!--$-->",
|
|
91
|
+
"<!--/--><input class=\"input\" required type=\"url\"",
|
|
92
|
+
"></label><label><!--$-->",
|
|
93
|
+
"<!--/--><!--$-->",
|
|
94
|
+
"<!--/--></label><label><!--$-->",
|
|
95
|
+
"<!--/--><select class=\"input\"",
|
|
96
|
+
"><option value=\"none\">",
|
|
97
|
+
"</option><option value=\"bearer\">",
|
|
98
|
+
"</option><option value=\"basic\">",
|
|
99
|
+
"</option><option value=\"api_key\">",
|
|
100
|
+
"</option><option value=\"hmac_sha256\">",
|
|
101
|
+
"</option></select></label><!--$-->",
|
|
102
|
+
"<!--/--><!--$-->",
|
|
103
|
+
"<!--/--><!--$-->",
|
|
104
|
+
"<!--/--><!--$-->",
|
|
105
|
+
"<!--/--><label class=\"checkbox-label\"><input type=\"checkbox\"",
|
|
106
|
+
"> <!--$-->",
|
|
107
|
+
"<!--/--></label><div><button class=\"btn btn-primary\" type=\"submit\">",
|
|
108
|
+
"</button> <button class=\"btn\" type=\"button\">",
|
|
109
|
+
"</button></div></form></section>"
|
|
110
|
+
];
|
|
111
|
+
var _tmpl$11 = [
|
|
112
|
+
"<p",
|
|
113
|
+
">",
|
|
114
|
+
"</p>"
|
|
115
|
+
];
|
|
116
|
+
var _tmpl$12 = [
|
|
117
|
+
"<tr",
|
|
118
|
+
"><td>",
|
|
119
|
+
"</td><td>",
|
|
120
|
+
"</td><td>",
|
|
121
|
+
"</td><td>",
|
|
122
|
+
"</td><td><button class=\"btn\" type=\"button\">",
|
|
123
|
+
"</button> <button class=\"btn btn-danger\" type=\"button\">",
|
|
124
|
+
"</button></td></tr>"
|
|
125
|
+
];
|
|
126
|
+
function EventMultiSelect(props) {
|
|
127
|
+
const [open, setOpen] = createSignal(false);
|
|
128
|
+
const [search, setSearch] = createSignal("");
|
|
129
|
+
onMount(() => {
|
|
130
|
+
const close = (event) => {};
|
|
131
|
+
document.addEventListener("mousedown", close);
|
|
132
|
+
onCleanup(() => document.removeEventListener("mousedown", close));
|
|
133
|
+
});
|
|
134
|
+
const filtered = () => props.options.filter((option) => `${option.label} ${option.value}`.toLowerCase().includes(search().toLowerCase()));
|
|
135
|
+
return ssr(_tmpl$2, ssrHydrationKey(), ssrAttribute("aria-expanded", escape(open(), true), false), props.value.length > 0 ? `${escape(props.value.length)} selecionado(s)` : escape(props.placeholder), escape(createComponent(Show, {
|
|
136
|
+
get when() {
|
|
137
|
+
return open();
|
|
138
|
+
},
|
|
139
|
+
get children() {
|
|
140
|
+
return ssr(_tmpl$, ssrHydrationKey(), ssrAttribute("placeholder", escape(props.searchPlaceholder, true), false) + ssrAttribute("value", escape(search(), true), false), escape(createComponent(Show, {
|
|
141
|
+
get when() {
|
|
142
|
+
return filtered().length > 0;
|
|
143
|
+
},
|
|
144
|
+
get fallback() {
|
|
145
|
+
return ssr(_tmpl$3, ssrHydrationKey(), escape(props.empty));
|
|
146
|
+
},
|
|
147
|
+
get children() {
|
|
148
|
+
return createComponent(For, {
|
|
149
|
+
get each() {
|
|
150
|
+
return filtered();
|
|
151
|
+
},
|
|
152
|
+
children: (option) => ssr(_tmpl$4, ssrHydrationKey(), ssrAttribute("checked", props.value.includes(option.value), true), escape(option.label), escape(option.value))
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
})));
|
|
156
|
+
}
|
|
157
|
+
})), escape(createComponent(For, {
|
|
158
|
+
get each() {
|
|
159
|
+
return props.value;
|
|
160
|
+
},
|
|
161
|
+
children: (value) => ssr(_tmpl$5, ssrHydrationKey(), escape(props.options.find((option) => option.value === value)?.label ?? value))
|
|
162
|
+
})));
|
|
163
|
+
}
|
|
164
|
+
function WebhooksManager() {
|
|
165
|
+
const { t } = useTranslation();
|
|
166
|
+
const [webhooks, setWebhooks] = createSignal([]);
|
|
167
|
+
const [eventOptions, setEventOptions] = createSignal([]);
|
|
168
|
+
const [form, setForm] = createSignal(null);
|
|
169
|
+
const [error, setError] = createSignal("");
|
|
170
|
+
const [loading, setLoading] = createSignal(true);
|
|
171
|
+
const load = async () => {
|
|
172
|
+
setLoading(true);
|
|
173
|
+
try {
|
|
174
|
+
const [hooks, events] = await Promise.all([apiClient.getWebhooks(), apiClient.getWebhookEvents()]);
|
|
175
|
+
setWebhooks(hooks);
|
|
176
|
+
setEventOptions(events);
|
|
177
|
+
} catch (err) {
|
|
178
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
179
|
+
} finally {
|
|
180
|
+
setLoading(false);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
onMount(load);
|
|
184
|
+
return ssr(_tmpl$8, ssrHydrationKey(), escape(createComponent(Show, {
|
|
185
|
+
get when() {
|
|
186
|
+
return error();
|
|
187
|
+
},
|
|
188
|
+
get children() {
|
|
189
|
+
return ssr(_tmpl$6, ssrHydrationKey(), escape(error()));
|
|
190
|
+
}
|
|
191
|
+
})), escape(t("webhooks.listTitle")), escape(t("webhooks.description")), escape(t("webhooks.new")), escape(createComponent(Show, {
|
|
192
|
+
get when() {
|
|
193
|
+
return form();
|
|
194
|
+
},
|
|
195
|
+
children: (current) => ssr(_tmpl$10, ssrHydrationKey(), current().id ? escape(t("webhooks.edit")) : escape(t("webhooks.create")), escape(t("webhooks.url")), ssrAttribute("value", escape(current().url ?? "", true), false), escape(t("webhooks.events")), escape(createComponent(EventMultiSelect, {
|
|
196
|
+
get options() {
|
|
197
|
+
return eventOptions();
|
|
198
|
+
},
|
|
199
|
+
get value() {
|
|
200
|
+
return current().events ?? [];
|
|
201
|
+
},
|
|
202
|
+
onChange: (events) => setForm({
|
|
203
|
+
...current(),
|
|
204
|
+
events
|
|
205
|
+
}),
|
|
206
|
+
get placeholder() {
|
|
207
|
+
return t("webhooks.selectEvents");
|
|
208
|
+
},
|
|
209
|
+
get searchPlaceholder() {
|
|
210
|
+
return t("webhooks.searchEvents");
|
|
211
|
+
},
|
|
212
|
+
get empty() {
|
|
213
|
+
return t("webhooks.noEvents");
|
|
214
|
+
}
|
|
215
|
+
})), escape(t("webhooks.authentication")), ssrAttribute("value", escape(current().auth_type, true), false), escape(t("webhooks.auth.none")), escape(t("webhooks.auth.bearer")), escape(t("webhooks.auth.basic")), escape(t("webhooks.auth.apiKey")), escape(t("webhooks.auth.hmac")), escape(createComponent(Show, {
|
|
216
|
+
get when() {
|
|
217
|
+
return current().auth_type === "bearer";
|
|
218
|
+
},
|
|
219
|
+
get children() {
|
|
220
|
+
return ssr(_tmpl$9, ssrHydrationKey(), escape(t("webhooks.token")), ssrAttribute("placeholder", current().id ? escape(t("webhooks.keepExisting"), true) : "", false) + ssrAttribute("value", escape(current().auth_config.token ?? "", true), false));
|
|
221
|
+
}
|
|
222
|
+
})), escape(createComponent(Show, {
|
|
223
|
+
get when() {
|
|
224
|
+
return current().auth_type === "basic";
|
|
225
|
+
},
|
|
226
|
+
get children() {
|
|
227
|
+
return ssr(_tmpl$0, ssrHydrationKey(), escape(t("webhooks.username")), ssrAttribute("value", escape(current().auth_config.username ?? "", true), false), escape(t("webhooks.password")), ssrAttribute("placeholder", current().id ? escape(t("webhooks.keepExisting"), true) : "", false) + ssrAttribute("value", escape(current().auth_config.password ?? "", true), false));
|
|
228
|
+
}
|
|
229
|
+
})), escape(createComponent(Show, {
|
|
230
|
+
get when() {
|
|
231
|
+
return current().auth_type === "api_key";
|
|
232
|
+
},
|
|
233
|
+
get children() {
|
|
234
|
+
return ssr(_tmpl$0, ssrHydrationKey(), escape(t("webhooks.headerName")), ssrAttribute("value", escape(current().auth_config.headerName ?? "", true), false), escape(t("webhooks.apiKeyValue")), ssrAttribute("placeholder", current().id ? escape(t("webhooks.keepExisting"), true) : "", false) + ssrAttribute("value", escape(current().auth_config.value ?? "", true), false));
|
|
235
|
+
}
|
|
236
|
+
})), escape(createComponent(Show, {
|
|
237
|
+
get when() {
|
|
238
|
+
return current().auth_type === "hmac_sha256";
|
|
239
|
+
},
|
|
240
|
+
get children() {
|
|
241
|
+
return ssr(_tmpl$1, ssrHydrationKey(), escape(t("webhooks.secret")), ssrAttribute("required", !current().id, true) + ssrAttribute("placeholder", current().id ? escape(t("webhooks.keepExisting"), true) : "", false) + ssrAttribute("value", escape(current().auth_config.secret ?? "", true), false), escape(t("webhooks.signatureHeader")), ssrAttribute("value", escape(current().auth_config.signatureHeader ?? "X-Webhook-Signature", true), false));
|
|
242
|
+
}
|
|
243
|
+
})), ssrAttribute("checked", current().active ?? true, true), escape(t("webhooks.active")), escape(t("common.save")), escape(t("common.cancel")))
|
|
244
|
+
})), escape(createComponent(Show, {
|
|
245
|
+
get when() {
|
|
246
|
+
return !loading();
|
|
247
|
+
},
|
|
248
|
+
get fallback() {
|
|
249
|
+
return ssr(_tmpl$11, ssrHydrationKey(), escape(t("webhooks.loading")));
|
|
250
|
+
},
|
|
251
|
+
get children() {
|
|
252
|
+
return createComponent(Show, {
|
|
253
|
+
get when() {
|
|
254
|
+
return webhooks().length > 0;
|
|
255
|
+
},
|
|
256
|
+
get fallback() {
|
|
257
|
+
return ssr(_tmpl$11, ssrHydrationKey(), escape(t("webhooks.empty")));
|
|
258
|
+
},
|
|
259
|
+
get children() {
|
|
260
|
+
return ssr(_tmpl$7, ssrHydrationKey(), escape(t("webhooks.url")), escape(t("webhooks.events")), escape(t("webhooks.authentication")), escape(t("webhooks.active")), escape(t("common.actions")), escape(createComponent(For, {
|
|
261
|
+
get each() {
|
|
262
|
+
return webhooks();
|
|
263
|
+
},
|
|
264
|
+
children: (hook) => ssr(_tmpl$12, ssrHydrationKey(), escape(hook.url), escape((hook.events ?? []).join(", ")), escape(t(`webhooks.auth.${hook.auth_type ?? "hmac_sha256"}`)), hook.active ? escape(t("common.yes")) : escape(t("common.no")), escape(t("common.edit")), escape(t("common.delete")))
|
|
265
|
+
})));
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
})));
|
|
270
|
+
}
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region src/pages/settings/webhooks.astro
|
|
273
|
+
var webhooks_exports = /* @__PURE__ */ __exportAll({
|
|
274
|
+
default: () => $$Webhooks,
|
|
275
|
+
file: () => $$file,
|
|
276
|
+
url: () => $$url
|
|
277
|
+
});
|
|
278
|
+
createAstro("https://astro.build");
|
|
279
|
+
var $$Webhooks = createComponent$1(($$result, $$props, $$slots) => {
|
|
280
|
+
const Astro = $$result.createAstro($$props, $$slots);
|
|
281
|
+
Astro.self = $$Webhooks;
|
|
282
|
+
const { t } = Astro.locals;
|
|
283
|
+
return renderTemplate`${renderComponent($$result, "DashboardLayout", $$DashboardLayout, {
|
|
284
|
+
"title": t("webhooks.title"),
|
|
285
|
+
"data-astro-cid-lncier6f": true
|
|
286
|
+
}, { "default": ($$result) => renderTemplate`${maybeRenderHead($$result)}<div class="settings-page" data-astro-cid-lncier6f><div class="page-header" data-astro-cid-lncier6f><h2 data-astro-cid-lncier6f>${t("webhooks.title")}</h2><p data-astro-cid-lncier6f>${t("webhooks.description")}</p></div>${renderComponent($$result, "WebhooksManager", WebhooksManager, {
|
|
287
|
+
"client:load": true,
|
|
288
|
+
"data-astro-cid-lncier6f": true,
|
|
289
|
+
"client:component-hydration": "load",
|
|
290
|
+
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/apps/settings/WebhooksManager.tsx",
|
|
291
|
+
"client:component-export": "WebhooksManager"
|
|
292
|
+
})}</div>` })}`;
|
|
293
|
+
}, "/home/runner/work/cms/cms/apps/admin/src/pages/settings/webhooks.astro", void 0);
|
|
294
|
+
var $$file = "/home/runner/work/cms/cms/apps/admin/src/pages/settings/webhooks.astro";
|
|
295
|
+
var $$url = "/settings/webhooks";
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region \0virtual:astro:page:src/pages/settings/webhooks@_@astro
|
|
298
|
+
var page = () => webhooks_exports;
|
|
299
|
+
//#endregion
|
|
300
|
+
export { page };
|
|
@@ -7,6 +7,7 @@ var layout = {
|
|
|
7
7
|
"content": "Ọrọ̀",
|
|
8
8
|
"media": "Mídia",
|
|
9
9
|
"users": "Onítójú",
|
|
10
|
+
"menus": "Àwọn Àkójọ",
|
|
10
11
|
"settings": "Ẹ̀tọ́",
|
|
11
12
|
"plugins": "Àfikún",
|
|
12
13
|
"themes": "Àwọn àkòrí"
|
|
@@ -122,7 +123,25 @@ var content = {
|
|
|
122
123
|
"inspectTypes": "Wó Àwọn Eya Tí WòŃpàtí",
|
|
123
124
|
"save": "Fifipamọ́",
|
|
124
125
|
"saved": "Ọrọ̀ ti fifipamọ́ lóríire."
|
|
125
|
-
}
|
|
126
|
+
},
|
|
127
|
+
"taxonomy": { "editTerm": "Ṣàtúnṣe ọ̀rọ̀" }
|
|
128
|
+
};
|
|
129
|
+
var menus = {
|
|
130
|
+
"title": "Àwọn Àkójọ",
|
|
131
|
+
"description": "Ṣẹ̀dá àti ṣàkóso àwọn àkójọ ìrìnàjò ojúlé rẹ.",
|
|
132
|
+
"hint": "Àwọn àkójọ yàtọ̀ sí irú akoonu, ó sì lè jẹ́ afihàn nipasẹ akori.",
|
|
133
|
+
"new": "Àkójọ tuntun",
|
|
134
|
+
"create": "Ṣẹ̀dá àkójọ",
|
|
135
|
+
"edit": "Ṣàtúnṣe àkójọ",
|
|
136
|
+
"name": "Orúkọ",
|
|
137
|
+
"slug": "Slug",
|
|
138
|
+
"items": "Àwọn ohun àkójọ (JSON)",
|
|
139
|
+
"itemsHint": "Lo àkójọpọ̀ JSON ti àwọn ohun àkójọ.",
|
|
140
|
+
"invalidItems": "Àwọn ohun àkójọ gbọ́dọ̀ jẹ́ àkójọpọ̀ JSON tó tọ́.",
|
|
141
|
+
"saved": "A ti fipamọ́ àkójọ.",
|
|
142
|
+
"deleted": "A ti pa àkójọ rẹ́.",
|
|
143
|
+
"empty": "Kò sí àkójọ sibẹ̀.",
|
|
144
|
+
"confirmDelete": "Pa àkójọ \"{name}\" rẹ́?"
|
|
126
145
|
};
|
|
127
146
|
var media = {
|
|
128
147
|
"title": "Ìwé Mídia",
|
|
@@ -395,6 +414,7 @@ var yo_default = {
|
|
|
395
414
|
layout,
|
|
396
415
|
dashboard,
|
|
397
416
|
content,
|
|
417
|
+
menus,
|
|
398
418
|
media,
|
|
399
419
|
users,
|
|
400
420
|
settings,
|
|
@@ -407,4 +427,4 @@ var yo_default = {
|
|
|
407
427
|
screenOptions
|
|
408
428
|
};
|
|
409
429
|
//#endregion
|
|
410
|
-
export { activity, adminBar, common, content, dashboard, yo_default as default, footer, helpTabs, layout, login, media, screenOptions, settings, users };
|
|
430
|
+
export { activity, adminBar, common, content, dashboard, yo_default as default, footer, helpTabs, layout, login, media, menus, screenOptions, settings, users };
|
|
@@ -7,6 +7,7 @@ var layout = {
|
|
|
7
7
|
"content": "内容",
|
|
8
8
|
"media": "媒体库",
|
|
9
9
|
"users": "用户",
|
|
10
|
+
"menus": "菜单",
|
|
10
11
|
"settings": "设置",
|
|
11
12
|
"plugins": "插件",
|
|
12
13
|
"themes": "主题"
|
|
@@ -122,7 +123,25 @@ var content = {
|
|
|
122
123
|
"inspectTypes": "查看可用类型",
|
|
123
124
|
"save": "保存",
|
|
124
125
|
"saved": "内容保存成功。"
|
|
125
|
-
}
|
|
126
|
+
},
|
|
127
|
+
"taxonomy": { "editTerm": "编辑术语" }
|
|
128
|
+
};
|
|
129
|
+
var menus = {
|
|
130
|
+
"title": "菜单",
|
|
131
|
+
"description": "创建和管理网站使用的导航菜单。",
|
|
132
|
+
"hint": "菜单独立于内容类型,可由主题进行渲染。",
|
|
133
|
+
"new": "新建菜单",
|
|
134
|
+
"create": "创建菜单",
|
|
135
|
+
"edit": "编辑菜单",
|
|
136
|
+
"name": "名称",
|
|
137
|
+
"slug": "别名",
|
|
138
|
+
"items": "菜单项 (JSON)",
|
|
139
|
+
"itemsHint": "使用菜单项对象组成的 JSON 数组。",
|
|
140
|
+
"invalidItems": "菜单项必须是有效的 JSON 数组。",
|
|
141
|
+
"saved": "菜单已保存。",
|
|
142
|
+
"deleted": "菜单已删除。",
|
|
143
|
+
"empty": "暂无菜单。",
|
|
144
|
+
"confirmDelete": "删除菜单“{name}”?"
|
|
126
145
|
};
|
|
127
146
|
var media = {
|
|
128
147
|
"title": "媒体库",
|
|
@@ -395,6 +414,7 @@ var zh_CN_default = {
|
|
|
395
414
|
layout,
|
|
396
415
|
dashboard,
|
|
397
416
|
content,
|
|
417
|
+
menus,
|
|
398
418
|
media,
|
|
399
419
|
users,
|
|
400
420
|
settings,
|
|
@@ -407,4 +427,4 @@ var zh_CN_default = {
|
|
|
407
427
|
screenOptions
|
|
408
428
|
};
|
|
409
429
|
//#endregion
|
|
410
|
-
export { activity, adminBar, common, content, dashboard, zh_CN_default as default, footer, helpTabs, layout, login, media, screenOptions, settings, users };
|
|
430
|
+
export { activity, adminBar, common, content, dashboard, zh_CN_default as default, footer, helpTabs, layout, login, media, menus, screenOptions, settings, users };
|