@oktis-works/admin 0.4.18 → 0.4.20
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.BQVQr1OI.js → ActivityWidget.BbEtaaM-.js} +2 -2
- package/dist/client/_astro/{AdminBar.CeAqY2Nn.js → AdminBar.CU2eba2D.js} +2 -2
- package/dist/client/_astro/{AtGlanceWidget.ClnyPmqR.js → AtGlanceWidget.C1hpeDlx.js} +1 -1
- package/dist/client/_astro/{BaseLayout.B3A9-IS6.css → BaseLayout.Y8xW22CP.css} +1 -1
- package/dist/client/_astro/ContentEditor.Bc5Jq8Dv.js +1 -0
- package/dist/client/_astro/ContentEditor.DvpaqJBD.js +3 -0
- package/dist/client/_astro/ContentTypeWorkspace.DakVi21h.js +1 -0
- package/dist/client/_astro/{CustomFieldsManager.BZAwLlD7.js → CustomFieldsManager.B7WOTvb7.js} +1 -1
- package/dist/client/_astro/DashboardHome.CUfuLLDH.js +1 -0
- package/dist/client/_astro/DashboardLayout.CGou4voc.css +1 -0
- package/dist/client/_astro/DashboardLayout.astro_astro_type_script_index_0_lang.Dpnx6U2l.js +4 -0
- package/dist/client/_astro/{Footer.B8DQezwj.js → Footer.rUGgtlfI.js} +1 -1
- package/dist/client/_astro/{GeneralSettings.DzzIY4EJ.js → GeneralSettings.C4mnJ7P2.js} +1 -1
- package/dist/client/_astro/{MediaLibrary.CB2vN3WX.js → MediaLibrary.2geQYfXB.js} +1 -1
- package/dist/client/_astro/{PluginManager.CZnOmZ4H.js → PluginManager.D3pm88iu.js} +1 -1
- package/dist/client/_astro/PostTypesManager.Cyhr3VEJ.js +1 -0
- package/dist/client/_astro/{QuickDraftWidget.B8sKln0S.js → QuickDraftWidget.CPljoS31.js} +2 -2
- package/dist/client/_astro/{ResourceHubs.gibltbet.js → ResourceHubs.DpCJERsJ.js} +1 -1
- package/dist/client/_astro/{TaxonomiesManager.BVGc-hS0.js → TaxonomiesManager.P3bc-fnu.js} +1 -1
- package/dist/client/_astro/TaxonomyTermsManager.BxP9gwm7.js +1 -0
- package/dist/client/_astro/{ThemeManager.b7xZdz4_.js → ThemeManager.3MUOwqex.js} +1 -1
- package/dist/client/_astro/{UserCreateForm.By8e9stC.js → UserCreateForm.C3RiEJEa.js} +1 -1
- package/dist/client/_astro/{UsersManager.M8WCxyOI.js → UsersManager.DR9XR3FX.js} +1 -1
- package/dist/client/_astro/api.25OAsWO0.js +1 -0
- package/dist/client/_astro/{ar.DsV0P0EN.js → ar.CwC9hXB9.js} +1 -1
- package/dist/client/_astro/{es-ES.etPSaiLd.js → es-ES.qNcd-cVX.js} +1 -1
- package/dist/client/_astro/{extensions.BC-nLC12.js → extensions.Bj86CHnv.js} +1 -1
- package/dist/client/_astro/{he.U1Vtp3zT.js → he.DfZ0ZzM-.js} +1 -1
- package/dist/client/_astro/i18n.C24_pkIi.js +1 -0
- package/dist/client/_astro/{it.DJuI8oO_.js → it.PFmLQj2s.js} +1 -1
- package/dist/client/_astro/{ja.Cw8I_NUV.js → ja.CMi5cD8g.js} +1 -1
- package/dist/client/_astro/{login.astro_astro_type_script_index_0_lang.BPE3sVZJ.js → login.astro_astro_type_script_index_0_lang.O-AlzgHd.js} +1 -1
- package/dist/client/_astro/{pl.Dsz-4G_z.js → pl.CRExzLlj.js} +1 -1
- package/dist/client/_astro/pt-BR.BPvwNpKR.js +1 -0
- package/dist/client/_astro/{ru.CwIIcTdy.js → ru.CWV-tkZ3.js} +1 -1
- package/dist/client/_astro/{src.DmjGg1I5.js → src.Cq47pnsg.js} +1 -1
- package/dist/client/_astro/{sw.DwpL3sb6.js → sw.B5x6GU4s.js} +1 -1
- package/dist/client/_astro/{tr.CY2JWJ7Y.js → tr.BzxCGQu8.js} +1 -1
- package/dist/client/_astro/{uk.BudEWIU8.js → uk.DJHMwNRU.js} +1 -1
- package/dist/client/_astro/{version.CACx_Y2G.js → version.BQq07lEn.js} +1 -1
- package/dist/client/_astro/{yo.BmoZs0fO.js → yo.DNw_hOnW.js} +1 -1
- package/dist/client/_astro/{zh-CN.khaXV6fv.js → zh-CN.Bs7H6Unx.js} +1 -1
- package/dist/server/chunks/{ContentEditor_RKGob-Zo.mjs → ContentEditor_DS7flRjR.mjs} +432 -89
- package/dist/server/chunks/{DashboardLayout_svhEj8jj.mjs → DashboardLayout_09DepSVn.mjs} +8 -8
- package/dist/server/chunks/{MediaLibrary_BCzLRYs6.mjs → MediaLibrary_Xs09kLza.mjs} +2 -2
- package/dist/server/chunks/{ResourceHubs_BH3vCwma.mjs → ResourceHubs_Dwb0xyPZ.mjs} +1 -1
- package/dist/server/chunks/{_slug__qrjLegLj.mjs → _slug__l8CTaLpP.mjs} +1 -1
- package/dist/server/chunks/{access_DSLRN3qH.mjs → access_D93W5BWD.mjs} +2 -2
- package/dist/server/chunks/{ar_DMC8HaoP.mjs → ar_B0LfQbpu.mjs} +1 -1
- package/dist/server/chunks/{custom-fields_BwLtNm1t.mjs → custom-fields_Dp7DHJ0M.mjs} +2 -2
- package/dist/server/chunks/{edit_CmOvfpRE.mjs → edit_hSCrM2Gq.mjs} +12 -10
- package/dist/server/chunks/{es-ES_DZvHskAD.mjs → es-ES_dBEm2FNw.mjs} +1 -1
- package/dist/server/chunks/{general_DDYnR_op.mjs → general_Ct9MU7b-.mjs} +2 -2
- package/dist/server/chunks/{he_zy3stNhR.mjs → he_DRWoI1A5.mjs} +1 -1
- package/dist/server/chunks/{i18n_BKVjk7jX.mjs → i18n_BqFK0MIW.mjs} +64 -15
- package/dist/server/chunks/{index_eYmi9sSz.mjs → index_B77wdzK2.mjs} +1 -1
- package/dist/server/chunks/{index_w8inlUI7.mjs → index_CBfRX_VO.mjs} +93 -45
- package/dist/server/chunks/{index_DBrNG14W.mjs → index_Cv2j9xC_.mjs} +5 -5
- package/dist/server/chunks/{index_DdCS_Yn8.mjs → index_DQ5pFuPN.mjs} +2 -2
- package/dist/server/chunks/{index_BTLdKNys.mjs → index_uv0IHg8r.mjs} +2 -2
- package/dist/server/chunks/{it_BiUDLszZ.mjs → it_BDY3lerP.mjs} +1 -1
- package/dist/server/chunks/{ja_DjFAG7hL.mjs → ja_C-EybQiV.mjs} +1 -1
- package/dist/server/chunks/{login_xmDNRy6-.mjs → login_D-Z6bo6E.mjs} +1 -1
- package/dist/server/chunks/{new_QzmF9JQw.mjs → new_DpJfTahF.mjs} +2 -2
- package/dist/server/chunks/{new_BeqZaUZk.mjs → new_XOnqlHm3.mjs} +12 -10
- package/dist/server/chunks/{operations_CzDlpc-d.mjs → operations_0sYvzzNC.mjs} +2 -2
- package/dist/server/chunks/{pl_0Xe9Qom2.mjs → pl_DH5LKmVG.mjs} +1 -1
- package/dist/server/chunks/{plugins_Df0WEWyi.mjs → plugins_Clk92l6Q.mjs} +2 -2
- package/dist/server/chunks/{post-types_7UOUQOdJ.mjs → post-types_DziideHh.mjs} +40 -14
- package/dist/server/chunks/{pt-BR_DIZpU2Mk.mjs → pt-BR_CBnqy3xP.mjs} +47 -2
- package/dist/server/chunks/{resources_D5QYgIOn.mjs → resources_dPTDnpAf.mjs} +2 -2
- package/dist/server/chunks/{ru_DFvIxd0Y.mjs → ru_CFa1xYFr.mjs} +1 -1
- package/dist/server/chunks/{sw_CmaPgGYa.mjs → sw_QZf7NSsI.mjs} +1 -1
- package/dist/server/chunks/{taxonomies_DIuTYSy1.mjs → taxonomies_Bc6xPaKp.mjs} +2 -2
- package/dist/server/chunks/taxonomy_Cv4_KTTL.mjs +152 -0
- package/dist/server/chunks/{themes_DAbb-26x.mjs → themes_BRtDtEK7.mjs} +2 -2
- package/dist/server/chunks/{tr_B_acwl2e.mjs → tr_Fjry5R-K.mjs} +1 -1
- package/dist/server/chunks/{uk_DXnk4imL.mjs → uk_Bxc3qY45.mjs} +1 -1
- package/dist/server/chunks/{upload_Bbn1yjFV.mjs → upload_CB_L9tkU.mjs} +2 -2
- package/dist/server/chunks/{yo_DDQ8a-0v.mjs → yo_BARL-Qrh.mjs} +1 -1
- package/dist/server/chunks/{zh-CN_763uzTMQ.mjs → zh-CN_CkjPJL88.mjs} +1 -1
- package/dist/server/entry.mjs +129 -74
- package/dist/server/virtual_astro_middleware.mjs +1 -1
- package/package.json +6 -5
- package/dist/client/_astro/ContentEditor.CNU6JpC2.js +0 -1
- package/dist/client/_astro/ContentList.CND9xLTq.js +0 -1
- package/dist/client/_astro/DashboardHome.DYshyax_.js +0 -1
- package/dist/client/_astro/DashboardLayout.CUyl_vSg.css +0 -1
- package/dist/client/_astro/DashboardLayout.astro_astro_type_script_index_0_lang.D6MgCJGl.js +0 -1
- package/dist/client/_astro/PostTypesManager.QU-bDofy.js +0 -1
- package/dist/client/_astro/api.DD5u5p4h.js +0 -1
- package/dist/client/_astro/i18n.sRt_iZ5u.js +0 -1
- package/dist/client/_astro/pt-BR.CyQAHnXs.js +0 -1
- /package/dist/server/chunks/{BaseLayout_D1PbsjNG.mjs → BaseLayout_m8b8Eemd.mjs} +0 -0
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
5
|
-
import { c as Select, i as Card, n as Badge, o as Input, r as Button, s as Pagination, t as $$DashboardLayout, u as Table } from "./
|
|
6
|
-
import {
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BqFK0MIW.mjs";
|
|
5
|
+
import { c as Select, i as Card, n as Badge, o as Input, r as Button, s as Pagination, t as $$DashboardLayout, u as Table } from "./DashboardLayout_09DepSVn.mjs";
|
|
6
|
+
import { t as ContentEditor } from "./ContentEditor_DS7flRjR.mjs";
|
|
7
|
+
import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
7
8
|
import { Show, createMemo, createSignal, onMount } from "solid-js";
|
|
8
9
|
//#region src/components/content/ContentList.tsx
|
|
9
|
-
var _tmpl
|
|
10
|
+
var _tmpl$$1 = [
|
|
10
11
|
"<span",
|
|
11
12
|
" class=\"muted\">",
|
|
12
13
|
"</span>"
|
|
13
14
|
];
|
|
14
|
-
var _tmpl$2 = [
|
|
15
|
+
var _tmpl$2$1 = [
|
|
15
16
|
"<div",
|
|
16
17
|
" class=\"users-table__actions\"><a class=\"btn btn-secondary btn-sm\" href=\"",
|
|
17
18
|
"\">",
|
|
@@ -31,13 +32,15 @@ var _tmpl$4 = [
|
|
|
31
32
|
];
|
|
32
33
|
var _tmpl$5 = [
|
|
33
34
|
"<div",
|
|
34
|
-
" class=\"content-list\"
|
|
35
|
+
" class=\"content-list\"><div class=\"content-list__heading\"><div><h2>",
|
|
36
|
+
"</h2><p class=\"muted\">",
|
|
37
|
+
"</p></div><a class=\"btn btn-primary\"",
|
|
38
|
+
">",
|
|
39
|
+
"</a></div><!--$-->",
|
|
35
40
|
"<!--/--><!--$-->",
|
|
36
41
|
"<!--/--><div class=\"toolbar\"><!--$-->",
|
|
37
42
|
"<!--/--><!--$-->",
|
|
38
43
|
"<!--/--><!--$-->",
|
|
39
|
-
"<!--/--><a class=\"btn btn-primary\" href=\"/content/new\">",
|
|
40
|
-
"</a><!--$-->",
|
|
41
44
|
"<!--/--></div><!--$-->",
|
|
42
45
|
"<!--/--></div>"
|
|
43
46
|
];
|
|
@@ -50,14 +53,14 @@ function formatDate(row) {
|
|
|
50
53
|
const date = new Date(value);
|
|
51
54
|
return Number.isNaN(date.getTime()) ? "—" : date.toLocaleString("pt-BR");
|
|
52
55
|
}
|
|
53
|
-
function ContentList() {
|
|
56
|
+
function ContentList(props) {
|
|
54
57
|
const { t } = useTranslation();
|
|
55
58
|
const [items, setItems] = createSignal([]);
|
|
56
59
|
const [types, setTypes] = createSignal([]);
|
|
57
60
|
const [total, setTotal] = createSignal(0);
|
|
58
61
|
const [page, setPage] = createSignal(1);
|
|
59
62
|
const [search, setSearch] = createSignal("");
|
|
60
|
-
const [type
|
|
63
|
+
const [type] = createSignal(props.contentType);
|
|
61
64
|
const [status, setStatus] = createSignal("");
|
|
62
65
|
const [error, setError] = createSignal("");
|
|
63
66
|
const [info, setInfo] = createSignal("");
|
|
@@ -79,11 +82,17 @@ function ContentList() {
|
|
|
79
82
|
}
|
|
80
83
|
};
|
|
81
84
|
onMount(async () => {
|
|
85
|
+
const query = new URLSearchParams(window.location.search);
|
|
86
|
+
setStatus(query.get("status") ?? "");
|
|
87
|
+
setSearch(query.get("search") ?? "");
|
|
82
88
|
await load();
|
|
83
89
|
try {
|
|
84
90
|
setTypes(await apiClient.getContentTypes());
|
|
85
91
|
} catch {}
|
|
86
92
|
});
|
|
93
|
+
const activeType = createMemo(() => types().find((entry) => entry.slug === type()));
|
|
94
|
+
const pageTitle = createMemo(() => activeType()?.pluralLabel || t("content.list.title"));
|
|
95
|
+
const newContentHref = createMemo(() => `/content/${encodeURIComponent(type())}/new`);
|
|
87
96
|
const searchNow = async () => {
|
|
88
97
|
setPage(1);
|
|
89
98
|
await load();
|
|
@@ -136,7 +145,7 @@ function ContentList() {
|
|
|
136
145
|
{
|
|
137
146
|
key: "updated_at",
|
|
138
147
|
label: t("content.list.columns.updated"),
|
|
139
|
-
render: (_value, row) => ssr(_tmpl
|
|
148
|
+
render: (_value, row) => ssr(_tmpl$$1, ssrHydrationKey(), escape(formatDate(row)))
|
|
140
149
|
},
|
|
141
150
|
{
|
|
142
151
|
key: "actions",
|
|
@@ -144,7 +153,7 @@ function ContentList() {
|
|
|
144
153
|
render: (_value, row) => {
|
|
145
154
|
const content = row;
|
|
146
155
|
const isPublished = raw(content)["status"] === "PUBLISHED";
|
|
147
|
-
return ssr(_tmpl$2, ssrHydrationKey(), `/content/edit?id=${escape(encodeURIComponent(content.id), true)}`, escape(t("content.list.actions.edit")), escape(createComponent(Button, {
|
|
156
|
+
return ssr(_tmpl$2$1, ssrHydrationKey(), `/content/${escape(encodeURIComponent(content.type || type()), true)}/edit?id=${escape(encodeURIComponent(content.id), true)}`, escape(t("content.list.actions.edit")), escape(createComponent(Button, {
|
|
148
157
|
variant: isPublished ? "secondary" : "primary",
|
|
149
158
|
size: "sm",
|
|
150
159
|
get loading() {
|
|
@@ -165,7 +174,7 @@ function ContentList() {
|
|
|
165
174
|
}
|
|
166
175
|
}
|
|
167
176
|
]);
|
|
168
|
-
return ssr(_tmpl$5, ssrHydrationKey(), escape(createComponent(Show, {
|
|
177
|
+
return ssr(_tmpl$5, ssrHydrationKey(), escape(pageTitle()), escape(t("content.list.description")), ssrAttribute("href", escape(newContentHref(), true), false), escape(t("content.list.buttons.addNew")), escape(createComponent(Show, {
|
|
169
178
|
get when() {
|
|
170
179
|
return error();
|
|
171
180
|
},
|
|
@@ -191,24 +200,6 @@ function ContentList() {
|
|
|
191
200
|
setSearch(value);
|
|
192
201
|
searchNow();
|
|
193
202
|
}
|
|
194
|
-
})), escape(createComponent(Select, {
|
|
195
|
-
name: "type",
|
|
196
|
-
get placeholder() {
|
|
197
|
-
return t("content.list.filters.allTypes");
|
|
198
|
-
},
|
|
199
|
-
get value() {
|
|
200
|
-
return type();
|
|
201
|
-
},
|
|
202
|
-
get options() {
|
|
203
|
-
return types().map((t) => ({
|
|
204
|
-
value: t.slug,
|
|
205
|
-
label: t.pluralLabel || t.name
|
|
206
|
-
}));
|
|
207
|
-
},
|
|
208
|
-
onChange: (value) => {
|
|
209
|
-
setType(value);
|
|
210
|
-
searchNow();
|
|
211
|
-
}
|
|
212
203
|
})), escape(createComponent(Select, {
|
|
213
204
|
name: "status",
|
|
214
205
|
get placeholder() {
|
|
@@ -237,7 +228,7 @@ function ContentList() {
|
|
|
237
228
|
setStatus(value);
|
|
238
229
|
searchNow();
|
|
239
230
|
}
|
|
240
|
-
})), escape(
|
|
231
|
+
})), escape(createComponent(Button, {
|
|
241
232
|
variant: "secondary",
|
|
242
233
|
onClick: () => void searchNow(),
|
|
243
234
|
get children() {
|
|
@@ -270,8 +261,63 @@ function ContentList() {
|
|
|
270
261
|
} })));
|
|
271
262
|
}
|
|
272
263
|
//#endregion
|
|
273
|
-
//#region src/
|
|
274
|
-
var
|
|
264
|
+
//#region src/components/content/ContentTypeWorkspace.tsx
|
|
265
|
+
var _tmpl$ = [
|
|
266
|
+
"<div",
|
|
267
|
+
" class=\"notice notice--error\">",
|
|
268
|
+
"</div>"
|
|
269
|
+
];
|
|
270
|
+
var _tmpl$2 = [
|
|
271
|
+
"<div",
|
|
272
|
+
" class=\"card\">",
|
|
273
|
+
"</div>"
|
|
274
|
+
];
|
|
275
|
+
function ContentTypeWorkspace(props) {
|
|
276
|
+
const { t } = useTranslation();
|
|
277
|
+
const [type, setType] = createSignal(null);
|
|
278
|
+
const [error, setError] = createSignal("");
|
|
279
|
+
onMount(async () => {
|
|
280
|
+
try {
|
|
281
|
+
const match = (await apiClient.getContentTypes()).find((entry) => entry.slug === props.contentType);
|
|
282
|
+
if (!match) {
|
|
283
|
+
setError(t("content.list.typeNotFound"));
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
setType(match);
|
|
287
|
+
} catch (err) {
|
|
288
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
return createComponent(Show, {
|
|
292
|
+
get when() {
|
|
293
|
+
return type();
|
|
294
|
+
},
|
|
295
|
+
get fallback() {
|
|
296
|
+
return memo(() => !!error())() ? ssr(_tmpl$, ssrHydrationKey(), escape(error())) : ssr(_tmpl$2, ssrHydrationKey(), escape(t("common.loading")));
|
|
297
|
+
},
|
|
298
|
+
children: (current) => createComponent(Show, {
|
|
299
|
+
get when() {
|
|
300
|
+
return current().singleton;
|
|
301
|
+
},
|
|
302
|
+
get fallback() {
|
|
303
|
+
return createComponent(ContentList, { get contentType() {
|
|
304
|
+
return current().slug;
|
|
305
|
+
} });
|
|
306
|
+
},
|
|
307
|
+
get children() {
|
|
308
|
+
return createComponent(ContentEditor, {
|
|
309
|
+
get initialType() {
|
|
310
|
+
return current().slug;
|
|
311
|
+
},
|
|
312
|
+
singleton: true
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
})
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region src/pages/content/[type]/index.astro
|
|
320
|
+
var _type__exports = /* @__PURE__ */ __exportAll({
|
|
275
321
|
default: () => $$Index,
|
|
276
322
|
file: () => $$file,
|
|
277
323
|
url: () => $$url
|
|
@@ -281,21 +327,23 @@ var $$Index = createComponent$1(($$result, $$props, $$slots) => {
|
|
|
281
327
|
const Astro = $$result.createAstro($$props, $$slots);
|
|
282
328
|
Astro.self = $$Index;
|
|
283
329
|
const { t } = Astro.locals;
|
|
330
|
+
const contentType = Astro.params.type ?? "post";
|
|
284
331
|
return renderTemplate`${renderComponent($$result, "DashboardLayout", $$DashboardLayout, {
|
|
285
|
-
"title":
|
|
286
|
-
"data-astro-cid-
|
|
287
|
-
}, { "default": ($$result) => renderTemplate`${maybeRenderHead($$result)}<div class="content-
|
|
332
|
+
"title": contentType,
|
|
333
|
+
"data-astro-cid-znq2nu33": true
|
|
334
|
+
}, { "default": ($$result) => renderTemplate`${maybeRenderHead($$result)}<div class="content-type-page" data-astro-cid-znq2nu33>${renderComponent($$result, "ContentTypeWorkspace", ContentTypeWorkspace, {
|
|
288
335
|
"client:load": true,
|
|
289
|
-
"
|
|
336
|
+
"contentType": contentType,
|
|
337
|
+
"data-astro-cid-znq2nu33": true,
|
|
290
338
|
"client:component-hydration": "load",
|
|
291
|
-
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/content/
|
|
292
|
-
"client:component-export": "
|
|
339
|
+
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/content/ContentTypeWorkspace.tsx",
|
|
340
|
+
"client:component-export": "ContentTypeWorkspace"
|
|
293
341
|
})}</div>` })}`;
|
|
294
|
-
}, "/home/runner/work/cms/cms/apps/admin/src/pages/content/index.astro", void 0);
|
|
295
|
-
var $$file = "/home/runner/work/cms/cms/apps/admin/src/pages/content/index.astro";
|
|
296
|
-
var $$url = "/content";
|
|
342
|
+
}, "/home/runner/work/cms/cms/apps/admin/src/pages/content/[type]/index.astro", void 0);
|
|
343
|
+
var $$file = "/home/runner/work/cms/cms/apps/admin/src/pages/content/[type]/index.astro";
|
|
344
|
+
var $$url = "/content/[type]";
|
|
297
345
|
//#endregion
|
|
298
|
-
//#region \0virtual:astro:page:src/pages/content/index@_@astro
|
|
299
|
-
var page = () =>
|
|
346
|
+
//#region \0virtual:astro:page:src/pages/content/[type]/index@_@astro
|
|
347
|
+
var page = () => _type__exports;
|
|
300
348
|
//#endregion
|
|
301
349
|
export { page };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BqFK0MIW.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_09DepSVn.mjs";
|
|
6
6
|
import { createComponent, escape, ssr, ssrHydrationKey } from "solid-js/web";
|
|
7
7
|
import { For, Show, createSignal, onMount } from "solid-js";
|
|
8
8
|
//#region src/components/apps/dashboard/DashboardHome.tsx
|
|
@@ -34,7 +34,7 @@ var _tmpl$3 = [
|
|
|
34
34
|
"</p></div><div class=\"card stat-card\"><h3 class=\"stat-label\">",
|
|
35
35
|
"</h3><p class=\"stat-value\">",
|
|
36
36
|
"</p></div></div><div class=\"card\"><div class=\"card-header\"><h3>",
|
|
37
|
-
"</h3><a href=\"/content\" class=\"btn btn-secondary btn-sm\">",
|
|
37
|
+
"</h3><a href=\"/content/post\" class=\"btn btn-secondary btn-sm\">",
|
|
38
38
|
"</a></div><!--$-->",
|
|
39
39
|
"<!--/--></div></div>"
|
|
40
40
|
];
|
|
@@ -117,7 +117,7 @@ function DashboardHome() {
|
|
|
117
117
|
get each() {
|
|
118
118
|
return recent();
|
|
119
119
|
},
|
|
120
|
-
children: (row) => ssr(_tmpl$5, ssrHydrationKey(), `/content/edit?id=${escape(encodeURIComponent(String(raw(row)["id"] ?? "")), true)}`, escape(String(raw(row)["title"] ?? "—")), escape(String(raw(row)["type"] ?? "—")), escape(String(raw(row)["status"] ?? "—")), escape(formatDate(row)))
|
|
120
|
+
children: (row) => ssr(_tmpl$5, ssrHydrationKey(), `/content/${escape(encodeURIComponent(String(raw(row)["type"] ?? "post")), true)}/edit?id=${escape(encodeURIComponent(String(raw(row)["id"] ?? "")), true)}`, escape(String(raw(row)["title"] ?? "—")), escape(String(raw(row)["type"] ?? "—")), escape(String(raw(row)["status"] ?? "—")), escape(formatDate(row)))
|
|
121
121
|
})));
|
|
122
122
|
}
|
|
123
123
|
})));
|
|
@@ -143,7 +143,7 @@ var $$Index = createComponent$1(($$result, $$props, $$slots) => {
|
|
|
143
143
|
"client:component-hydration": "load",
|
|
144
144
|
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/apps/dashboard/DashboardHome.tsx",
|
|
145
145
|
"client:component-export": "DashboardHome"
|
|
146
|
-
})}<div class="quick-actions" data-astro-cid-lcdefpme><div class="card" data-astro-cid-lcdefpme><h3 class="card-header" data-astro-cid-lcdefpme>${t("layout.actions.newPost")}</h3><div class="actions-grid" data-astro-cid-lcdefpme><a href="/content/new" class="action-card" data-astro-cid-lcdefpme><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-lcdefpme><line x1="12" y1="5" x2="12" y2="19" data-astro-cid-lcdefpme></line><line x1="5" y1="12" x2="19" y2="12" data-astro-cid-lcdefpme></line></svg><span data-astro-cid-lcdefpme>${t("layout.actions.newPost")}</span></a><a href="/media/upload" class="action-card" data-astro-cid-lcdefpme><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-lcdefpme><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" data-astro-cid-lcdefpme></path><polyline points="17 8 12 3 7 8" data-astro-cid-lcdefpme></polyline><line x1="12" y1="3" x2="12" y2="15" data-astro-cid-lcdefpme></line></svg><span data-astro-cid-lcdefpme>${t("layout.actions.uploadMedia")}</span></a><a href="/users/new" class="action-card" data-astro-cid-lcdefpme><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-lcdefpme><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" data-astro-cid-lcdefpme></path><circle cx="8.5" cy="7" r="4" data-astro-cid-lcdefpme></circle><line x1="20" y1="8" x2="20" y2="14" data-astro-cid-lcdefpme></line><line x1="23" y1="11" x2="17" y2="11" data-astro-cid-lcdefpme></line></svg><span data-astro-cid-lcdefpme>${t("layout.actions.addUser")}</span></a><a href="/settings" class="action-card" data-astro-cid-lcdefpme><span class="settings-action-icon" aria-hidden="true" data-astro-cid-lcdefpme><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-lcdefpme><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" data-astro-cid-lcdefpme></path><circle cx="12" cy="12" r="3" data-astro-cid-lcdefpme></circle></svg></span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-lcdefpme><circle cx="12" cy="12" r="3" data-astro-cid-lcdefpme></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" data-astro-cid-lcdefpme></path></svg><span data-astro-cid-lcdefpme>${t("layout.actions.openSettings")}</span></a></div></div></div></div>` })}`;
|
|
146
|
+
})}<div class="quick-actions" data-astro-cid-lcdefpme><div class="card" data-astro-cid-lcdefpme><h3 class="card-header" data-astro-cid-lcdefpme>${t("layout.actions.newPost")}</h3><div class="actions-grid" data-astro-cid-lcdefpme><a href="/content/post/new" class="action-card" data-astro-cid-lcdefpme><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-lcdefpme><line x1="12" y1="5" x2="12" y2="19" data-astro-cid-lcdefpme></line><line x1="5" y1="12" x2="19" y2="12" data-astro-cid-lcdefpme></line></svg><span data-astro-cid-lcdefpme>${t("layout.actions.newPost")}</span></a><a href="/media/upload" class="action-card" data-astro-cid-lcdefpme><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-lcdefpme><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" data-astro-cid-lcdefpme></path><polyline points="17 8 12 3 7 8" data-astro-cid-lcdefpme></polyline><line x1="12" y1="3" x2="12" y2="15" data-astro-cid-lcdefpme></line></svg><span data-astro-cid-lcdefpme>${t("layout.actions.uploadMedia")}</span></a><a href="/users/new" class="action-card" data-astro-cid-lcdefpme><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-lcdefpme><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" data-astro-cid-lcdefpme></path><circle cx="8.5" cy="7" r="4" data-astro-cid-lcdefpme></circle><line x1="20" y1="8" x2="20" y2="14" data-astro-cid-lcdefpme></line><line x1="23" y1="11" x2="17" y2="11" data-astro-cid-lcdefpme></line></svg><span data-astro-cid-lcdefpme>${t("layout.actions.addUser")}</span></a><a href="/settings" class="action-card" data-astro-cid-lcdefpme><span class="settings-action-icon" aria-hidden="true" data-astro-cid-lcdefpme><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-lcdefpme><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" data-astro-cid-lcdefpme></path><circle cx="12" cy="12" r="3" data-astro-cid-lcdefpme></circle></svg></span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-lcdefpme><circle cx="12" cy="12" r="3" data-astro-cid-lcdefpme></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" data-astro-cid-lcdefpme></path></svg><span data-astro-cid-lcdefpme>${t("layout.actions.openSettings")}</span></a></div></div></div></div>` })}`;
|
|
147
147
|
}, "/home/runner/work/cms/cms/apps/admin/src/pages/index.astro", void 0);
|
|
148
148
|
var $$file = "/home/runner/work/cms/cms/apps/admin/src/pages/index.astro";
|
|
149
149
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
5
|
-
import { a as For2, c as Select, f as createSignal, l as Show2, n as Badge, o as Input, p as onMount, r as Button, s as Pagination, t as $$DashboardLayout } from "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BqFK0MIW.mjs";
|
|
5
|
+
import { a as For2, c as Select, f as createSignal, l as Show2, n as Badge, o as Input, p as onMount, r as Button, s as Pagination, t as $$DashboardLayout } from "./DashboardLayout_09DepSVn.mjs";
|
|
6
6
|
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
7
7
|
//#region src/components/apps/users/UsersManager.tsx
|
|
8
8
|
var _tmpl$ = [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { t as $$DashboardLayout } from "./
|
|
5
|
-
import { t as MediaLibrary } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_09DepSVn.mjs";
|
|
5
|
+
import { t as MediaLibrary } from "./MediaLibrary_Xs09kLza.mjs";
|
|
6
6
|
//#region src/pages/media/index.astro
|
|
7
7
|
var media_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
default: () => $$Index,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { n as renderScript, t as $$BaseLayout } from "./
|
|
4
|
+
import { n as renderScript, t as $$BaseLayout } from "./BaseLayout_m8b8Eemd.mjs";
|
|
5
5
|
//#region src/pages/login.astro
|
|
6
6
|
var login_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
default: () => $$Login,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BqFK0MIW.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_09DepSVn.mjs";
|
|
6
6
|
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
7
7
|
import { For, Show, createSignal, onMount } from "solid-js";
|
|
8
8
|
//#region src/components/apps/users/UserCreateForm.tsx
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { t as $$DashboardLayout } from "./
|
|
5
|
-
import { t as ContentEditor } from "./
|
|
6
|
-
//#region src/pages/content/new.astro
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_09DepSVn.mjs";
|
|
5
|
+
import { t as ContentEditor } from "./ContentEditor_DS7flRjR.mjs";
|
|
6
|
+
//#region src/pages/content/[type]/new.astro
|
|
7
7
|
var new_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
default: () => $$New,
|
|
9
9
|
file: () => $$file,
|
|
@@ -14,21 +14,23 @@ var $$New = createComponent(($$result, $$props, $$slots) => {
|
|
|
14
14
|
const Astro = $$result.createAstro($$props, $$slots);
|
|
15
15
|
Astro.self = $$New;
|
|
16
16
|
const { t } = Astro.locals;
|
|
17
|
+
const contentType = Astro.params.type ?? "post";
|
|
17
18
|
return renderTemplate`${renderComponent($$result, "DashboardLayout", $$DashboardLayout, {
|
|
18
19
|
"title": t("content.editor.save"),
|
|
19
|
-
"data-astro-cid-
|
|
20
|
-
}, { "default": ($$result) => renderTemplate`${maybeRenderHead($$result)}<div class="editor-page" data-astro-cid-
|
|
20
|
+
"data-astro-cid-5s5mludg": true
|
|
21
|
+
}, { "default": ($$result) => renderTemplate`${maybeRenderHead($$result)}<div class="editor-page" data-astro-cid-5s5mludg>${renderComponent($$result, "ContentEditor", ContentEditor, {
|
|
21
22
|
"client:load": true,
|
|
22
|
-
"
|
|
23
|
+
"initialType": contentType,
|
|
24
|
+
"data-astro-cid-5s5mludg": true,
|
|
23
25
|
"client:component-hydration": "load",
|
|
24
26
|
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/content/ContentEditor.tsx",
|
|
25
27
|
"client:component-export": "ContentEditor"
|
|
26
28
|
})}</div>` })}`;
|
|
27
|
-
}, "/home/runner/work/cms/cms/apps/admin/src/pages/content/new.astro", void 0);
|
|
28
|
-
var $$file = "/home/runner/work/cms/cms/apps/admin/src/pages/content/new.astro";
|
|
29
|
-
var $$url = "/content/new";
|
|
29
|
+
}, "/home/runner/work/cms/cms/apps/admin/src/pages/content/[type]/new.astro", void 0);
|
|
30
|
+
var $$file = "/home/runner/work/cms/cms/apps/admin/src/pages/content/[type]/new.astro";
|
|
31
|
+
var $$url = "/content/[type]/new";
|
|
30
32
|
//#endregion
|
|
31
|
-
//#region \0virtual:astro:page:src/pages/content/new@_@astro
|
|
33
|
+
//#region \0virtual:astro:page:src/pages/content/[type]/new@_@astro
|
|
32
34
|
var page = () => new_exports;
|
|
33
35
|
//#endregion
|
|
34
36
|
export { page };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { t as $$DashboardLayout } from "./
|
|
5
|
-
import { r as OperationsManager } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_09DepSVn.mjs";
|
|
5
|
+
import { r as OperationsManager } from "./ResourceHubs_Dwb0xyPZ.mjs";
|
|
6
6
|
//#region src/pages/settings/operations.astro
|
|
7
7
|
var operations_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
default: () => $$Operations,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BqFK0MIW.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_09DepSVn.mjs";
|
|
6
6
|
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
7
7
|
import { For, Show, createSignal, onMount } from "solid-js";
|
|
8
8
|
//#region src/components/apps/plugins/PluginManager.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BqFK0MIW.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_09DepSVn.mjs";
|
|
6
6
|
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
7
7
|
import { For, Show, createMemo, createSignal, onMount } from "solid-js";
|
|
8
8
|
//#region src/components/apps/settings/PostTypesManager.tsx
|
|
@@ -12,6 +12,11 @@ var _tmpl$ = [
|
|
|
12
12
|
"</div>"
|
|
13
13
|
];
|
|
14
14
|
var _tmpl$2 = [
|
|
15
|
+
"<button",
|
|
16
|
+
" type=\"button\" class=\"btn btn-secondary\">",
|
|
17
|
+
"</button>"
|
|
18
|
+
];
|
|
19
|
+
var _tmpl$3 = [
|
|
15
20
|
"<div",
|
|
16
21
|
" class=\"post-types-manager\"><!--$-->",
|
|
17
22
|
"<!--/--><form class=\"card\"><h3>",
|
|
@@ -21,13 +26,21 @@ var _tmpl$2 = [
|
|
|
21
26
|
"<!--/--><input class=\"input\" required",
|
|
22
27
|
"></label><label><!--$-->",
|
|
23
28
|
"<!--/--><input class=\"input\" required",
|
|
24
|
-
"></label
|
|
29
|
+
"></label><label><!--$-->",
|
|
30
|
+
"<!--/--><input class=\"input\"",
|
|
31
|
+
" placeholder=\"box\"><small class=\"muted\">",
|
|
32
|
+
"</small></label></div><fieldset class=\"supports\"><legend>",
|
|
25
33
|
"</legend><!--$-->",
|
|
26
34
|
"<!--/--><label><input type=\"checkbox\"",
|
|
27
35
|
"> <!--$-->",
|
|
36
|
+
"<!--/--></label><label><input type=\"checkbox\"",
|
|
37
|
+
"> <!--$-->",
|
|
28
38
|
"<!--/--></label></fieldset><button type=\"submit\" class=\"btn btn-primary\"",
|
|
29
39
|
">",
|
|
30
|
-
"</button
|
|
40
|
+
"</button><!--$-->",
|
|
41
|
+
"<!--/--></form><table class=\"table\"><thead><tr><th>",
|
|
42
|
+
"</th><th>",
|
|
43
|
+
"</th><th>",
|
|
31
44
|
"</th><th>",
|
|
32
45
|
"</th><th>",
|
|
33
46
|
"</th><th>",
|
|
@@ -36,18 +49,18 @@ var _tmpl$2 = [
|
|
|
36
49
|
"</th><th></th></tr></thead><tbody>",
|
|
37
50
|
"</tbody></table></div>"
|
|
38
51
|
];
|
|
39
|
-
var _tmpl$
|
|
52
|
+
var _tmpl$4 = [
|
|
40
53
|
"<label",
|
|
41
54
|
"><input type=\"checkbox\"",
|
|
42
55
|
"> <!--$-->",
|
|
43
56
|
"<!--/--></label>"
|
|
44
57
|
];
|
|
45
|
-
var _tmpl$
|
|
58
|
+
var _tmpl$5 = [
|
|
46
59
|
"<button",
|
|
47
60
|
" type=\"button\" class=\"btn btn-danger\">",
|
|
48
61
|
"</button>"
|
|
49
62
|
];
|
|
50
|
-
var _tmpl$
|
|
63
|
+
var _tmpl$6 = [
|
|
51
64
|
"<tr",
|
|
52
65
|
"><td>",
|
|
53
66
|
"</td><td>",
|
|
@@ -56,13 +69,17 @@ var _tmpl$5 = [
|
|
|
56
69
|
"</td><td>",
|
|
57
70
|
"</td><td>",
|
|
58
71
|
"</td><td>",
|
|
59
|
-
"</td
|
|
72
|
+
"</td><td>",
|
|
73
|
+
"</td><td><button type=\"button\" class=\"btn btn-secondary\">",
|
|
74
|
+
"</button> <!--$-->",
|
|
75
|
+
"<!--/--></td></tr>"
|
|
60
76
|
];
|
|
61
77
|
function PostTypesManager() {
|
|
62
78
|
const { t } = useTranslation();
|
|
63
79
|
const [types, setTypes] = createSignal([]);
|
|
64
80
|
const [error, setError] = createSignal("");
|
|
65
81
|
const [saving, setSaving] = createSignal(false);
|
|
82
|
+
const [editingSlug, setEditingSlug] = createSignal(null);
|
|
66
83
|
const supportsOptions = createMemo(() => [
|
|
67
84
|
{
|
|
68
85
|
value: "title",
|
|
@@ -91,6 +108,8 @@ function PostTypesManager() {
|
|
|
91
108
|
singularLabel: "",
|
|
92
109
|
pluralLabel: "",
|
|
93
110
|
hasArchive: false,
|
|
111
|
+
singleton: false,
|
|
112
|
+
menuIcon: "box",
|
|
94
113
|
supports: ["title", "editor"]
|
|
95
114
|
});
|
|
96
115
|
const load = async () => {
|
|
@@ -101,28 +120,35 @@ function PostTypesManager() {
|
|
|
101
120
|
}
|
|
102
121
|
};
|
|
103
122
|
onMount(load);
|
|
104
|
-
return ssr(_tmpl$
|
|
123
|
+
return ssr(_tmpl$3, ssrHydrationKey(), escape(createComponent(Show, {
|
|
105
124
|
get when() {
|
|
106
125
|
return error();
|
|
107
126
|
},
|
|
108
127
|
get children() {
|
|
109
128
|
return ssr(_tmpl$, ssrHydrationKey(), escape(error()));
|
|
110
129
|
}
|
|
111
|
-
})), escape(t("settings.postTypes.form.title")), escape(t("settings.postTypes.form.slug")), ssrAttribute("title", escape(t("settings.postTypes.form.slugHint"), true), false) + ssrAttribute("value", escape(form().slug, true), false), escape(t("settings.postTypes.form.singular")), ssrAttribute("value", escape(form().singularLabel, true), false), escape(t("settings.postTypes.form.plural")), ssrAttribute("value", escape(form().pluralLabel, true), false), escape(t("settings.postTypes.form.supports")), escape(createComponent(For, {
|
|
130
|
+
})), editingSlug() ? escape(t("settings.postTypes.form.editTitle")) : escape(t("settings.postTypes.form.title")), escape(t("settings.postTypes.form.slug")), ssrAttribute("title", escape(t("settings.postTypes.form.slugHint"), true), false) + ssrAttribute("value", escape(form().slug, true), false), escape(t("settings.postTypes.form.singular")), ssrAttribute("value", escape(form().singularLabel, true), false), escape(t("settings.postTypes.form.plural")), ssrAttribute("value", escape(form().pluralLabel, true), false), escape(t("settings.postTypes.form.icon")), ssrAttribute("value", escape(form().menuIcon, true), false), escape(t("settings.postTypes.form.iconHint")), escape(t("settings.postTypes.form.supports")), escape(createComponent(For, {
|
|
112
131
|
get each() {
|
|
113
132
|
return supportsOptions();
|
|
114
133
|
},
|
|
115
|
-
children: (option) => ssr(_tmpl$
|
|
116
|
-
})), ssrAttribute("checked", form().hasArchive, true), escape(t("settings.postTypes.form.hasArchive")), ssrAttribute("
|
|
134
|
+
children: (option) => ssr(_tmpl$4, ssrHydrationKey(), ssrAttribute("checked", form().supports.includes(option.value), true), escape(option.label))
|
|
135
|
+
})), ssrAttribute("checked", form().hasArchive, true), escape(t("settings.postTypes.form.hasArchive")), ssrAttribute("checked", form().singleton, true), escape(t("settings.postTypes.form.singleton")), ssrAttribute("disabled", saving(), true), editingSlug() ? escape(t("settings.postTypes.form.update")) : escape(t("settings.postTypes.form.create")), escape(createComponent(Show, {
|
|
136
|
+
get when() {
|
|
137
|
+
return editingSlug();
|
|
138
|
+
},
|
|
139
|
+
get children() {
|
|
140
|
+
return ssr(_tmpl$2, ssrHydrationKey(), escape(t("settings.postTypes.form.cancel")));
|
|
141
|
+
}
|
|
142
|
+
})), escape(t("settings.postTypes.table.slug")), escape(t("settings.postTypes.table.singular")), escape(t("settings.postTypes.table.plural")), escape(t("settings.postTypes.table.source")), escape(t("settings.postTypes.table.supports")), escape(t("settings.postTypes.table.archive")), escape(t("settings.postTypes.table.mode")), escape(t("settings.postTypes.table.icon")), escape(createComponent(For, {
|
|
117
143
|
get each() {
|
|
118
144
|
return types();
|
|
119
145
|
},
|
|
120
|
-
children: (type) => ssr(_tmpl$
|
|
146
|
+
children: (type) => ssr(_tmpl$6, ssrHydrationKey(), escape(type.slug), escape(type.singularLabel), escape(type.pluralLabel), escape(type.source ?? t("settings.postTypes.sources.admin")), escape((type.supports ?? []).join(", ")), type.hasArchive ? escape(t("common.yes")) : escape(t("common.no")), type.singleton ? escape(t("settings.postTypes.table.singleton")) : escape(t("settings.postTypes.table.collection")), escape(type.menuIcon ?? "box"), escape(t("settings.postTypes.table.actions.edit")), escape(createComponent(Show, {
|
|
121
147
|
get when() {
|
|
122
148
|
return type.source !== "CORE";
|
|
123
149
|
},
|
|
124
150
|
get children() {
|
|
125
|
-
return ssr(_tmpl$
|
|
151
|
+
return ssr(_tmpl$5, ssrHydrationKey(), escape(t("settings.postTypes.table.actions.remove")));
|
|
126
152
|
}
|
|
127
153
|
})))
|
|
128
154
|
})));
|