@oktis-works/admin 0.4.14 → 0.4.15
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.C2ETg6u_.js → ActivityWidget.B83CLwGG.js} +1 -1
- package/dist/client/_astro/{AdminBar.Dc_oT_my.js → AdminBar.BNESswxs.js} +23 -4
- package/dist/client/_astro/{AtGlanceWidget.BVCJB3QT.js → AtGlanceWidget.Cqbb9anJ.js} +1 -1
- package/dist/client/_astro/{ContentEditor.CoCaseap.js → ContentEditor.CBH227Ni.js} +1 -1
- package/dist/client/_astro/{ContentList.Qp90yZEx.js → ContentList.hmLCz5_S.js} +1 -1
- package/dist/client/_astro/{CustomFieldsManager.B2JEuxBb.js → CustomFieldsManager.Dzhp_sZl.js} +1 -1
- package/dist/client/_astro/{DashboardHome.CgDrZavo.js → DashboardHome.DawF-CZ9.js} +1 -1
- package/dist/client/_astro/{DashboardLayout.astro_astro_type_script_index_0_lang.nXh9K0OY.js → DashboardLayout.astro_astro_type_script_index_0_lang.Ckp0okyg.js} +1 -1
- package/dist/client/_astro/{Footer.BpxMjlJE.js → Footer.dcA-nmBA.js} +8 -8
- package/dist/client/_astro/{GeneralSettings.BVFwXCbR.js → GeneralSettings.DdAwp-oL.js} +1 -1
- package/dist/client/_astro/{MediaLibrary.CGzXvUbD.js → MediaLibrary.B9SPVPYH.js} +1 -1
- package/dist/client/_astro/{PluginManager.CQW7_Hl-.js → PluginManager.DN5xhAsV.js} +1 -1
- package/dist/client/_astro/{PostTypesManager.CFX0sR5p.js → PostTypesManager.BZH1eM3c.js} +1 -1
- package/dist/client/_astro/{QuickDraftWidget.DLaU-WiG.js → QuickDraftWidget.DBvLubay.js} +1 -1
- package/dist/client/_astro/{ResourceHubs.DasaSiMK.js → ResourceHubs.BvrE39A0.js} +1 -1
- package/dist/client/_astro/{TaxonomiesManager.CralM7Ne.js → TaxonomiesManager.BrjG05jb.js} +1 -1
- package/dist/client/_astro/{ThemeManager.C9mBa-po.js → ThemeManager.CsrK3HXj.js} +1 -1
- package/dist/client/_astro/{UserCreateForm.D6rRUn0J.js → UserCreateForm.Dxq80Bqx.js} +1 -1
- package/dist/client/_astro/{UsersManager.DdpgI0mN.js → UsersManager.DmBadxWw.js} +1 -1
- package/dist/client/_astro/api.BfxYC8bU.js +1 -0
- package/dist/client/_astro/{extensions.roNfOg-_.js → extensions.C6GOqTCd.js} +1 -1
- package/dist/client/_astro/{i18n.D0KNEGgP.js → i18n.B4BuieMb.js} +1 -1
- package/dist/client/_astro/{login.astro_astro_type_script_index_0_lang.CdYoT76J.js → login.astro_astro_type_script_index_0_lang.yH8kNMtD.js} +1 -1
- package/dist/client/_astro/{src.DyLYQxi2.js → src.HVGUo-fm.js} +1 -1
- package/dist/client/_astro/{version.CoiXQYz6.js → version.CilNJ_fk.js} +1 -1
- package/dist/server/chunks/{BaseLayout_4yJ0PQCS.mjs → BaseLayout_BmkfK9tu.mjs} +19 -2
- package/dist/server/chunks/{ContentEditor_Dtmf4Zk6.mjs → ContentEditor_C-kz5cS4.mjs} +2 -2
- package/dist/server/chunks/{DashboardLayout_DnE23ArY.mjs → DashboardLayout_KIUq60Dv.mjs} +8 -9
- package/dist/server/chunks/{MediaLibrary_CKvvgCI6.mjs → MediaLibrary_C-lJBpPG.mjs} +2 -2
- package/dist/server/chunks/{ResourceHubs_Aoy5L4qj.mjs → ResourceHubs_T-WuZoVF.mjs} +1 -1
- package/dist/server/chunks/{_slug__DtzYz9Uz.mjs → _slug__DjcyD19w.mjs} +1 -1
- package/dist/server/chunks/{access_BNFcmbp2.mjs → access_Bjuw_Gvp.mjs} +2 -2
- package/dist/server/chunks/{custom-fields_90Jyw521.mjs → custom-fields_CxntKU56.mjs} +2 -2
- package/dist/server/chunks/{edit_BmWxJDZa.mjs → edit_CFKKfQux.mjs} +2 -2
- package/dist/server/chunks/{general_AGjbJVe-.mjs → general_CVsJAP2e.mjs} +2 -2
- package/dist/server/chunks/{i18n_Csb4GGX2.mjs → i18n_CH59YTvE.mjs} +134 -54
- package/dist/server/chunks/{index_CUsSNKEq.mjs → index_2Y9ZC7Gs.mjs} +2 -2
- package/dist/server/chunks/{index_BKm7s1bn.mjs → index_Bb3w_UqS.mjs} +2 -2
- package/dist/server/chunks/{index_D5IP16pU.mjs → index_BqyoH4bc.mjs} +2 -2
- package/dist/server/chunks/{index_C7yZO-zD.mjs → index_G7lx2uke.mjs} +2 -2
- package/dist/server/chunks/{index_b00ttelz.mjs → index_TyNyWm6y.mjs} +1 -1
- package/dist/server/chunks/{login_lEEcbYs3.mjs → login_BCjtaOE9.mjs} +1 -2
- package/dist/server/chunks/{new_BjtzqhsE.mjs → new_BZOJIQfZ.mjs} +2 -2
- package/dist/server/chunks/{new_BDjFzd-l.mjs → new_DkHY3O0r.mjs} +2 -2
- package/dist/server/chunks/{operations_D7TMl0mB.mjs → operations_DYc6rwSI.mjs} +2 -2
- package/dist/server/chunks/{plugins_KhRV7kiu.mjs → plugins_p805vlEb.mjs} +11 -7
- package/dist/server/chunks/{post-types_DfXwkNIg.mjs → post-types_C7YAi_V0.mjs} +2 -2
- package/dist/server/chunks/{resources_BbhlUSXs.mjs → resources_BVP5krU_.mjs} +2 -2
- package/dist/server/chunks/{taxonomies_CF7qpKG3.mjs → taxonomies_CWhPYZDq.mjs} +2 -2
- package/dist/server/chunks/{themes_RAw8tJmy.mjs → themes_iwb1637h.mjs} +11 -7
- package/dist/server/chunks/{upload_BBZ9ttmU.mjs → upload_BE7qzxe7.mjs} +2 -2
- package/dist/server/entry.mjs +21 -21
- package/dist/server/virtual_astro_middleware.mjs +1 -1
- package/package.json +1 -1
- package/dist/client/_astro/api.CDW61rqX.js +0 -1
- package/dist/server/chunks/script_CPGt5jAh.mjs +0 -19
|
@@ -1,9 +1,8 @@
|
|
|
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 "./
|
|
6
|
-
import { t as $$BaseLayout } from "./BaseLayout_4yJ0PQCS.mjs";
|
|
4
|
+
import { n as renderScript, t as $$BaseLayout } from "./BaseLayout_BmkfK9tu.mjs";
|
|
5
|
+
import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./i18n_CH59YTvE.mjs";
|
|
7
6
|
import { t as require_semver } from "./semver_WbqCUY_o.mjs";
|
|
8
7
|
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey, ssrStyle } from "solid-js/web";
|
|
9
8
|
import { For, For as For2, Show, Show as Show2, createMemo as createMemo$1, createSignal, createSignal as createSignal$1, onMount, onMount as onMount$1 } from "solid-js";
|
|
@@ -395,7 +394,7 @@ function PluginExtensionsSlot() {
|
|
|
395
394
|
}
|
|
396
395
|
//#endregion
|
|
397
396
|
//#region src/components/admin-bar/AdminBar.tsx
|
|
398
|
-
var _tmpl$$4 = ["<style", ">\n #admin-bar {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 46px;\n background: #0A0A0A;\n border-bottom: 1px solid #333;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 1rem;\n z-index: 2000;\n font-family: inherit;\n }\n #admin-bar * { box-sizing: border-box; }\n .admin-bar-left, .admin-bar-right {\n display: flex;\n align-items: center;\n gap: 1rem;\n }\n .admin-bar-brand {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n color: #FAF5E8;\n font-weight: 600;\n font-size: 1.125rem;\n text-decoration: none;\n padding: 0.375rem 0.75rem;\n border-radius: 0.375rem;\n transition: background 0.15s;\n }\n .admin-bar-brand:hover {\n background: rgba(255,255,255,0.08);\n }\n .admin-bar-brand svg { width: 28px; height: 28px; }\n .admin-bar-separator { width: 1px; height: 24px; background: #333; }\n .admin-bar-menu { display: flex; gap: 0.25rem; }\n .admin-bar-menu-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.375rem 0.75rem;\n color: rgba(255,255,255,0.7);\n font-size: 0.8125rem;\n font-weight: 500;\n border-radius: 0.375rem;\n text-decoration: none;\n transition: all 0.15s;\n }\n .admin-bar-menu-item:hover {\n background: rgba(255,255,255,0.1);\n color: #fff;\n }\n .admin-bar-menu-item svg { width: 18px; height: 18px; }\n .admin-bar-right { gap: 0.75rem; }\n .notifications-btn {\n position: relative;\n background: none;\n border: none;\n color: rgba(255,255,255,0.7);\n padding: 0.375rem;\n border-radius: 0.375rem;\n cursor: pointer;\n transition: all 0.15s;\n }\n .notifications-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }\n .notifications-badge {\n position: absolute;\n top: 2px;\n right: 2px;\n min-width: 16px;\n height: 16px;\n background: #EF4444;\n color: #fff;\n font-size: 0.625rem;\n font-weight: 600;\n border-radius: 9999px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 4px;\n }\n .notifications-dropdown { position: relative; }\n .notifications-panel {\n position: absolute;\n top: calc(100% + 0.5rem);\n right: 0;\n min-width: 280px;\n max-width: 90vw;\n background: #FFFFFF;\n border: 1px solid #DCDCDE;\n border-radius: 0.5rem;\n box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);\n z-index: 2100;\n overflow: hidden;\n animation: slideIn 0.15s ease-out;\n }\n .notifications-header {\n padding: 0.75rem 1rem;\n font-size: 0.6875rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: #646970;\n border-bottom: 1px solid #DCDCDE;\n }\n .notifications-item {\n display: flex;\n flex-direction: column;\n gap: 0.125rem;\n padding: 0.625rem 1rem;\n border-bottom: 1px solid #F6F7F7;\n }\n .notifications-item:last-child { border-bottom: none; }\n .notifications-action {\n font-size: 0.8125rem;\n font-weight: 600;\n color: #2C3338;\n font-family: ui-monospace, SFMono-Regular, monospace;\n word-break: break-word;\n }\n .notifications-meta {\n display: flex;\n justify-content: space-between;\n gap: 0.75rem;\n font-size: 0.6875rem;\n color: #646970;\n }\n .notifications-empty { padding: 1rem; margin: 0; font-size: 0.8125rem; color: #646970; }\n .user-menu-trigger {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n background: none;\n border: none;\n color: #fff;\n padding: 0.375rem 0.75rem;\n border-radius: 0.375rem;\n cursor: pointer;\n font-size: 0.8125rem;\n font-weight: 500;\n transition: background 0.15s;\n }\n .user-menu-trigger:hover { background: rgba(255,255,255,0.1); }\n .user-avatar {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: linear-gradient(135deg, #D8B45E 0%, #B99542 100%);\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n font-size: 0.875rem;\n color: #0A0A0A;\n }\n .user-menu-dropdown {\n position: absolute;\n top: calc(100% + 0.5rem);\n right: 0;\n min-width: 200px;\n background: #FFFFFF;\n border: 1px solid #DCDCDE;\n border-radius: 0.5rem;\n box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);\n z-index: 2100;\n overflow: hidden;\n animation: slideIn 0.15s ease-out;\n }\n @keyframes slideIn { from { opacity: 0; transform: translateY(-0.5rem); } to { opacity: 1; transform: translateY(0); } }\n .user-menu-header {\n padding: 1rem;\n border-bottom: 1px solid #DCDCDE;\n }\n .user-menu-name { font-weight: 600; color: #0A0A0A; font-size: 0.875rem; }\n .user-menu-email { color: #646970; font-size: 0.75rem; margin-top: 0.125rem; }\n .user-menu-divider { height: 1px; background: #DCDCDE; }\n .user-menu-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n width: 100%;\n padding: 0.625rem 1rem;\n background: none;\n border: none;\n color: #2C3338;\n font-size: 0.8125rem;\n font-weight: 500;\n text-align: left;\n cursor: pointer;\n transition: background 0.15s;\n }\n .user-menu-item:hover { background: #F6F7F7; }\n .user-menu-item svg { width: 18px; height: 18px; color: #646970; }\n .user-menu-item.danger { color: #EF4444; }\n .user-menu-item.danger:hover { background: #FEF2F2; }\n .lang-menu-dropdown {\n position: absolute;\n top: calc(100% + 0.5rem);\n right: 0;\n min-width:
|
|
397
|
+
var _tmpl$$4 = ["<style", ">\n #admin-bar {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 46px;\n background: #0A0A0A;\n border-bottom: 1px solid #333;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 1rem;\n z-index: 2000;\n font-family: inherit;\n }\n #admin-bar * { box-sizing: border-box; }\n .admin-bar-left, .admin-bar-right {\n display: flex;\n align-items: center;\n gap: 1rem;\n }\n .admin-bar-brand {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n color: #FAF5E8;\n font-weight: 600;\n font-size: 1.125rem;\n text-decoration: none;\n padding: 0.375rem 0.75rem;\n border-radius: 0.375rem;\n transition: background 0.15s;\n }\n .admin-bar-brand:hover {\n background: rgba(255,255,255,0.08);\n }\n .admin-bar-brand svg { width: 28px; height: 28px; }\n .admin-bar-separator { width: 1px; height: 24px; background: #333; }\n .admin-bar-menu { display: flex; gap: 0.25rem; }\n .admin-bar-menu-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.375rem 0.75rem;\n color: rgba(255,255,255,0.7);\n font-size: 0.8125rem;\n font-weight: 500;\n border-radius: 0.375rem;\n text-decoration: none;\n transition: all 0.15s;\n }\n .admin-bar-menu-item:hover {\n background: rgba(255,255,255,0.1);\n color: #fff;\n }\n .admin-bar-menu-item svg { width: 18px; height: 18px; }\n .admin-bar-right { gap: 0.75rem; }\n .notifications-btn {\n position: relative;\n background: none;\n border: none;\n color: rgba(255,255,255,0.7);\n padding: 0.375rem;\n border-radius: 0.375rem;\n cursor: pointer;\n transition: all 0.15s;\n }\n .notifications-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }\n .notifications-badge {\n position: absolute;\n top: 2px;\n right: 2px;\n min-width: 16px;\n height: 16px;\n background: #EF4444;\n color: #fff;\n font-size: 0.625rem;\n font-weight: 600;\n border-radius: 9999px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 4px;\n }\n .notifications-dropdown { position: relative; }\n .lang-dropdown {\n position: relative;\n display: flex;\n align-items: center;\n }\n .lang-dropdown > .notifications-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.4rem;\n min-height: 32px;\n line-height: 1;\n white-space: nowrap;\n }\n .notifications-panel {\n position: absolute;\n top: calc(100% + 0.5rem);\n right: 0;\n min-width: 280px;\n max-width: 90vw;\n background: #FFFFFF;\n border: 1px solid #DCDCDE;\n border-radius: 0.5rem;\n box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);\n z-index: 2100;\n overflow: hidden;\n animation: slideIn 0.15s ease-out;\n }\n .notifications-header {\n padding: 0.75rem 1rem;\n font-size: 0.6875rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: #646970;\n border-bottom: 1px solid #DCDCDE;\n }\n .notifications-item {\n display: flex;\n flex-direction: column;\n gap: 0.125rem;\n padding: 0.625rem 1rem;\n border-bottom: 1px solid #F6F7F7;\n }\n .notifications-item:last-child { border-bottom: none; }\n .notifications-action {\n font-size: 0.8125rem;\n font-weight: 600;\n color: #2C3338;\n font-family: ui-monospace, SFMono-Regular, monospace;\n word-break: break-word;\n }\n .notifications-meta {\n display: flex;\n justify-content: space-between;\n gap: 0.75rem;\n font-size: 0.6875rem;\n color: #646970;\n }\n .notifications-empty { padding: 1rem; margin: 0; font-size: 0.8125rem; color: #646970; }\n .user-menu-trigger {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n background: none;\n border: none;\n color: #fff;\n padding: 0.375rem 0.75rem;\n border-radius: 0.375rem;\n cursor: pointer;\n font-size: 0.8125rem;\n font-weight: 500;\n transition: background 0.15s;\n }\n .user-menu-trigger:hover { background: rgba(255,255,255,0.1); }\n .user-avatar {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: linear-gradient(135deg, #D8B45E 0%, #B99542 100%);\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n font-size: 0.875rem;\n color: #0A0A0A;\n }\n .user-menu-dropdown {\n position: absolute;\n top: calc(100% + 0.5rem);\n right: 0;\n min-width: 200px;\n background: #FFFFFF;\n border: 1px solid #DCDCDE;\n border-radius: 0.5rem;\n box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);\n z-index: 2100;\n overflow: hidden;\n animation: slideIn 0.15s ease-out;\n }\n @keyframes slideIn { from { opacity: 0; transform: translateY(-0.5rem); } to { opacity: 1; transform: translateY(0); } }\n .user-menu-header {\n padding: 1rem;\n border-bottom: 1px solid #DCDCDE;\n }\n .user-menu-name { font-weight: 600; color: #0A0A0A; font-size: 0.875rem; }\n .user-menu-email { color: #646970; font-size: 0.75rem; margin-top: 0.125rem; }\n .user-menu-divider { height: 1px; background: #DCDCDE; }\n .user-menu-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n width: 100%;\n padding: 0.625rem 1rem;\n background: none;\n border: none;\n color: #2C3338;\n font-size: 0.8125rem;\n font-weight: 500;\n text-align: left;\n cursor: pointer;\n transition: background 0.15s;\n }\n .user-menu-item:hover { background: #F6F7F7; }\n .user-menu-item svg { width: 18px; height: 18px; color: #646970; }\n .user-menu-item.danger { color: #EF4444; }\n .user-menu-item.danger:hover { background: #FEF2F2; }\n .lang-menu-dropdown {\n position: absolute;\n top: calc(100% + 0.5rem);\n right: 0;\n min-width: 192px;\n max-height: min(18rem, calc(100vh - 3.5rem));\n background: #FFFFFF;\n border: 1px solid #DCDCDE;\n border-radius: 0.5rem;\n box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);\n z-index: 2100;\n overflow-x: hidden;\n overflow-y: auto;\n overscroll-behavior: contain;\n scrollbar-gutter: stable;\n animation: slideIn 0.15s ease-out;\n }\n @keyframes slideIn { from { opacity: 0; transform: translateY(-0.5rem); } to { opacity: 1; transform: translateY(0); } }\n .lang-menu-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n width: 100%;\n padding: 0.625rem 1rem;\n background: none;\n border: none;\n color: #2C3338;\n font-size: 0.8125rem;\n font-weight: 500;\n text-align: left;\n cursor: pointer;\n min-height: 36px;\n }\n .lang-menu-item:hover { background: #F6F7F7; }\n .lang-menu-item.active { background: #FAF5E8; color: #B99542; font-weight: 600; }\n .lang-menu-item .flag { font-size: 1rem; }\n @media (max-width: 782px) {\n .admin-bar-menu { display: none; }\n }\n </style>"];
|
|
399
398
|
var _tmpl$2$3 = [
|
|
400
399
|
"<span",
|
|
401
400
|
" class=\"notifications-badge\">",
|
|
@@ -480,7 +479,7 @@ function AdminBar(props) {
|
|
|
480
479
|
const [showLangMenu, setShowLangMenu] = createSignal(false);
|
|
481
480
|
const [showNotifications, setShowNotifications] = createSignal(false);
|
|
482
481
|
const [notifications, setNotifications] = createSignal([]);
|
|
483
|
-
const currentLocale = locale;
|
|
482
|
+
const currentLocale = () => locale;
|
|
484
483
|
const translate = t;
|
|
485
484
|
const handleClickOutside = (e) => {
|
|
486
485
|
if (!e.target.closest("#admin-bar")) {
|
|
@@ -551,12 +550,12 @@ function AdminBar(props) {
|
|
|
551
550
|
}
|
|
552
551
|
})));
|
|
553
552
|
}
|
|
554
|
-
})), ssrAttribute("aria-label", escape(t("common.language"), true), false) + ssrAttribute("aria-expanded", escape(showLangMenu(), true), false), escape(LOCALE_FLAGS[currentLocale] ?? "🌐"), escape(LOCALE_LABELS[currentLocale] ?? currentLocale), escape(createComponent(Show, {
|
|
553
|
+
})), ssrAttribute("aria-label", escape(t("common.language"), true), false) + ssrAttribute("aria-expanded", escape(showLangMenu(), true), false), escape(LOCALE_FLAGS[currentLocale()] ?? "🌐"), escape(LOCALE_LABELS[currentLocale()] ?? currentLocale()), escape(createComponent(Show, {
|
|
555
554
|
get when() {
|
|
556
555
|
return showLangMenu();
|
|
557
556
|
},
|
|
558
557
|
get children() {
|
|
559
|
-
return ssr(_tmpl$4$3, ssrHydrationKey(), ssrAttribute("aria-label", escape(t("common.language"), true), false), escape(SUPPORTED_LOCALES.map((loc) => ssr(_tmpl$1, ssrHydrationKey() + ssrAttribute("class", currentLocale === loc ? "lang-menu-item active" : "lang-menu-item", false), escape(LOCALE_FLAGS[loc] ?? "🌐"), escape(LOCALE_LABELS[loc] ?? loc)))));
|
|
558
|
+
return ssr(_tmpl$4$3, ssrHydrationKey(), ssrAttribute("aria-label", escape(t("common.language"), true), false), escape(SUPPORTED_LOCALES.map((loc) => ssr(_tmpl$1, ssrHydrationKey() + ssrAttribute("class", currentLocale() === loc ? "lang-menu-item active" : "lang-menu-item", false), escape(LOCALE_FLAGS[loc] ?? "🌐"), escape(LOCALE_LABELS[loc] ?? loc)))));
|
|
560
559
|
}
|
|
561
560
|
})), escape(createComponent(Show, {
|
|
562
561
|
get when() {
|
|
@@ -586,7 +585,7 @@ function AdminBar(props) {
|
|
|
586
585
|
/** Versão do release atual (ex.: "0.4.0"). */
|
|
587
586
|
var APP_VERSION = {
|
|
588
587
|
name: "okcms",
|
|
589
|
-
version: "0.4.
|
|
588
|
+
version: "0.4.15",
|
|
590
589
|
"private": true,
|
|
591
590
|
description: "Hybrid, modular, API-first CMS",
|
|
592
591
|
engines: {
|
|
@@ -957,7 +956,7 @@ var _tmpl$ = [
|
|
|
957
956
|
"</a><a href=\"https://docs.oktisworks.com\" target=\"_blank\" rel=\"noopener noreferrer\">",
|
|
958
957
|
"</a><a href=\"https://oktisworks.com/community\" target=\"_blank\" rel=\"noopener noreferrer\">",
|
|
959
958
|
"</a></nav><div class=\"footer-right\"><p class=\"footer-powered\">",
|
|
960
|
-
"</p></div></div><style>\n .admin-footer {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n height: 48px;\n background: #2d2d2d;\n border-top: 1px solid
|
|
959
|
+
"</p></div></div><style>\n .admin-footer {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n height: 48px;\n background: #2d2d2d;\n border-top: 1px solid #4a4a4a;\n padding: 0 1.5rem;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 0.75rem;\n color: #e5e7eb;\n }\n\n .footer-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n max-width: 1400px;\n margin: 0 auto;\n gap: 1.5rem;\n }\n\n .footer-left { display: flex; flex-direction: column; gap: 0.125rem; }\n\n .footer-version {\n display: flex; align-items: center; gap: 0.5rem;\n font-weight: 600; color: #ffffff; font-size: 0.8125rem;\n }\n\n .version-badge {\n background: var(--color-primary-soft);\n color: #2d2d2d;\n padding: 0.125rem 0.375rem;\n border-radius: var(--radius-sm);\n font-size: 0.6875rem;\n font-weight: 700;\n }\n\n .footer-links {\n display: flex; gap: 1.5rem;\n }\n\n .footer-links a {\n color: #e5e7eb;\n font-size: 0.75rem;\n font-weight: 500;\n text-decoration: none;\n transition: color 0.15s;\n }\n\n .footer-links a:hover { color: #f0c96a; }\n\n .footer-right { text-align: right; }\n .footer-powered { font-size: 0.6875rem; color: #d1d5db; }\n\n @media (max-width: 768px) {\n .admin-footer { flex-direction: column; height: auto; padding: 0.75rem 1rem; gap: 0.5rem; }\n .footer-content { flex-direction: column; gap: 0.5rem; }\n .footer-links { flex-wrap: wrap; justify-content: center; }\n }\n\n /* RTL adjustments */\n [dir=\"rtl\"] .footer-links { flex-direction: row-reverse; }\n [dir=\"rtl\"] .footer-right { text-align: left; }\n [dir=\"rtl\"] .footer-left { align-items: flex-end; }\n </style></footer>"
|
|
961
960
|
];
|
|
962
961
|
function Footer() {
|
|
963
962
|
const { t } = useTranslation();
|
|
@@ -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_CH59YTvE.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_KIUq60Dv.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,4 +1,4 @@
|
|
|
1
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
1
|
+
import { n as useTranslation, r as apiClient } from "./i18n_CH59YTvE.mjs";
|
|
2
2
|
import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
3
3
|
import { For, Show, createSignal, onMount } from "solid-js";
|
|
4
4
|
//#region src/components/apps/settings/ResourceHubs.tsx
|
|
@@ -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_KIUq60Dv.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 AccessManager } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
|
|
5
|
+
import { t as AccessManager } from "./ResourceHubs_T-WuZoVF.mjs";
|
|
6
6
|
//#region src/pages/settings/access.astro
|
|
7
7
|
var access_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
default: () => $$Access,
|
|
@@ -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_CH59YTvE.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
|
|
6
6
|
import { t as FieldTypePicker } from "./FieldTypePicker_CXwpmcQ3.mjs";
|
|
7
7
|
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
8
8
|
import { For, Show, createMemo, createSignal, onMount } from "solid-js";
|
|
@@ -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_KIUq60Dv.mjs";
|
|
5
|
+
import { t as ContentEditor } from "./ContentEditor_C-kz5cS4.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, d as createMemo, 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_CH59YTvE.mjs";
|
|
5
|
+
import { c as Select, d as createMemo, f as createSignal, i as Card, l as Show2, o as Input, p as onMount, r as Button, t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.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$ = [
|
|
@@ -108,24 +108,27 @@ async function loadLocale(locale) {
|
|
|
108
108
|
}
|
|
109
109
|
//#endregion
|
|
110
110
|
//#region src/lib/api.ts
|
|
111
|
-
var API_BASE = "
|
|
111
|
+
var API_BASE = "";
|
|
112
112
|
var ApiClient = class {
|
|
113
113
|
baseUrl;
|
|
114
114
|
csrfToken = null;
|
|
115
|
-
|
|
115
|
+
refreshPromise = null;
|
|
116
|
+
refreshOwner = typeof globalThis.crypto?.randomUUID === "function" ? globalThis.crypto.randomUUID() : Math.random().toString(36).slice(2);
|
|
117
|
+
refreshLockKey = "okcms:auth:refresh-lock";
|
|
116
118
|
constructor(baseUrl = API_BASE) {
|
|
117
119
|
this.baseUrl = baseUrl;
|
|
118
120
|
}
|
|
119
121
|
/** Inicializa lendo CSRF do cookie (chamado no boot da app) */
|
|
120
122
|
async init() {
|
|
121
123
|
try {
|
|
122
|
-
await
|
|
124
|
+
await this.ensureCsrfToken();
|
|
123
125
|
} catch {}
|
|
124
126
|
}
|
|
125
127
|
/** Sessão válida — verifica via /me (usa cookies HttpOnly automaticamente) */
|
|
126
128
|
async isLoggedIn() {
|
|
127
129
|
try {
|
|
128
|
-
|
|
130
|
+
await this.request("GET", "/api/v1/auth/me");
|
|
131
|
+
return true;
|
|
129
132
|
} catch {
|
|
130
133
|
return false;
|
|
131
134
|
}
|
|
@@ -133,9 +136,7 @@ var ApiClient = class {
|
|
|
133
136
|
/** Obtém tenantId do backend via /me */
|
|
134
137
|
async getTenantId() {
|
|
135
138
|
try {
|
|
136
|
-
|
|
137
|
-
if (!res.ok) return null;
|
|
138
|
-
return (await res.json()).tenantId ?? null;
|
|
139
|
+
return (await this.request("GET", "/api/v1/auth/me")).tenantId ?? null;
|
|
139
140
|
} catch {
|
|
140
141
|
return null;
|
|
141
142
|
}
|
|
@@ -143,9 +144,7 @@ var ApiClient = class {
|
|
|
143
144
|
/** Obtém locale do usuário logado via /me/locale */
|
|
144
145
|
async getUserLocale() {
|
|
145
146
|
try {
|
|
146
|
-
|
|
147
|
-
if (!res.ok) return "pt-BR";
|
|
148
|
-
return (await res.json()).locale ?? "pt-BR";
|
|
147
|
+
return (await this.request("GET", "/api/v1/users/me/locale")).locale ?? "pt-BR";
|
|
149
148
|
} catch {
|
|
150
149
|
return "pt-BR";
|
|
151
150
|
}
|
|
@@ -164,6 +163,7 @@ var ApiClient = class {
|
|
|
164
163
|
}
|
|
165
164
|
/** Login — o backend seta cookies HttpOnly e CSRF; retorna user + tenantId */
|
|
166
165
|
async login(input) {
|
|
166
|
+
await this.ensureCsrfToken();
|
|
167
167
|
return await this.request("POST", "/api/v1/auth/login", input);
|
|
168
168
|
}
|
|
169
169
|
/** Logout — limpa cookies no backend */
|
|
@@ -173,12 +173,55 @@ var ApiClient = class {
|
|
|
173
173
|
}
|
|
174
174
|
/** Refresh de access token via cookie refresh_token */
|
|
175
175
|
async refreshTokens() {
|
|
176
|
-
if (this.
|
|
177
|
-
this.
|
|
176
|
+
if (this.refreshPromise) return this.refreshPromise;
|
|
177
|
+
this.refreshPromise = this.refreshWithCrossTabLock().finally(() => {
|
|
178
|
+
this.refreshPromise = null;
|
|
179
|
+
});
|
|
180
|
+
return this.refreshPromise;
|
|
181
|
+
}
|
|
182
|
+
async refreshWithCrossTabLock() {
|
|
183
|
+
if (typeof window === "undefined" || typeof localStorage === "undefined") {
|
|
184
|
+
await this.request("POST", "/api/v1/auth/refresh", {}, void 0, { skipRefresh: true });
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const now = Date.now();
|
|
188
|
+
let current;
|
|
189
|
+
try {
|
|
190
|
+
current = JSON.parse(localStorage.getItem(this.refreshLockKey) ?? "null");
|
|
191
|
+
} catch {
|
|
192
|
+
await this.request("POST", "/api/v1/auth/refresh", {}, void 0, { skipRefresh: true });
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
if (current?.owner && current.owner !== this.refreshOwner && Number(current.expiresAt) > now) {
|
|
196
|
+
await this.waitForOtherTabRefresh(Number(current.expiresAt));
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
try {
|
|
200
|
+
localStorage.setItem(this.refreshLockKey, JSON.stringify({
|
|
201
|
+
owner: this.refreshOwner,
|
|
202
|
+
expiresAt: now + 1e4
|
|
203
|
+
}));
|
|
204
|
+
} catch {
|
|
205
|
+
await this.request("POST", "/api/v1/auth/refresh", {}, void 0, { skipRefresh: true });
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
178
208
|
try {
|
|
179
|
-
await this.request("POST", "/api/v1/auth/refresh", {});
|
|
209
|
+
await this.request("POST", "/api/v1/auth/refresh", {}, void 0, { skipRefresh: true });
|
|
180
210
|
} finally {
|
|
181
|
-
|
|
211
|
+
try {
|
|
212
|
+
if (JSON.parse(localStorage.getItem(this.refreshLockKey) ?? "null")?.owner === this.refreshOwner) localStorage.removeItem(this.refreshLockKey);
|
|
213
|
+
} catch {}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
async waitForOtherTabRefresh(expiresAt) {
|
|
217
|
+
while (Date.now() < Math.min(expiresAt, Date.now() + 1e4)) {
|
|
218
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
219
|
+
try {
|
|
220
|
+
const lock = JSON.parse(localStorage.getItem(this.refreshLockKey) ?? "null");
|
|
221
|
+
if (!lock || Number(lock.expiresAt) <= Date.now()) return;
|
|
222
|
+
} catch {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
182
225
|
}
|
|
183
226
|
}
|
|
184
227
|
/** Requisição genérica com:
|
|
@@ -186,54 +229,74 @@ var ApiClient = class {
|
|
|
186
229
|
* - auto-refresh em 401
|
|
187
230
|
* - CSRF header para mutações
|
|
188
231
|
*/
|
|
189
|
-
async request(method, path, body, headers) {
|
|
232
|
+
async request(method, path, body, headers, options) {
|
|
190
233
|
const url = `${this.baseUrl}${path}`;
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
headers: requestHeaders,
|
|
206
|
-
credentials: "include",
|
|
207
|
-
body: body ? JSON.stringify(body) : void 0
|
|
208
|
-
});
|
|
209
|
-
if (response.status === 401 && !path.includes("/auth/refresh") && !path.includes("/auth/logout")) {
|
|
210
|
-
await this.refreshTokens();
|
|
211
|
-
response = await fetch(url, {
|
|
234
|
+
const send = async () => {
|
|
235
|
+
const requestHeaders = {
|
|
236
|
+
"Content-Type": "application/json",
|
|
237
|
+
...headers
|
|
238
|
+
};
|
|
239
|
+
if (![
|
|
240
|
+
"GET",
|
|
241
|
+
"HEAD",
|
|
242
|
+
"OPTIONS"
|
|
243
|
+
].includes(method.toUpperCase())) {
|
|
244
|
+
const csrf = await this.ensureCsrfToken();
|
|
245
|
+
if (csrf) requestHeaders["x-csrf-token"] = csrf;
|
|
246
|
+
}
|
|
247
|
+
return fetch(url, {
|
|
212
248
|
method,
|
|
213
249
|
headers: requestHeaders,
|
|
214
250
|
credentials: "include",
|
|
215
251
|
body: body ? JSON.stringify(body) : void 0
|
|
216
252
|
});
|
|
253
|
+
};
|
|
254
|
+
let response = await send();
|
|
255
|
+
if (response.status === 401 && !options?.skipRefresh && !path.includes("/auth/refresh") && !path.includes("/auth/logout")) {
|
|
256
|
+
await this.refreshTokens();
|
|
257
|
+
response = await send();
|
|
258
|
+
}
|
|
259
|
+
if (response.status === 403 && !options?.skipCsrfRecovery) {
|
|
260
|
+
let errorCode = "";
|
|
261
|
+
try {
|
|
262
|
+
errorCode = (await (typeof response.clone === "function" ? response.clone() : response).json()).error ?? "";
|
|
263
|
+
} catch {}
|
|
264
|
+
if (errorCode === "CSRF_TOKEN_INVALID") {
|
|
265
|
+
await this.ensureCsrfToken(true);
|
|
266
|
+
response = await send();
|
|
267
|
+
}
|
|
217
268
|
}
|
|
218
269
|
if (!response.ok) {
|
|
219
270
|
const error = await response.json().catch(() => ({ error: "Request failed" }));
|
|
220
271
|
throw new Error(error.error ?? `Request failed: ${response.status}`);
|
|
221
272
|
}
|
|
222
|
-
const setCookie = response.headers.get("set-cookie");
|
|
223
|
-
if (setCookie) {
|
|
224
|
-
const csrfMatch = setCookie.match(/csrf_token=([^;]+)/);
|
|
225
|
-
if (csrfMatch?.[1]) this.csrfToken = csrfMatch[1];
|
|
226
|
-
}
|
|
227
273
|
return response.json();
|
|
228
274
|
}
|
|
229
|
-
/**
|
|
230
|
-
|
|
231
|
-
|
|
275
|
+
/** Garante um token CSRF sincronizado com o cookie do browser. */
|
|
276
|
+
async ensureCsrfToken(force = false) {
|
|
277
|
+
const cookieToken = this.readCsrfCookie();
|
|
278
|
+
if (!force && cookieToken) {
|
|
279
|
+
this.csrfToken = cookieToken;
|
|
280
|
+
return cookieToken;
|
|
281
|
+
}
|
|
282
|
+
if (!force && this.csrfToken) return this.csrfToken;
|
|
283
|
+
try {
|
|
284
|
+
const response = await fetch(`${this.baseUrl}/api/v1/auth/csrf`, {
|
|
285
|
+
credentials: "include",
|
|
286
|
+
headers: { Accept: "application/json" }
|
|
287
|
+
});
|
|
288
|
+
if (!response.ok) return this.csrfToken;
|
|
289
|
+
const data = await response.json();
|
|
290
|
+
this.csrfToken = data.csrfToken ?? this.readCsrfCookie();
|
|
291
|
+
} catch {}
|
|
292
|
+
return this.csrfToken;
|
|
293
|
+
}
|
|
294
|
+
readCsrfCookie() {
|
|
232
295
|
if (typeof document !== "undefined") {
|
|
233
296
|
const match = document.cookie.match(/(?:^|;\s*)csrf_token=([^;]+)/);
|
|
234
297
|
if (match?.[1]) return match[1];
|
|
235
298
|
}
|
|
236
|
-
return
|
|
299
|
+
return this.csrfToken;
|
|
237
300
|
}
|
|
238
301
|
async getContent(options) {
|
|
239
302
|
const params = new URLSearchParams();
|
|
@@ -429,15 +492,32 @@ var ApiClient = class {
|
|
|
429
492
|
if (options?.alt) formData.append("alt", options.alt);
|
|
430
493
|
if (options?.caption) formData.append("caption", options.caption);
|
|
431
494
|
const url = `${this.baseUrl}/api/v1/media/upload`;
|
|
432
|
-
const
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
495
|
+
const send = async () => {
|
|
496
|
+
const csrf = await this.ensureCsrfToken();
|
|
497
|
+
const requestHeaders = {};
|
|
498
|
+
if (csrf) requestHeaders["x-csrf-token"] = csrf;
|
|
499
|
+
return fetch(url, {
|
|
500
|
+
method: "POST",
|
|
501
|
+
headers: requestHeaders,
|
|
502
|
+
credentials: "include",
|
|
503
|
+
body: formData
|
|
504
|
+
});
|
|
505
|
+
};
|
|
506
|
+
let response = await send();
|
|
507
|
+
if (response.status === 401) {
|
|
508
|
+
await this.refreshTokens();
|
|
509
|
+
response = await send();
|
|
510
|
+
}
|
|
511
|
+
if (response.status === 403) {
|
|
512
|
+
let errorCode = "";
|
|
513
|
+
try {
|
|
514
|
+
errorCode = (await response.clone().json()).error ?? "";
|
|
515
|
+
} catch {}
|
|
516
|
+
if (errorCode === "CSRF_TOKEN_INVALID") {
|
|
517
|
+
await this.ensureCsrfToken(true);
|
|
518
|
+
response = await send();
|
|
519
|
+
}
|
|
520
|
+
}
|
|
441
521
|
if (!response.ok) {
|
|
442
522
|
const error = await response.json().catch(() => ({ error: `Upload failed: ${response.status}` }));
|
|
443
523
|
throw new Error(error.error ?? `Upload failed: ${response.status}`);
|
|
@@ -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_CH59YTvE.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_KIUq60Dv.mjs";
|
|
6
6
|
import { createComponent, escape, ssr, ssrHydrationKey } from "solid-js/web";
|
|
7
7
|
import { Show, createMemo, createSignal, onMount } from "solid-js";
|
|
8
8
|
//#region src/components/content/ContentList.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 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { t as $$DashboardLayout } from "./
|
|
5
|
-
import { t as MediaLibrary } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
|
|
5
|
+
import { t as MediaLibrary } from "./MediaLibrary_C-lJBpPG.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_CH59YTvE.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.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 { 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_CH59YTvE.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_KIUq60Dv.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,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_KIUq60Dv.mjs";
|
|
5
5
|
//#region src/pages/settings/index.astro
|
|
6
6
|
var settings_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
default: () => $$Index,
|
|
@@ -1,8 +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 {
|
|
5
|
-
import { t as $$BaseLayout } from "./BaseLayout_4yJ0PQCS.mjs";
|
|
4
|
+
import { n as renderScript, t as $$BaseLayout } from "./BaseLayout_BmkfK9tu.mjs";
|
|
6
5
|
//#region src/pages/login.astro
|
|
7
6
|
var login_exports = /* @__PURE__ */ __exportAll({
|
|
8
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_CH59YTvE.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.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,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_KIUq60Dv.mjs";
|
|
5
|
+
import { t as ContentEditor } from "./ContentEditor_C-kz5cS4.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 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { t as $$DashboardLayout } from "./
|
|
5
|
-
import { r as OperationsManager } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
|
|
5
|
+
import { r as OperationsManager } from "./ResourceHubs_T-WuZoVF.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
|
-
import { i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
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 $$
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_CH59YTvE.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.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
|
|
@@ -84,7 +84,7 @@ function PluginManager() {
|
|
|
84
84
|
setLoading(true);
|
|
85
85
|
const data = await apiClient.getPlugins();
|
|
86
86
|
setPlugins(data);
|
|
87
|
-
} catch
|
|
87
|
+
} catch {
|
|
88
88
|
setError(t("plugins.loadError"));
|
|
89
89
|
} finally {
|
|
90
90
|
setLoading(false);
|
|
@@ -132,10 +132,14 @@ var plugins_exports = /* @__PURE__ */ __exportAll({
|
|
|
132
132
|
file: () => $$file,
|
|
133
133
|
url: () => $$url
|
|
134
134
|
});
|
|
135
|
+
createAstro("https://astro.build");
|
|
135
136
|
var $$Plugins = createComponent$1(($$result, $$props, $$slots) => {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
const Astro = $$result.createAstro($$props, $$slots);
|
|
138
|
+
Astro.self = $$Plugins;
|
|
139
|
+
const { t } = Astro.locals;
|
|
140
|
+
return renderTemplate`${renderComponent($$result, "DashboardLayout", $$DashboardLayout, {
|
|
141
|
+
"title": t("plugins.title"),
|
|
142
|
+
"description": t("plugins.description")
|
|
139
143
|
}, { "default": ($$result) => renderTemplate`${renderComponent($$result, "PluginManager", PluginManager, {
|
|
140
144
|
"client:load": true,
|
|
141
145
|
"client:component-hydration": "load",
|
|
@@ -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_CH59YTvE.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.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
|
|
@@ -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 { n as ContentResourcesManager } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
|
|
5
|
+
import { n as ContentResourcesManager } from "./ResourceHubs_T-WuZoVF.mjs";
|
|
6
6
|
//#region src/pages/settings/resources.astro
|
|
7
7
|
var resources_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
default: () => $$Resources,
|