@oktis-works/admin 0.4.9 → 0.4.13
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.CSfbsvBc.js → ActivityWidget.DeayROhc.js} +1 -1
- package/dist/client/_astro/{AdminBar.DzMuNBYF.js → AdminBar.DQilvzQe.js} +1 -1
- package/dist/client/_astro/{AtGlanceWidget.DzSOcn4L.js → AtGlanceWidget.CDFVi_eX.js} +1 -1
- package/dist/client/_astro/{ContentEditor.uJ5F6gSs.js → ContentEditor.WyLHMY9o.js} +1 -1
- package/dist/client/_astro/{ContentList.CVy_dKZZ.js → ContentList.BWtiYbDy.js} +1 -1
- package/dist/client/_astro/{DashboardHome.DZVGJl33.js → DashboardHome.-0s3t1kG.js} +1 -1
- package/dist/client/_astro/{DashboardLayout.DrKf2Klk.css → DashboardLayout.DWuCsemN.css} +1 -1
- package/dist/client/_astro/{DashboardLayout.astro_astro_type_script_index_0_lang.BrC4PbPa.js → DashboardLayout.astro_astro_type_script_index_0_lang.Bm7kqhGo.js} +1 -1
- package/dist/client/_astro/{Footer.CBhfZTYp.js → Footer.KkyZkNxH.js} +1 -1
- package/dist/client/_astro/{GeneralSettings.BS1F1fbv.js → GeneralSettings.CaEyAV2f.js} +1 -1
- package/dist/client/_astro/{HelpTabs.CHwVYwbx.js → HelpTabs.99giF0f1.js} +1 -1
- package/dist/client/_astro/{LanguageSelector.C-0zi24B.js → LanguageSelector.DPBYaSN4.js} +1 -1
- package/dist/client/_astro/{MediaLibrary.BG_XuGSC.js → MediaLibrary.DBfw3BM0.js} +1 -1
- package/dist/client/_astro/PluginManager.BFoAz05U.js +93 -0
- package/dist/client/_astro/{PostTypesManager.kgLZEJjr.js → PostTypesManager.y9aB2d3_.js} +1 -1
- package/dist/client/_astro/{QuickDraftWidget.C6oHKc1s.js → QuickDraftWidget.Drp_cL_D.js} +1 -1
- package/dist/client/_astro/{ScreenOptions.CtkDOZLA.js → ScreenOptions.C8K8Bufc.js} +1 -1
- package/dist/client/_astro/{TaxonomiesManager.BBL0hyRa.js → TaxonomiesManager.Cj54HB7P.js} +1 -1
- package/dist/client/_astro/ThemeManager.BuULAG8h.js +124 -0
- package/dist/client/_astro/{UserCreateForm.PVLoPXwZ.js → UserCreateForm.BMWIRfb2.js} +1 -1
- package/dist/client/_astro/{UsersManager.CG61mqGd.js → UsersManager.BogkOfCQ.js} +1 -1
- package/dist/client/_astro/{api.DTNuyqvx.js → api.PfLklAa1.js} +1 -1
- package/dist/client/_astro/{i18n.DJXYgZ8Z.js → i18n.BMDVwjZM.js} +1 -1
- package/dist/client/_astro/{login.astro_astro_type_script_index_0_lang.CLM9X6sQ.js → login.astro_astro_type_script_index_0_lang.D6nHqYm6.js} +1 -1
- package/dist/client/_astro/version.C0f0jrCn.js +1 -0
- package/dist/server/chunks/{BaseLayout_GUKuUGNt.mjs → BaseLayout_BsR68tOH.mjs} +2 -19
- package/dist/server/chunks/{ContentEditor_Dr-Itdds.mjs → ContentEditor_BtclxOqH.mjs} +2 -2
- package/dist/server/chunks/{DashboardLayout_9J3H4BYL.mjs → DashboardLayout_B9pE8ZBQ.mjs} +8 -5
- package/dist/server/chunks/{MediaLibrary_DN8e9tr6.mjs → MediaLibrary_DLO2K_4d.mjs} +2 -2
- package/dist/server/chunks/{_slug__CZLDKciF.mjs → _slug__yqDK_Ow8.mjs} +1 -1
- package/dist/server/chunks/{edit_DvxEawK_.mjs → edit_0bCUPzfW.mjs} +2 -2
- package/dist/server/chunks/{general_Cgv2Vi0E.mjs → general_D-MMl9p8.mjs} +2 -2
- package/dist/server/chunks/{i18n_DnHqy5K-.mjs → i18n_Dj2ieo-N.mjs} +21 -0
- package/dist/server/chunks/{index_BuyXYZ1X.mjs → index_Bq7o-ZHF.mjs} +1 -1
- package/dist/server/chunks/{index_D-WorXws.mjs → index_CALAZTDB.mjs} +2 -2
- package/dist/server/chunks/{index_B5Q26qdW.mjs → index_CTpEX5iK.mjs} +2 -2
- package/dist/server/chunks/{index_B453iezx.mjs → index_DB6MLU0v.mjs} +2 -2
- package/dist/server/chunks/{index_B6j8-1u6.mjs → index_Z7GukanS.mjs} +2 -2
- package/dist/server/chunks/{login_B7FSWUaM.mjs → login_BcWk_36h.mjs} +2 -1
- package/dist/server/chunks/{new_KKthlcZk.mjs → new_BbKoexYG.mjs} +2 -2
- package/dist/server/chunks/{new_DmtT018R.mjs → new_DlqbYYA1.mjs} +2 -2
- package/dist/server/chunks/plugins_BLJAzLX4.mjs +123 -0
- package/dist/server/chunks/{post-types_BoTrK9ue.mjs → post-types_BvVl0hZs.mjs} +2 -2
- package/dist/server/chunks/script_CPGt5jAh.mjs +19 -0
- package/dist/server/chunks/{taxonomies_D3DX79hA.mjs → taxonomies_Dkx7d-vc.mjs} +2 -2
- package/dist/server/chunks/themes_CCDPOhVZ.mjs +127 -0
- package/dist/server/chunks/{upload__Z4uXmIX.mjs → upload_CpGGKDEH.mjs} +2 -2
- package/dist/server/entry.mjs +76 -22
- package/dist/server/virtual_astro_middleware.mjs +1 -1
- package/package.json +1 -1
- package/dist/client/_astro/version.cDj9fUrH.js +0 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import{C as e,E as t,S as n,b as r,d as i,g as a,i as o,l as s,n as c,o as l,p as u,r as d,s as f,t as p}from"./web.D1H9RxZL.js";import{t as m}from"./i18n.BMDVwjZM.js";import{t as h}from"./api.PfLklAa1.js";var g=u(`<div class=theme-manager><div class=page-header><h2></h2><p class=page-description></p></div><!$><!/><!$><!/><!$><!/><style>
|
|
2
|
+
.page-header {
|
|
3
|
+
margin-bottom: 1.5rem;
|
|
4
|
+
}
|
|
5
|
+
.page-header h2 {
|
|
6
|
+
margin: 0 0 0.5rem;
|
|
7
|
+
font-size: 1.5rem;
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
}
|
|
10
|
+
.page-description {
|
|
11
|
+
margin: 0;
|
|
12
|
+
color: var(--color-muted);
|
|
13
|
+
font-size: 0.875rem;
|
|
14
|
+
}
|
|
15
|
+
.themes-grid {
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
18
|
+
gap: 1.5rem;
|
|
19
|
+
}
|
|
20
|
+
.theme-card {
|
|
21
|
+
background: var(--color-surface);
|
|
22
|
+
border: 1px solid var(--color-border);
|
|
23
|
+
border-radius: var(--radius-lg);
|
|
24
|
+
padding: 1.5rem;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: 1rem;
|
|
28
|
+
transition: all 0.2s;
|
|
29
|
+
}
|
|
30
|
+
.theme-card:hover {
|
|
31
|
+
border-color: var(--color-primary);
|
|
32
|
+
box-shadow: var(--shadow-md);
|
|
33
|
+
}
|
|
34
|
+
.theme-card.active {
|
|
35
|
+
border-color: var(--color-primary);
|
|
36
|
+
box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md);
|
|
37
|
+
}
|
|
38
|
+
.theme-preview {
|
|
39
|
+
position: relative;
|
|
40
|
+
}
|
|
41
|
+
.theme-badge {
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 0.5rem;
|
|
44
|
+
right: 0.5rem;
|
|
45
|
+
background: var(--color-primary);
|
|
46
|
+
color: var(--color-primary-contrast);
|
|
47
|
+
padding: 0.25rem 0.5rem;
|
|
48
|
+
border-radius: var(--radius-full);
|
|
49
|
+
font-size: 0.625rem;
|
|
50
|
+
font-weight: 700;
|
|
51
|
+
text-transform: uppercase;
|
|
52
|
+
}
|
|
53
|
+
.theme-info {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
gap: 0.5rem;
|
|
57
|
+
}
|
|
58
|
+
.theme-info h3 {
|
|
59
|
+
margin: 0;
|
|
60
|
+
font-size: 1.125rem;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
}
|
|
63
|
+
.theme-version {
|
|
64
|
+
margin: 0;
|
|
65
|
+
font-size: 0.75rem;
|
|
66
|
+
color: var(--color-muted);
|
|
67
|
+
}
|
|
68
|
+
.theme-desc {
|
|
69
|
+
margin: 0;
|
|
70
|
+
font-size: 0.8125rem;
|
|
71
|
+
color: var(--color-text);
|
|
72
|
+
line-height: 1.5;
|
|
73
|
+
}
|
|
74
|
+
.theme-status {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: 0.5rem;
|
|
78
|
+
}
|
|
79
|
+
.status-badge {
|
|
80
|
+
display: inline-flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
padding: 0.25rem 0.5rem;
|
|
83
|
+
border-radius: var(--radius-full);
|
|
84
|
+
font-size: 0.625rem;
|
|
85
|
+
font-weight: 600;
|
|
86
|
+
text-transform: uppercase;
|
|
87
|
+
}
|
|
88
|
+
.status-active {
|
|
89
|
+
background: var(--color-success-soft);
|
|
90
|
+
color: var(--color-success);
|
|
91
|
+
}
|
|
92
|
+
.status-installed {
|
|
93
|
+
background: var(--color-primary-soft);
|
|
94
|
+
color: var(--color-primary);
|
|
95
|
+
}
|
|
96
|
+
.status-inactive {
|
|
97
|
+
background: var(--color-muted-soft);
|
|
98
|
+
color: var(--color-muted);
|
|
99
|
+
}
|
|
100
|
+
.theme-actions {
|
|
101
|
+
margin-top: 0.5rem;
|
|
102
|
+
}
|
|
103
|
+
.empty-state {
|
|
104
|
+
grid-column: 1 / -1;
|
|
105
|
+
padding: 3rem;
|
|
106
|
+
text-align: center;
|
|
107
|
+
color: var(--color-muted);
|
|
108
|
+
}
|
|
109
|
+
.alert {
|
|
110
|
+
padding: 0.75rem 1rem;
|
|
111
|
+
border-radius: var(--radius-md);
|
|
112
|
+
margin-bottom: 1rem;
|
|
113
|
+
}
|
|
114
|
+
.alert-error {
|
|
115
|
+
background: var(--color-error-soft);
|
|
116
|
+
color: var(--color-error);
|
|
117
|
+
border: 1px solid var(--color-error);
|
|
118
|
+
}
|
|
119
|
+
.skeleton {
|
|
120
|
+
padding: 2rem;
|
|
121
|
+
text-align: center;
|
|
122
|
+
color: var(--color-muted);
|
|
123
|
+
}
|
|
124
|
+
`),_=u(`<div class="alert alert-error">`),v=u(`<div class=skeleton>Loading...`),y=u(`<div class=themes-grid><!$><!/><!$><!/>`),b=u(`<div><div class=theme-preview></div><div class=theme-info><h3></h3><p class=theme-version><!$><!/>: <!$><!/></p><p class=theme-status><span></span></p><!$><!/></div><div class=theme-actions><button>`),x=u(`<div class="theme-badge active-badge">`),S=u(`<p class=theme-desc>`),C=u(`<div class=empty-state>`);function w(){let{t:c}=m(),[u,w]=e([]),[T,E]=e(!0),[D,O]=e(null),[k,A]=e(null);t(async()=>{await j()});async function j(){try{E(!0);let e=await h.getThemes();w(e)}catch{O(c(`themes.loadError`))}finally{E(!1)}}async function M(e){let t=e.status===`ACTIVE`;A(e.id);try{let n=t?await h.deactivateTheme(e.id):await h.activateTheme(e.id);w(u().map(t=>t.id===e.id?n:t))}catch{O(c(t?`themes.deactivateError`:`themes.activateError`))}finally{A(null)}}let N=e=>{switch(e){case`ACTIVE`:return c(`themes.status.active`);case`INSTALLED`:return c(`themes.status.installed`);case`INACTIVE`:return c(`themes.status.inactive`);default:return e}},P=e=>{switch(e){case`ACTIVE`:return`status-active`;case`INSTALLED`:return`status-installed`;case`INACTIVE`:return`status-inactive`;default:return``}};return(()=>{var e=d(g),t=e.firstChild,m=t.firstChild,h=m.nextSibling,w=t.nextSibling,[E,O]=o(w.nextSibling),A=E.nextSibling,[j,F]=o(A.nextSibling),I=j.nextSibling,[L,R]=o(I.nextSibling);return L.nextSibling,l(m,()=>c(`themes.title`)),l(h,()=>c(`themes.description`)),l(e,(()=>{var e=f(()=>!!D());return()=>e()&&(()=>{var e=d(_);return l(e,D),e})()})(),E,O),l(e,(()=>{var e=f(()=>!!T());return()=>e()&&d(v)})(),j,F),l(e,(()=>{var e=f(()=>!(T()||D()));return()=>e()&&(()=>{var e=d(y),t=e.firstChild,[m,h]=o(t.nextSibling),g=m.nextSibling,[_,v]=o(g.nextSibling);return l(e,r(a,{get each(){return u()},children:e=>(()=>{var t=d(b),r=t.firstChild,a=r.nextSibling,u=a.firstChild,m=u.nextSibling,h=m.firstChild,[g,_]=o(h.nextSibling),v=g.nextSibling.nextSibling,[y,C]=o(v.nextSibling),w=m.nextSibling,T=w.firstChild,E=w.nextSibling,[D,O]=o(E.nextSibling),A=a.nextSibling.firstChild;return l(r,(()=>{var t=f(()=>!!e.manifest?.name);return()=>t()&&(()=>{var e=d(x);return l(e,()=>c(`themes.active`)),e})()})()),l(u,()=>e.name),l(m,()=>c(`themes.version`),g,_),l(m,()=>e.version,y,C),l(T,()=>N(e.status)),l(a,(()=>{var t=f(()=>!!e.manifest?.description);return()=>t()&&(()=>{var t=d(S);return l(t,()=>e.manifest.description),t})()})(),D,O),A.$$click=()=>M(e),l(A,(()=>{var t=f(()=>e.status===`ACTIVE`);return()=>t()?c(`themes.deactivate`):c(`themes.activate`)})()),n(n=>{var r=`theme-card ${e.status===`ACTIVE`?`active`:``}`,a=`status-badge ${P(e.status)}`,o=`btn ${k()===e.id?`btn-loading`:``}`,s=k()!==null;return r!==n.e&&p(t,n.e=r),a!==n.t&&p(T,n.t=a),o!==n.a&&p(A,n.a=o),s!==n.o&&i(A,`disabled`,n.o=s),n},{e:void 0,t:void 0,a:void 0,o:void 0}),s(),t})()}),m,h),l(e,(()=>{var e=f(()=>u().length===0);return()=>e()&&(()=>{var e=d(C);return l(e,()=>c(`themes.empty`)),e})()})(),_,v),e})()})(),L,R),e})()}c([`click`]);export{w as ThemeManager};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,E as t,S as n,_ as r,b as i,d as a,g as o,i as s,l as c,n as l,o as u,p as d,r as f,s as p}from"./web.D1H9RxZL.js";import{t as m}from"./i18n.
|
|
1
|
+
import{C as e,E as t,S as n,_ as r,b as i,d as a,g as o,i as s,l as c,n as l,o as u,p as d,r as f,s as p}from"./web.D1H9RxZL.js";import{t as m}from"./i18n.BMDVwjZM.js";import{t as h}from"./api.PfLklAa1.js";var ee=d(`<div class="notice notice--error">`),g=d(`<div class=user-create><!$><!/><form class=card><h3></h3><div class=form-grid><label><!$><!/><input class=input required></label><label><!$><!/><input class=input type=email required></label><label><!$><!/><span class=muted></span><input class=input type=password required minlength=8></label><label><!$><!/><select class=input><option value></option><!$><!/></select></label></div><p class=muted><!$><!/> <!$><!/> — <!$><!/> <!$><!/>.</p><div class=media-details__actions><button class="btn btn-primary"type=submit></button><a class="btn btn-secondary"href=/users>`),te=d(`<option><!$><!/> (<!$><!/>)`);function _(){let{t:l}=m(),[d,_]=e(``),[v,ne]=e(``),[y,re]=e(``),[b,x]=e(``),[S,C]=e([]),[w,T]=e(``),[E,D]=e(!1);t(async()=>{try{let e=await h.listRoles();C(e),x(e.find(e=>e.slug===`EDITOR`)?.id??e[0]?.id??``)}catch{}});let ie=async e=>{if(e.preventDefault(),T(``),y().length<8){T(l(`users.detail.passwordError`));return}D(!0);try{await h.createUser({name:d(),email:v(),password:y(),roleId:b()||void 0}),window.location.href=`/users`}catch(e){T(e instanceof Error?e.message:String(e)),D(!1)}};return(()=>{var e=f(g),t=e.firstChild,[m,h]=s(t.nextSibling),C=m.nextSibling,T=C.firstChild,D=T.nextSibling,O=D.firstChild,ae=O.firstChild,[k,A]=s(ae.nextSibling),j=k.nextSibling,M=O.nextSibling,N=M.firstChild,[P,oe]=s(N.nextSibling),F=P.nextSibling,I=M.nextSibling,se=I.firstChild,[L,R]=s(se.nextSibling),z=L.nextSibling,B=z.nextSibling,V=I.nextSibling,H=V.firstChild,[U,W]=s(H.nextSibling),G=U.nextSibling,K=G.firstChild,ce=K.nextSibling,[le,ue]=s(ce.nextSibling),q=D.nextSibling,de=q.firstChild,[J,fe]=s(de.nextSibling),pe=J.nextSibling.nextSibling,[Y,me]=s(pe.nextSibling),X=Y.nextSibling.nextSibling,[Z,he]=s(X.nextSibling),ge=Z.nextSibling.nextSibling,[Q,_e]=s(ge.nextSibling);Q.nextSibling;var $=q.nextSibling.firstChild,ve=$.nextSibling;return u(e,i(r,{get when(){return w()},get children(){var e=f(ee);return u(e,w),e}}),m,h),C.addEventListener(`submit`,ie),u(T,()=>l(`users.new`)),u(O,()=>l(`users.detail.fields.name`),k,A),j.$$input=e=>_(e.currentTarget.value),u(M,()=>l(`users.detail.fields.email`),P,oe),F.$$input=e=>ne(e.currentTarget.value),u(I,()=>l(`users.detail.fields.password`),L,R),u(z,()=>l(`users.detail.passwordPrompt`,{email:``})),B.$$input=e=>re(e.currentTarget.value),u(V,()=>l(`users.detail.fields.role`),U,W),G.addEventListener(`change`,e=>x(e.currentTarget.value)),u(K,()=>l(`users.detail.rolePlaceholder`)),u(G,i(o,{get each(){return S()},children:e=>(()=>{var t=f(te),r=t.firstChild,[i,o]=s(r.nextSibling),c=i.nextSibling.nextSibling,[l,d]=s(c.nextSibling);return l.nextSibling,u(t,()=>e.name,i,o),u(t,()=>e.slug,l,d),n(()=>a(t,`value`,e.id)),t})()}),le,ue),u(q,()=>l(`common.save`),J,fe),u(q,()=>l(`users.new`).toLowerCase(),Y,me),u(q,()=>l(`users.detail.fields.role`),Z,he),u(q,()=>l(`users.toolbar.newBtn`).toLowerCase(),Q,_e),u($,(()=>{var e=p(()=>!!E());return()=>e()?l(`common.loading`):l(`common.create`)})()),u(ve,()=>l(`common.back`)),n(()=>a($,`disabled`,E())),n(()=>a(j,`value`,d())),n(()=>a(F,`value`,v())),n(()=>a(B,`value`,y())),n(()=>a(G,`value`,b())),c(),e})()}l([`input`]);export{_ as UserCreateForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,i as t,n,o as r,t as i}from"./src.Cgonpfb5.js";import{C as a,E as o,S as s,_ as c,b as l,d as u,g as d,i as f,l as p,n as m,o as h,p as g,r as _}from"./web.D1H9RxZL.js";import{t as v}from"./i18n.
|
|
1
|
+
import{a as e,i as t,n,o as r,t as i}from"./src.Cgonpfb5.js";import{C as a,E as o,S as s,_ as c,b as l,d as u,g as d,i as f,l as p,n as m,o as h,p as g,r as _}from"./web.D1H9RxZL.js";import{t as v}from"./i18n.BMDVwjZM.js";import{t as y}from"./api.PfLklAa1.js";var b=g(`<div class="notice notice--error">`),x=g(`<div class=notice>`),S=g(`<table class=users-table><thead><tr><th></th><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody>`),C=g(`<div class=users-manager><!$><!/><!$><!/><div class=toolbar><!$><!/><!$><!/><a class="btn btn-primary"href=/users/new></a><!$><!/></div><!$><!/><!$><!/><!$><!/>`),w=g(`<p class=muted>`),ee=g(`<tr><td></td><td class=muted></td><td></td><td><span class=status-dot></span><!$><!/></td><td class=muted></td><td class=users-table__actions><!$><!/><!$><!/>`),T=g(`<span class=muted>`),te=g(`<div class="card user-details"><h3></h3><div class=form-grid><label><!$><!/><input class=input></label><label><!$><!/><input class=input type=email></label><label><!$><!/><select class=input><option value=ACTIVE></option><option value=INACTIVE></option></select></label><label><!$><!/><select class=input><option value></option><!$><!/></select></label></div><p class=muted></p><div class=media-details__actions><!$><!/><!$><!/><!$><!/>`),E=g(`<option><!$><!/> (<!$><!/>)`);function D(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?`—`:t.toLocaleString(`pt-BR`)}function O(){let{t:m}=v(),[g,O]=a([]),[k,A]=a([]),[j,M]=a(0),[N,P]=a(1),[F,I]=a(``),[L,R]=a(``),[z,B]=a(``),[V,H]=a(``),[U,W]=a(null),[G,K]=a(!1),q=async()=>{try{let e=await y.listUsers({page:N(),limit:20,search:F()||void 0,status:L()||void 0});O(e.data??[]),M(e.total??0)}catch(e){B(e instanceof Error?e.message:String(e))}};o(async()=>{await q();try{A(await y.listRoles())}catch{}});let J=async()=>{P(1),await q()},ne=async(e,t)=>{if(t){K(!0),B(``);try{let n=await y.assignRole(e.id,t);W({...e,roles:n.roles}),H(m(`users.detail.toasts.roleUpdated`,{name:e.name})),await q()}catch(e){B(e instanceof Error?e.message:String(e))}finally{K(!1)}}},re=async e=>{let t=prompt(m(`users.detail.passwordPrompt`,{email:e.email}));if(t){if(t.length<8){B(m(`users.detail.passwordError`));return}K(!0),B(``);try{await y.setUserPassword(e.id,t),H(m(`users.detail.toasts.passwordChanged`,{name:e.name}))}catch(e){B(e instanceof Error?e.message:String(e))}finally{K(!1)}}},ie=async e=>{K(!0),B(``);try{await y.updateUser(e.id,{name:e.name,email:e.email,status:e.status}),H(m(`users.detail.toasts.saved`,{name:e.name})),W(null),await q()}catch(e){B(e instanceof Error?e.message:String(e))}finally{K(!1)}},Y=async e=>{if(confirm(m(`users.detail.confirmDelete`,{email:e.email}))){K(!0),B(``);try{await y.deleteUser(e.id),U()?.id===e.id&&W(null),H(m(`users.detail.toasts.deleted`,{name:e.name})),await q()}catch(e){B(e instanceof Error?e.message:String(e))}finally{K(!1)}}},ae=e=>k().find(t=>t.slug===e.roles[0]);return(()=>{var a=_(C),o=a.firstChild,[v,y]=f(o.nextSibling),O=v.nextSibling,[A,M]=f(O.nextSibling),B=A.nextSibling,H=B.firstChild,[K,X]=f(H.nextSibling),Z=K.nextSibling,[Q,oe]=f(Z.nextSibling),$=Q.nextSibling,se=$.nextSibling,[ce,le]=f(se.nextSibling),ue=B.nextSibling,[de,fe]=f(ue.nextSibling),pe=de.nextSibling,[me,he]=f(pe.nextSibling),ge=me.nextSibling,[_e,ve]=f(ge.nextSibling);return h(a,l(c,{get when(){return z()},get children(){var e=_(b);return h(e,z),e}}),v,y),h(a,l(c,{get when(){return V()},get children(){var e=_(x);return h(e,V),e}}),A,M),h(B,l(t,{name:`user-search`,get placeholder(){return m(`users.toolbar.search`)},get value(){return F()},onInput:e=>{I(e),J()}}),K,X),h(B,l(r,{name:`user-status`,get placeholder(){return m(`users.toolbar.allStatus`)},get value(){return L()},get options(){return[{value:`ACTIVE`,label:m(`users.toolbar.active`)},{value:`INACTIVE`,label:m(`users.toolbar.inactive`)}]},onChange:e=>{R(e),J()}}),Q,oe),h($,()=>m(`users.toolbar.newBtn`)),h(B,l(n,{variant:`secondary`,onClick:()=>void J(),get children(){return m(`users.toolbar.searchBtn`)}}),ce,le),h(a,l(c,{get when(){return g().length>0},get fallback(){return(()=>{var e=_(w);return h(e,()=>m(`users.empty`)),e})()},get children(){var e=_(S),t=e.firstChild,r=t.firstChild.firstChild,a=r.nextSibling,o=a.nextSibling,u=o.nextSibling,p=u.nextSibling,v=t.nextSibling;return h(r,()=>m(`users.table.name`)),h(a,()=>m(`users.table.email`)),h(o,()=>m(`users.table.role`)),h(u,()=>m(`users.table.status`)),h(p,()=>m(`users.table.lastAccess`)),h(v,l(d,{get each(){return g()},children:e=>(()=>{var t=_(ee),r=t.firstChild,a=r.nextSibling,o=a.nextSibling,u=o.nextSibling,d=u.firstChild,p=d.nextSibling,[g,v]=f(p.nextSibling),y=u.nextSibling,b=y.nextSibling,x=b.firstChild,[S,C]=f(x.nextSibling),w=S.nextSibling,[te,E]=f(w.nextSibling);return h(r,()=>e.name),h(a,()=>e.email),h(o,l(c,{get when(){return e.roles.length>0},get fallback(){return(()=>{var e=_(T);return h(e,()=>m(`users.noRole`)),e})()},get children(){return l(i,{get children(){return e.roles.join(`, `)}})}})),h(u,()=>m(`common.status.`+e.status.toLowerCase()),g,v),h(y,()=>D(e.last_login_at)),h(b,l(n,{variant:`secondary`,size:`sm`,onClick:()=>W(e),get children(){return m(`users.table.actions.manage`)}}),S,C),h(b,l(n,{variant:`danger`,size:`sm`,onClick:()=>void Y(e),get children(){return m(`users.table.actions.delete`)}}),te,E),s(n=>{var r=U()?.id===e.id,i=e.status===`ACTIVE`;return r!==n.e&&t.classList.toggle(`users-table__row--selected`,n.e=r),i!==n.t&&d.classList.toggle(`status-dot--active`,n.t=i),n},{e:void 0,t:void 0}),t})()})),e}}),de,fe),h(a,l(e,{get page(){return N()},limit:20,get total(){return j()},onPageChange:e=>{P(e),q()}}),me,he),h(a,l(c,{get when(){return U()},children:e=>(()=>{var t=_(te),r=t.firstChild,i=r.nextSibling,a=i.firstChild,o=a.firstChild,[c,g]=f(o.nextSibling),v=c.nextSibling,y=a.nextSibling,b=y.firstChild,[x,S]=f(b.nextSibling),C=x.nextSibling,w=y.nextSibling,ee=w.firstChild,[T,O]=f(ee.nextSibling),A=T.nextSibling,j=A.firstChild,M=j.nextSibling,N=w.nextSibling,P=N.firstChild,[F,I]=f(P.nextSibling),L=F.nextSibling,R=L.firstChild,z=R.nextSibling,[B,V]=f(z.nextSibling),H=i.nextSibling,U=H.nextSibling,K=U.firstChild,[q,J]=f(K.nextSibling),Y=q.nextSibling,[X,Z]=f(Y.nextSibling),Q=X.nextSibling,[oe,$]=f(Q.nextSibling);return h(r,()=>m(`users.detail.title`)),h(a,()=>m(`users.detail.fields.name`),c,g),v.$$input=t=>W({...e(),name:t.currentTarget.value}),h(y,()=>m(`users.detail.fields.email`),x,S),C.$$input=t=>W({...e(),email:t.currentTarget.value}),h(w,()=>m(`users.detail.fields.status`),T,O),A.addEventListener(`change`,t=>W({...e(),status:t.currentTarget.value})),h(j,()=>m(`users.detail.statusOptions.active`)),h(M,()=>m(`users.detail.statusOptions.inactive`)),h(N,()=>m(`users.detail.fields.role`),F,I),L.addEventListener(`change`,t=>void ne(e(),t.currentTarget.value)),h(R,()=>m(`users.detail.rolePlaceholder`)),h(L,l(d,{get each(){return k()},children:e=>(()=>{var t=_(E),n=t.firstChild,[r,i]=f(n.nextSibling),a=r.nextSibling.nextSibling,[o,c]=f(a.nextSibling);return o.nextSibling,h(t,()=>e.name,r,i),h(t,()=>e.slug,o,c),s(()=>u(t,`value`,e.id)),t})()}),B,V),h(H,()=>m(`users.detail.meta`,{created:D(e().created_at),lastAccess:D(e().last_login_at)})),h(U,l(n,{variant:`primary`,get disabled(){return G()},get loading(){return G()},onClick:()=>void ie(e()),get children(){return m(`users.detail.actions.save`)}}),q,J),h(U,l(n,{variant:`secondary`,get disabled(){return G()},onClick:()=>void re(e()),get children(){return m(`users.detail.actions.resetPassword`)}}),X,Z),h(U,l(n,{variant:`secondary`,onClick:()=>W(null),get children(){return m(`users.detail.actions.close`)}}),oe,$),s(()=>u(L,`disabled`,G())),s(()=>u(v,`value`,e().name)),s(()=>u(C,`value`,e().email)),s(()=>u(A,`value`,e().status)),s(()=>u(L,`value`,ae(e())?.id??``)),p(),t})()}),_e,ve),a})()}m([`input`]);export{O as UsersManager};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=new class{baseUrl;csrfToken=null;isRefreshing=!1;constructor(e=`http://localhost:3000`){this.baseUrl=e}async init(){try{await fetch(`${this.baseUrl}/api/v1/auth/me`,{credentials:`include`})}catch{}}async isLoggedIn(){try{return(await fetch(`${this.baseUrl}/api/v1/auth/me`,{credentials:`include`})).ok}catch{return!1}}async getTenantId(){try{let e=await fetch(`${this.baseUrl}/api/v1/auth/me`,{credentials:`include`});return e.ok?(await e.json()).tenantId??null:null}catch{return null}}async getUserLocale(){try{let e=await fetch(`${this.baseUrl}/api/v1/users/me/locale`,{credentials:`include`});return e.ok?(await e.json()).locale??`pt-BR`:`pt-BR`}catch{return`pt-BR`}}async setUserLocale(e){await this.request(`PUT`,`/api/v1/users/me/locale`,{locale:e})}async getMe(){return this.request(`GET`,`/api/v1/auth/me`)}async getAuditLogs(e=8){return this.request(`GET`,`/api/v1/audit-logs?limit=${e}`)}async login(e){return await this.request(`POST`,`/api/v1/auth/login`,e)}async logout(){await this.request(`POST`,`/api/v1/auth/logout`,{}),this.csrfToken=null}async refreshTokens(){if(!this.isRefreshing){this.isRefreshing=!0;try{await this.request(`POST`,`/api/v1/auth/refresh`,{})}finally{this.isRefreshing=!1}}}async request(e,t,n,r){let i=`${this.baseUrl}${t}`,a={"Content-Type":`application/json`,...r};if(![`GET`,`HEAD`,`OPTIONS`].includes(e.toUpperCase())){let e=this.getCsrfToken();e&&(a[`x-csrf-token`]=e)}let o=await fetch(i,{method:e,headers:a,credentials:`include`,body:n?JSON.stringify(n):void 0});if(o.status===401&&!t.includes(`/auth/refresh`)&&!t.includes(`/auth/logout`)&&(await this.refreshTokens(),o=await fetch(i,{method:e,headers:a,credentials:`include`,body:n?JSON.stringify(n):void 0})),!o.ok){let e=await o.json().catch(()=>({error:`Request failed`}));throw Error(e.error??`Request failed: ${o.status}`)}let s=o.headers.get(`set-cookie`);if(s){let e=s.match(/csrf_token=([^;]+)/);e?.[1]&&(this.csrfToken=e[1])}return o.json()}getCsrfToken(){if(this.csrfToken)return this.csrfToken;if(typeof document<`u`){let e=document.cookie.match(/(?:^|;\s*)csrf_token=([^;]+)/);if(e?.[1])return e[1]}return null}async getContent(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.type&&t.set(`type`,e.type),e?.status&&t.set(`status`,e.status),e?.search&&t.set(`search`,e.search),this.request(`GET`,`/api/v1/content?${t.toString()}`)}async getContentById(e){return this.request(`GET`,`/api/v1/content/${e}`)}async createContent(e){return this.request(`POST`,`/api/v1/content`,e)}async updateContent(e,t){return this.request(`PUT`,`/api/v1/content/${e}`,t)}async deleteContent(e){await this.request(`DELETE`,`/api/v1/content/${e}`)}async publishContent(e){return this.request(`POST`,`/api/v1/content/${e}/publish`)}async unpublishContent(e){return this.request(`POST`,`/api/v1/content/${e}/unpublish`)}async publishToggle(e,t){return t?this.unpublishContent(e):this.publishContent(e)}async getContentTypes(){return this.request(`GET`,`/api/v1/content-types`)}async createContentType(e){return this.request(`POST`,`/api/v1/content-types`,e)}async updateContentType(e,t){return this.request(`PUT`,`/api/v1/content-types/${e}`,t)}async deleteContentType(e){await this.request(`DELETE`,`/api/v1/content-types/${e}`)}async getTaxonomies(){return this.request(`GET`,`/api/v1/taxonomies`)}async createTaxonomy(e){return this.request(`POST`,`/api/v1/taxonomies`,e)}async attachTaxonomy(e,t){await this.request(`POST`,`/api/v1/taxonomies/${e}/attach`,{contentType:t})}async detachTaxonomy(e,t){await this.request(`POST`,`/api/v1/taxonomies/${e}/detach`,{contentType:t})}async deleteTaxonomy(e){await this.request(`DELETE`,`/api/v1/taxonomies/${e}`)}async getFieldGroups(e){if(e?.type){let t=new URLSearchParams({type:e.type});for(let[n,r]of Object.entries(e))n!==`type`&&r&&t.set(n,r);return this.request(`GET`,`/api/v1/field-groups?${t.toString()}`)}return this.request(`GET`,`/api/v1/field-groups`)}async getFieldGroup(e){return this.request(`GET`,`/api/v1/field-groups/${e}`)}async createFieldGroup(e){return this.request(`POST`,`/api/v1/field-groups`,e)}async getFieldTypes(e){let t=e?`?category=${encodeURIComponent(e)}`:``;return this.request(`GET`,`/api/v1/field-types${t}`)}async listMedia(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.mimeType&&t.set(`mimeType`,e.mimeType),e?.search&&t.set(`search`,e.search),this.request(`GET`,`/api/v1/media?${t.toString()}`)}async getMedia(e){return this.request(`GET`,`/api/v1/media/${e}`)}async uploadMedia(e,t){let n=new FormData;n.append(`file`,e),t?.alt&&n.append(`alt`,t.alt),t?.caption&&n.append(`caption`,t.caption);let r=`${this.baseUrl}/api/v1/media/upload`,i={},a=this.getCsrfToken();a&&(i[`x-csrf-token`]=a);let o=await fetch(r,{method:`POST`,headers:i,credentials:`include`,body:n});if(!o.ok){let e=await o.json().catch(()=>({error:`Upload failed: ${o.status}`}));throw Error(e.error??`Upload failed: ${o.status}`)}return o.json()}async updateMedia(e,t){return this.request(`PUT`,`/api/v1/media/${e}`,t)}async deleteMedia(e){await this.request(`DELETE`,`/api/v1/media/${e}`)}async listUsers(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.search&&t.set(`search`,e.search),e?.status&&t.set(`status`,e.status),this.request(`GET`,`/api/v1/users?${t.toString()}`)}async getUser(e){return this.request(`GET`,`/api/v1/users/${e}`)}async createUser(e){return this.request(`POST`,`/api/v1/users`,e)}async updateUser(e,t){return this.request(`PUT`,`/api/v1/users/${e}`,t)}async deleteUser(e){await this.request(`DELETE`,`/api/v1/users/${e}`)}async setUserPassword(e,t){await this.request(`PUT`,`/api/v1/users/${e}/password`,{password:t})}async assignRole(e,t){return this.request(`POST`,`/api/v1/users/${e}/roles`,{roleId:t})}async removeRole(e,t){return this.request(`DELETE`,`/api/v1/users/${e}/roles/${t}`)}async listRoles(){return this.request(`GET`,`/api/v1/roles`)}async getSettings(e){let t=e?`?group=${encodeURIComponent(e)}`:``;return this.request(`GET`,`/api/v1/settings${t}`)}async updateSettings(e){await this.request(`PUT`,`/api/v1/settings`,e)}async healthCheck(){return this.request(`GET`,`/health`)}async getThemes(){return(await this.request(`GET`,`/api/v1/themes`)).map(e=>({id:String(e.id??``),name:String(e.name??``),version:e.version?String(e.version):void 0,status:String(e.status??`INSTALLED`),manifest:e.manifest??null}))}};export{e as t};
|
|
1
|
+
var e=new class{baseUrl;csrfToken=null;isRefreshing=!1;constructor(e=`http://localhost:3000`){this.baseUrl=e}async init(){try{await fetch(`${this.baseUrl}/api/v1/auth/me`,{credentials:`include`})}catch{}}async isLoggedIn(){try{return(await fetch(`${this.baseUrl}/api/v1/auth/me`,{credentials:`include`})).ok}catch{return!1}}async getTenantId(){try{let e=await fetch(`${this.baseUrl}/api/v1/auth/me`,{credentials:`include`});return e.ok?(await e.json()).tenantId??null:null}catch{return null}}async getUserLocale(){try{let e=await fetch(`${this.baseUrl}/api/v1/users/me/locale`,{credentials:`include`});return e.ok?(await e.json()).locale??`pt-BR`:`pt-BR`}catch{return`pt-BR`}}async setUserLocale(e){await this.request(`PUT`,`/api/v1/users/me/locale`,{locale:e})}async getMe(){return this.request(`GET`,`/api/v1/auth/me`)}async getAuditLogs(e=8){return this.request(`GET`,`/api/v1/audit-logs?limit=${e}`)}async login(e){return await this.request(`POST`,`/api/v1/auth/login`,e)}async logout(){await this.request(`POST`,`/api/v1/auth/logout`,{}),this.csrfToken=null}async refreshTokens(){if(!this.isRefreshing){this.isRefreshing=!0;try{await this.request(`POST`,`/api/v1/auth/refresh`,{})}finally{this.isRefreshing=!1}}}async request(e,t,n,r){let i=`${this.baseUrl}${t}`,a={"Content-Type":`application/json`,...r};if(![`GET`,`HEAD`,`OPTIONS`].includes(e.toUpperCase())){let e=this.getCsrfToken();e&&(a[`x-csrf-token`]=e)}let o=await fetch(i,{method:e,headers:a,credentials:`include`,body:n?JSON.stringify(n):void 0});if(o.status===401&&!t.includes(`/auth/refresh`)&&!t.includes(`/auth/logout`)&&(await this.refreshTokens(),o=await fetch(i,{method:e,headers:a,credentials:`include`,body:n?JSON.stringify(n):void 0})),!o.ok){let e=await o.json().catch(()=>({error:`Request failed`}));throw Error(e.error??`Request failed: ${o.status}`)}let s=o.headers.get(`set-cookie`);if(s){let e=s.match(/csrf_token=([^;]+)/);e?.[1]&&(this.csrfToken=e[1])}return o.json()}getCsrfToken(){if(this.csrfToken)return this.csrfToken;if(typeof document<`u`){let e=document.cookie.match(/(?:^|;\s*)csrf_token=([^;]+)/);if(e?.[1])return e[1]}return null}async getContent(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.type&&t.set(`type`,e.type),e?.status&&t.set(`status`,e.status),e?.search&&t.set(`search`,e.search),this.request(`GET`,`/api/v1/content?${t.toString()}`)}async getContentById(e){return this.request(`GET`,`/api/v1/content/${e}`)}async createContent(e){return this.request(`POST`,`/api/v1/content`,e)}async updateContent(e,t){return this.request(`PUT`,`/api/v1/content/${e}`,t)}async deleteContent(e){await this.request(`DELETE`,`/api/v1/content/${e}`)}async publishContent(e){return this.request(`POST`,`/api/v1/content/${e}/publish`)}async unpublishContent(e){return this.request(`POST`,`/api/v1/content/${e}/unpublish`)}async publishToggle(e,t){return t?this.unpublishContent(e):this.publishContent(e)}async getContentTypes(){return this.request(`GET`,`/api/v1/content-types`)}async createContentType(e){return this.request(`POST`,`/api/v1/content-types`,e)}async updateContentType(e,t){return this.request(`PUT`,`/api/v1/content-types/${e}`,t)}async deleteContentType(e){await this.request(`DELETE`,`/api/v1/content-types/${e}`)}async getTaxonomies(){return this.request(`GET`,`/api/v1/taxonomies`)}async createTaxonomy(e){return this.request(`POST`,`/api/v1/taxonomies`,e)}async attachTaxonomy(e,t){await this.request(`POST`,`/api/v1/taxonomies/${e}/attach`,{contentType:t})}async detachTaxonomy(e,t){await this.request(`POST`,`/api/v1/taxonomies/${e}/detach`,{contentType:t})}async deleteTaxonomy(e){await this.request(`DELETE`,`/api/v1/taxonomies/${e}`)}async getFieldGroups(e){if(e?.type){let t=new URLSearchParams({type:e.type});for(let[n,r]of Object.entries(e))n!==`type`&&r&&t.set(n,r);return this.request(`GET`,`/api/v1/field-groups?${t.toString()}`)}return this.request(`GET`,`/api/v1/field-groups`)}async getFieldGroup(e){return this.request(`GET`,`/api/v1/field-groups/${e}`)}async createFieldGroup(e){return this.request(`POST`,`/api/v1/field-groups`,e)}async getFieldTypes(e){let t=e?`?category=${encodeURIComponent(e)}`:``;return this.request(`GET`,`/api/v1/field-types${t}`)}async listMedia(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.mimeType&&t.set(`mimeType`,e.mimeType),e?.search&&t.set(`search`,e.search),this.request(`GET`,`/api/v1/media?${t.toString()}`)}async getMedia(e){return this.request(`GET`,`/api/v1/media/${e}`)}async uploadMedia(e,t){let n=new FormData;n.append(`file`,e),t?.alt&&n.append(`alt`,t.alt),t?.caption&&n.append(`caption`,t.caption);let r=`${this.baseUrl}/api/v1/media/upload`,i={},a=this.getCsrfToken();a&&(i[`x-csrf-token`]=a);let o=await fetch(r,{method:`POST`,headers:i,credentials:`include`,body:n});if(!o.ok){let e=await o.json().catch(()=>({error:`Upload failed: ${o.status}`}));throw Error(e.error??`Upload failed: ${o.status}`)}return o.json()}async updateMedia(e,t){return this.request(`PUT`,`/api/v1/media/${e}`,t)}async deleteMedia(e){await this.request(`DELETE`,`/api/v1/media/${e}`)}async listUsers(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.search&&t.set(`search`,e.search),e?.status&&t.set(`status`,e.status),this.request(`GET`,`/api/v1/users?${t.toString()}`)}async getUser(e){return this.request(`GET`,`/api/v1/users/${e}`)}async createUser(e){return this.request(`POST`,`/api/v1/users`,e)}async updateUser(e,t){return this.request(`PUT`,`/api/v1/users/${e}`,t)}async deleteUser(e){await this.request(`DELETE`,`/api/v1/users/${e}`)}async setUserPassword(e,t){await this.request(`PUT`,`/api/v1/users/${e}/password`,{password:t})}async assignRole(e,t){return this.request(`POST`,`/api/v1/users/${e}/roles`,{roleId:t})}async removeRole(e,t){return this.request(`DELETE`,`/api/v1/users/${e}/roles/${t}`)}async listRoles(){return this.request(`GET`,`/api/v1/roles`)}async getSettings(e){let t=e?`?group=${encodeURIComponent(e)}`:``;return this.request(`GET`,`/api/v1/settings${t}`)}async updateSettings(e){await this.request(`PUT`,`/api/v1/settings`,e)}async healthCheck(){return this.request(`GET`,`/health`)}async getThemes(){return(await this.request(`GET`,`/api/v1/themes`)).map(e=>({id:String(e.id??``),name:String(e.name??``),version:e.version?String(e.version):void 0,status:String(e.status??`INSTALLED`),manifest:e.manifest??null}))}async activateTheme(e){return this.request(`POST`,`/api/v1/themes/${e}/activate`)}async deactivateTheme(e){return this.request(`POST`,`/api/v1/themes/${e}/deactivate`)}async getPlugins(){return(await this.request(`GET`,`/api/v1/plugins`)).map(e=>({id:String(e.id??``),name:String(e.name??``),version:String(e.version??``),status:String(e.status??`INSTALLED`),manifest:e.manifest??null}))}async activatePlugin(e){return this.request(`POST`,`/api/v1/plugins/${e}/activate`)}async deactivatePlugin(e){return this.request(`POST`,`/api/v1/plugins/${e}/deactivate`)}};export{e as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,E as t}from"./web.D1H9RxZL.js";import{t as n}from"./api.
|
|
1
|
+
import{C as e,E as t}from"./web.D1H9RxZL.js";import{t as n}from"./api.PfLklAa1.js";var r=[`pt-BR`,`en`,`es-ES`,`ru`,`uk`,`tr`,`he`,`it`,`pl`,`zh-CN`,`ja`,`ar`,`sw`,`yo`,`zu`,`am`,`ha`,`ig`],i={"pt-BR":`Português (Brasil)`,en:`English`,"es-ES":`Español`,ru:`Русский`,uk:`Українська`,tr:`Türkçe`,he:`עברית`,it:`Italiano`,pl:`Polski`,"zh-CN":`中文 (简体)`,ja:`日本語`,ar:`العربية`,sw:`Kiswahili`,yo:`Yorùbá`,zu:`isiZulu`,am:`አማርኛ`,ha:`Hausa`,ig:`Igbo`},a={"pt-BR":`🇧🇷`,en:`🇺🇸`,"es-ES":`🇪🇸`,ru:`🇷🇺`,uk:`🇺🇦`,tr:`🇹🇷`,he:`🇮🇱`,it:`🇮🇹`,pl:`🇵🇱`,"zh-CN":`🇨🇳`,ja:`🇯🇵`,ar:`🇸🇦`,sw:`🇹🇿`,yo:`🇳🇬`,zu:`🇿🇦`,am:`🇪🇹`,ha:`🇳🇬`,ig:`🇳🇬`},o=(e,t,n)=>{let r=t.lastIndexOf(`?`),i=e[r===-1||r<t.lastIndexOf(`/`)?t:t.slice(0,r)];return i?typeof i==`function`?i():Promise.resolve(i):new Promise((e,r)=>{(typeof queueMicrotask==`function`?queueMicrotask:setTimeout)(r.bind(null,Error(`Unknown variable dynamic import: `+t+(t.split(`/`).length===n?``:`. Note that variables only represent file names one level deep.`))))})},s=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),c=function(e){return`/`+e},l={},u=function(e){return e.pathname.endsWith(`.css`)},d=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function d(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=c(t,n);let r=d(t);if(r.href in l)return;l[r.href]=!0;let i=u(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:s,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},f=new Map;async function p(e){if(f.has(e))return f.get(e);try{let t=await o(Object.assign({"./locales/ar.json":()=>d(()=>import(`./ar.CzsjUutD.js`),[]),"./locales/en.json":()=>d(()=>import(`./en.DmN7xy_a.js`),[]),"./locales/es-ES.json":()=>d(()=>import(`./es-ES.p2TLEMlZ.js`),[]),"./locales/he.json":()=>d(()=>import(`./he.BnYHiYpn.js`),[]),"./locales/it.json":()=>d(()=>import(`./it.WrWKBEAD.js`),[]),"./locales/ja.json":()=>d(()=>import(`./ja.DxnfhIdt.js`),[]),"./locales/pl.json":()=>d(()=>import(`./pl.jUj-RfZS.js`),[]),"./locales/pt-BR.json":()=>d(()=>import(`./pt-BR.DtNwEO0i.js`),[]),"./locales/ru.json":()=>d(()=>import(`./ru.KFSfdjWn.js`),[]),"./locales/sw.json":()=>d(()=>import(`./sw.3jlAOLOv.js`),[]),"./locales/tr.json":()=>d(()=>import(`./tr.tnLMnGPg.js`),[]),"./locales/uk.json":()=>d(()=>import(`./uk.VquHY_xc.js`),[]),"./locales/yo.json":()=>d(()=>import(`./yo.Cr8hCb5u.js`),[]),"./locales/zh-CN.json":()=>d(()=>import(`./zh-CN.E32QqP4v.js`),[])}),`./locales/${e}.json`,3),n=t.default??t;return f.set(e,n),n}catch{return e===`en`?{}:p(`en`)}}var m=`admin_locale`;function h(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(?:^|; )${m}=([^;]+)`));return e?.[1]&&r.includes(e[1])?e[1]:null}function g(e){typeof document<`u`&&(document.cookie=`${m}=${e}; path=/; max-age=31536000; SameSite=Lax`)}function _(){if(typeof navigator>`u`)return`en`;let e=navigator.language?.split(`-`)[0]?.toLowerCase(),t=navigator.language?.toLowerCase();for(let n of r)if(n.toLowerCase()===t||n.split(`-`)[0]===e)return n;return`en`}async function v(){try{let e=await n.getUserLocale();if(e&&r.includes(e))return e}catch{}return null}async function y(e){await n.setUserLocale(e)}async function b(){return h()||await v()||_()||`en`}async function x(e){g(e);try{await y(e)}catch{}}var S=new Map;function C(e,t){return function(n,r){let i=n.split(`.`),a=e;for(let e of i)if(a&&typeof a==`object`&&e in a)a=a[e];else{a=t;for(let e of i)if(a&&typeof a==`object`&&e in a)a=a[e];else return n;break}return typeof a==`string`?r?a.replace(/\{(\w+)\}/g,(e,t)=>String(r[t]??``)):a:n}}async function w(e){if(S.has(e))return S.get(e);let[t,n]=await Promise.all([p(e),p(`en`)]),r=C(t,n);return S.set(e,r),r}var T=e=>e,E=`en`,D=!0;function O(n){let[,r]=e(0);return t(async()=>{if(D){let e=n??await b();E=e,T=await w(e),D=!1,r(e=>e+1)}}),{t:(e,t)=>T(e,t),get locale(){return E},changeLocale:async e=>{D=!0,await x(e),E=e,T=await w(e),D=!1,r(e=>e+1)},get loading(){return D}}}export{r as i,a as n,i as r,O as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./api.
|
|
1
|
+
import{t as e}from"./api.PfLklAa1.js";var n=document.getElementById(`login-form`),r=document.getElementById(`error-message`),i=document.getElementById(`submit-text`),a=document.getElementById(`submit-spinner`);n?.addEventListener(`submit`,async o=>{o.preventDefault();let s=new FormData(n),c=s.get(`email`),l=s.get(`password`);i.style.display=`none`,a.style.display=`inline-block`,r.style.display=`none`;try{await e.login({email:c,password:l}),window.location.href=`/`}catch(e){r.textContent=e instanceof Error?e.message:t(`login.failed`),r.style.display=`block`}finally{i.style.display=`inline`,a.style.display=`none`}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={name:`okcms`,version:`0.4.13`,private:!0,description:`Hybrid, modular, API-first CMS`,engines:{node:`>=20.0.0`,bun:`>=1.3.0`},workspaces:[`apps/*`,`packages/*`,`plugins/*`,`themes/*`],overrides:{ioredis:`5.3.0`},scripts:{dev:`bun run --filter '@oktis-works/*' dev`,build:`bun run --filter '@oktis-works/*' build`,test:`vitest`,"test:run":`vitest run`,lint:`eslint .`,typecheck:`tsc --noEmit`,clean:`rm -rf node_modules apps/*/node_modules packages/*/node_modules`,changeset:`changeset`,"version-packages":`changeset version`,"publish:all":`node scripts/prepare-publish.mjs && for pkg in packages/* apps/api apps/admin apps/web apps/worker; do [ -f "$pkg/package.json" ] || continue; echo "→ publishing $pkg"; (cd "$pkg" && npm publish --access public) || exit 1; done`},devDependencies:{"@changesets/changelog-github":`^1.0.1`,"@changesets/cli":`^3.0.3`,"@types/node":`22.0.0`,"@types/semver":`7.7.0`,"@typescript-eslint/eslint-plugin":`^8.71.0`,"@typescript-eslint/parser":`8.0.0`,autoprefixer:`^10.6.1`,eslint:`9.0.0`,playwright:`1.59.1`,"playwright-core":`1.59.1`,postcss:`^8.5.28`,sass:`^1.105.1`,tailwindcss:`^4.3.3`,typescript:`5.7.3`,"typescript-eslint":`8.31.0`,vitest:`3.0.0`},packageManager:`bun@1.3.14`}.version;export{e as t};
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import { S as createAstro, f as renderHead,
|
|
1
|
+
import { S as createAstro, f as renderHead, p as addAttribute, s as renderSlot, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
2
2
|
import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
|
|
3
|
-
//#region ../../node_modules/.bun/astro@7.3.5+3335b8e0b249efdf/node_modules/astro/dist/runtime/server/render/script.js
|
|
4
|
-
async function renderScript(result, id) {
|
|
5
|
-
const inlined = result.inlinedScripts.get(id);
|
|
6
|
-
let content = "";
|
|
7
|
-
if (inlined != null) {
|
|
8
|
-
if (inlined) content = `<script type="module">${inlined}<\/script>`;
|
|
9
|
-
} else {
|
|
10
|
-
const resolved = await result.resolve(id);
|
|
11
|
-
content = `<script type="module" src="${result.userAssetsBase ? (result.base === "/" ? "" : result.base) + result.userAssetsBase : ""}${resolved}"><\/script>`;
|
|
12
|
-
}
|
|
13
|
-
return createRenderInstruction({
|
|
14
|
-
type: "script",
|
|
15
|
-
id,
|
|
16
|
-
content
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
3
|
//#region src/layouts/BaseLayout.astro
|
|
21
4
|
createAstro("https://astro.build");
|
|
22
5
|
var $$BaseLayout = createComponent(($$result, $$props, $$slots) => {
|
|
@@ -29,4 +12,4 @@ var $$BaseLayout = createComponent(($$result, $$props, $$slots) => {
|
|
|
29
12
|
return renderTemplate`<html${addAttribute(htmlLang, "lang")}${addAttribute(dir, "dir")}><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description"${addAttribute(description ?? "OkCMS Admin Dashboard", "content")}><title>${title} | OkCMS</title><link rel="icon" type="image/svg+xml" href="/favicon.svg">${renderHead($$result)}</head><body>${renderSlot($$result, $$slots["default"])}</body></html>`;
|
|
30
13
|
}, "/home/runner/work/cms/cms/apps/admin/src/layouts/BaseLayout.astro", void 0);
|
|
31
14
|
//#endregion
|
|
32
|
-
export {
|
|
15
|
+
export { $$BaseLayout as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
2
|
-
import { a as For2, d as createMemo$1, f as createSignal$1, l as Show2 } from "./
|
|
1
|
+
import { n as useTranslation, r as apiClient } from "./i18n_Dj2ieo-N.mjs";
|
|
2
|
+
import { a as For2, d as createMemo$1, f as createSignal$1, l as Show2 } from "./DashboardLayout_B9pE8ZBQ.mjs";
|
|
3
3
|
import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
4
4
|
import { For, Show, createMemo, createSignal, onMount } from "solid-js";
|
|
5
5
|
//#region ../../packages/validation/dist/client-validate.js
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, p as addAttribute, s as renderSlot, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./
|
|
4
|
+
import { t as renderScript } from "./script_CPGt5jAh.mjs";
|
|
5
|
+
import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./i18n_Dj2ieo-N.mjs";
|
|
6
|
+
import { t as $$BaseLayout } from "./BaseLayout_BsR68tOH.mjs";
|
|
6
7
|
import { t as require_semver } from "./semver_WbqCUY_o.mjs";
|
|
7
8
|
import { createComponent, escape, isServer, ssr, ssrAttribute, ssrHydrationKey, ssrStyle } from "solid-js/web";
|
|
8
9
|
import { For, For as For2, Show, Show as Show2, createMemo as createMemo$1, createSignal, createSignal as createSignal$1, onCleanup, onMount, onMount as onMount$1 } from "solid-js";
|
|
@@ -1062,7 +1063,7 @@ function HelpTabs(props) {
|
|
|
1062
1063
|
/** Versão do release atual (ex.: "0.4.0"). */
|
|
1063
1064
|
var APP_VERSION = {
|
|
1064
1065
|
name: "okcms",
|
|
1065
|
-
version: "0.4.
|
|
1066
|
+
version: "0.4.13",
|
|
1066
1067
|
"private": true,
|
|
1067
1068
|
description: "Hybrid, modular, API-first CMS",
|
|
1068
1069
|
engines: {
|
|
@@ -1456,7 +1457,9 @@ var $$DashboardLayout = createComponent$1(($$result, $$props, $$slots) => {
|
|
|
1456
1457
|
content: isActive("/content"),
|
|
1457
1458
|
media: isActive("/media"),
|
|
1458
1459
|
users: isActive("/users"),
|
|
1459
|
-
settings: isActive("/settings")
|
|
1460
|
+
settings: isActive("/settings"),
|
|
1461
|
+
plugins: isActive("/plugins"),
|
|
1462
|
+
themes: isActive("/themes")
|
|
1460
1463
|
};
|
|
1461
1464
|
const settingsChildren = [
|
|
1462
1465
|
{
|
|
@@ -1519,7 +1522,7 @@ var $$DashboardLayout = createComponent$1(($$result, $$props, $$slots) => {
|
|
|
1519
1522
|
"client:component-hydration": "load",
|
|
1520
1523
|
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/admin-bar/AdminBar.tsx",
|
|
1521
1524
|
"client:component-export": "AdminBar"
|
|
1522
|
-
})}${maybeRenderHead($$result)}<div class="layout" data-astro-cid-ynf3rr4n><!-- Sidebar
|
|
1525
|
+
})}${maybeRenderHead($$result)}<div class="layout" data-astro-cid-ynf3rr4n><!-- Sidebar colapsavel — o estado (body.sidebar-collapsed) e aplicado pelo script abaixo --><aside class="sidebar" data-astro-cid-ynf3rr4n><div class="sidebar-header" data-astro-cid-ynf3rr4n><h2 class="text-lg font-bold" data-astro-cid-ynf3rr4n>${t("layout.appName")}</h2><span class="badge badge-secondary" data-astro-cid-ynf3rr4n>${t("layout.admin")}</span><span class="sidebar-collapsed-brand"${addAttribute(t("layout.appName"), "title")} data-astro-cid-ynf3rr4n><svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="28" height="28" data-astro-cid-ynf3rr4n><rect width="32" height="32" rx="8" fill="url(#grad)" data-astro-cid-ynf3rr4n></rect><path d="M8 10h16M8 16h12M8 22h8" stroke="#0A0A0A" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n></path><defs data-astro-cid-ynf3rr4n><linearGradient id="grad" x1="0" y1="0" x2="32" y2="32" gradientUnits="userSpaceOnUse" data-astro-cid-ynf3rr4n><stop offset="0%" stop-color="#D8B45E" data-astro-cid-ynf3rr4n></stop><stop offset="100%" stop-color="#B99542" data-astro-cid-ynf3rr4n></stop></linearGradient></defs></svg></span></div><nav class="sidebar-nav" data-astro-cid-ynf3rr4n><a href="/"${addAttribute(["nav-item", { active: navActive.dashboard }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><rect x="3" y="3" width="7" height="7" data-astro-cid-ynf3rr4n></rect><rect x="14" y="3" width="7" height="7" data-astro-cid-ynf3rr4n></rect><rect x="14" y="14" width="7" height="7" data-astro-cid-ynf3rr4n></rect><rect x="3" y="14" width="7" height="7" data-astro-cid-ynf3rr4n></rect></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.dashboard")}</span></a><a href="/content"${addAttribute(["nav-item", { active: navActive.content }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-astro-cid-ynf3rr4n></path><polyline points="14 2 14 8 20 8" data-astro-cid-ynf3rr4n></polyline><line x1="16" y1="13" x2="8" y2="13" data-astro-cid-ynf3rr4n></line><line x1="16" y1="17" x2="8" y2="17" data-astro-cid-ynf3rr4n></line><polyline points="10 9 9 9 8 9" data-astro-cid-ynf3rr4n></polyline></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.content")}</span></a><a href="/media"${addAttribute(["nav-item", { active: navActive.media }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><rect x="3" y="3" width="18" height="18" rx="2" ry="2" data-astro-cid-ynf3rr4n></rect><circle cx="8.5" cy="8.5" r="1.5" data-astro-cid-ynf3rr4n></circle><polyline points="21 15 16 10 5 21" data-astro-cid-ynf3rr4n></polyline></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.media")}</span></a><a href="/users"${addAttribute(["nav-item", { active: navActive.users }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" data-astro-cid-ynf3rr4n></path><circle cx="9" cy="7" r="4" data-astro-cid-ynf3rr4n></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87" data-astro-cid-ynf3rr4n></path><path d="M16 3.13a4 4 0 0 1 0 7.75" data-astro-cid-ynf3rr4n></path></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.users")}</span></a><a href="/settings"${addAttribute(["nav-item", { active: navActive.settings }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><circle cx="12" cy="12" r="3" data-astro-cid-ynf3rr4n></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-ynf3rr4n></path></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.settings")}</span></a><a href="/plugins"${addAttribute(["nav-item", { active: navActive.plugins }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><rect x="2" y="2" width="20" height="20" rx="2" ry="2" data-astro-cid-ynf3rr4n></rect><path d="M15 7h4a2 2 0 0 1 2 2v4" data-astro-cid-ynf3rr4n></path><path d="M9 17H5a2 2 0 0 1-2-2V9" data-astro-cid-ynf3rr4n></path><line x1="8" y1="12" x2="16" y2="12" data-astro-cid-ynf3rr4n></line></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.plugins")}</span></a><a href="/themes"${addAttribute(["nav-item", { active: navActive.themes }], "class:list")} data-astro-cid-ynf3rr4n><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-ynf3rr4n><circle cx="12" cy="12" r="10" data-astro-cid-ynf3rr4n></circle><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" data-astro-cid-ynf3rr4n></path><path d="M2 12h20" data-astro-cid-ynf3rr4n></path></svg><span class="nav-label" data-astro-cid-ynf3rr4n>${t("layout.nav.themes")}</span></a><!-- Submenu de configuracoes (CSS esconde quando a sidebar esta colapsada) --><div class="nav-submenu" data-astro-cid-ynf3rr4n>${settingsChildren.map((child) => renderTemplate`<a${addAttribute(child.href, "href")}${addAttribute(["nav-subitem", { active: child.active }], "class:list")} data-astro-cid-ynf3rr4n>${child.label}</a>`)}</div><!-- D1: slots de extensao — paginas de menu declaradas por plugins ativos -->${renderComponent($$result, "PluginExtensionsSlot", PluginExtensionsSlot, {
|
|
1523
1526
|
"client:load": true,
|
|
1524
1527
|
"data-astro-cid-ynf3rr4n": true,
|
|
1525
1528
|
"client:component-hydration": "load",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
2
|
-
import { a as For2, c as Select, f as createSignal, l as Show2, o as Input, p as onMount, r as Button, s as Pagination } from "./
|
|
1
|
+
import { n as useTranslation, r as apiClient } from "./i18n_Dj2ieo-N.mjs";
|
|
2
|
+
import { a as For2, c as Select, f as createSignal, l as Show2, o as Input, p as onMount, r as Button, s as Pagination } from "./DashboardLayout_B9pE8ZBQ.mjs";
|
|
3
3
|
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey, ssrStyleProperty } from "solid-js/web";
|
|
4
4
|
//#region src/components/media/MediaLibrary.tsx
|
|
5
5
|
var _tmpl$ = [
|
|
@@ -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, p as addAttribute, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { t as $$DashboardLayout } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_B9pE8ZBQ.mjs";
|
|
5
5
|
//#region src/pages/plugins/[slug].astro
|
|
6
6
|
var _slug__exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
default: () => $$Slug,
|
|
@@ -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 ContentEditor } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_B9pE8ZBQ.mjs";
|
|
5
|
+
import { t as ContentEditor } from "./ContentEditor_BtclxOqH.mjs";
|
|
6
6
|
//#region src/pages/content/edit.astro
|
|
7
7
|
var edit_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
default: () => $$Edit,
|
|
@@ -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 { c as Select, f as createSignal, i as Card, l as Show2, o as Input, p as onMount, r as Button, t as $$DashboardLayout } from "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_Dj2ieo-N.mjs";
|
|
5
|
+
import { c as Select, f as createSignal, i as Card, l as Show2, o as Input, p as onMount, r as Button, t as $$DashboardLayout } from "./DashboardLayout_B9pE8ZBQ.mjs";
|
|
6
6
|
import { createComponent, escape, memo, ssr, ssrHydrationKey } from "solid-js/web";
|
|
7
7
|
//#region src/components/apps/settings/GeneralSettings.tsx
|
|
8
8
|
var _tmpl$ = [
|
|
@@ -402,6 +402,27 @@ var ApiClient = class {
|
|
|
402
402
|
manifest: theme["manifest"] ?? null
|
|
403
403
|
}));
|
|
404
404
|
}
|
|
405
|
+
async activateTheme(id) {
|
|
406
|
+
return this.request("POST", `/api/v1/themes/${id}/activate`);
|
|
407
|
+
}
|
|
408
|
+
async deactivateTheme(id) {
|
|
409
|
+
return this.request("POST", `/api/v1/themes/${id}/deactivate`);
|
|
410
|
+
}
|
|
411
|
+
async getPlugins() {
|
|
412
|
+
return (await this.request("GET", "/api/v1/plugins")).map((plugin) => ({
|
|
413
|
+
id: String(plugin["id"] ?? ""),
|
|
414
|
+
name: String(plugin["name"] ?? ""),
|
|
415
|
+
version: String(plugin["version"] ?? ""),
|
|
416
|
+
status: String(plugin["status"] ?? "INSTALLED"),
|
|
417
|
+
manifest: plugin["manifest"] ?? null
|
|
418
|
+
}));
|
|
419
|
+
}
|
|
420
|
+
async activatePlugin(id) {
|
|
421
|
+
return this.request("POST", `/api/v1/plugins/${id}/activate`);
|
|
422
|
+
}
|
|
423
|
+
async deactivatePlugin(id) {
|
|
424
|
+
return this.request("POST", `/api/v1/plugins/${id}/deactivate`);
|
|
425
|
+
}
|
|
405
426
|
};
|
|
406
427
|
var apiClient = new ApiClient();
|
|
407
428
|
//#endregion
|
|
@@ -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 { t as $$DashboardLayout } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_B9pE8ZBQ.mjs";
|
|
5
5
|
//#region src/pages/settings/index.astro
|
|
6
6
|
var settings_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
default: () => $$Index,
|
|
@@ -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_Dj2ieo-N.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_B9pE8ZBQ.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_B9pE8ZBQ.mjs";
|
|
5
|
+
import { t as MediaLibrary } from "./MediaLibrary_DLO2K_4d.mjs";
|
|
6
6
|
//#region src/pages/media/index.astro
|
|
7
7
|
var media_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
default: () => $$Index,
|
|
@@ -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_Dj2ieo-N.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_B9pE8ZBQ.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
|
|
@@ -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 { 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 "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_Dj2ieo-N.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_B9pE8ZBQ.mjs";
|
|
6
6
|
import { createComponent, escape, ssr, ssrHydrationKey } from "solid-js/web";
|
|
7
7
|
import { Show, createSignal, onMount } from "solid-js";
|
|
8
8
|
//#region src/components/content/ContentList.tsx
|
|
@@ -1,7 +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 {
|
|
4
|
+
import { t as renderScript } from "./script_CPGt5jAh.mjs";
|
|
5
|
+
import { t as $$BaseLayout } from "./BaseLayout_BsR68tOH.mjs";
|
|
5
6
|
//#region src/pages/login.astro
|
|
6
7
|
var login_exports = /* @__PURE__ */ __exportAll({
|
|
7
8
|
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 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { t as $$DashboardLayout } from "./
|
|
5
|
-
import { t as ContentEditor } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_B9pE8ZBQ.mjs";
|
|
5
|
+
import { t as ContentEditor } from "./ContentEditor_BtclxOqH.mjs";
|
|
6
6
|
//#region src/pages/content/new.astro
|
|
7
7
|
var new_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
default: () => $$New,
|
|
@@ -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_Dj2ieo-N.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_B9pE8ZBQ.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
|