@sonicjs-cms/core 2.0.9 → 2.0.11
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/{chunk-VEC5MLT3.js → chunk-5RKQB2JG.js} +10 -228
- package/dist/chunk-5RKQB2JG.js.map +1 -0
- package/dist/chunk-AMSTLQFI.cjs +801 -0
- package/dist/chunk-AMSTLQFI.cjs.map +1 -0
- package/dist/{chunk-ABYMIXRN.js → chunk-CLLJFZ5U.js} +2018 -1054
- package/dist/chunk-CLLJFZ5U.js.map +1 -0
- package/dist/{chunk-WRRLB6KG.js → chunk-DU7JJZN7.js} +5 -4
- package/dist/chunk-DU7JJZN7.js.map +1 -0
- package/dist/{chunk-OKPDQO2Y.js → chunk-FYWJMETG.js} +30 -10
- package/dist/chunk-FYWJMETG.js.map +1 -0
- package/dist/chunk-I5ZPYKNX.js +787 -0
- package/dist/chunk-I5ZPYKNX.js.map +1 -0
- package/dist/{chunk-4I25AGUR.cjs → chunk-IM2LGCYD.cjs} +2166 -1202
- package/dist/chunk-IM2LGCYD.cjs.map +1 -0
- package/dist/{chunk-TMIRVVQ7.cjs → chunk-NNXPAPUD.cjs} +5 -4
- package/dist/chunk-NNXPAPUD.cjs.map +1 -0
- package/dist/{chunk-OPGDMS7L.js → chunk-QNWYQZ55.js} +3 -3
- package/dist/{chunk-OPGDMS7L.js.map → chunk-QNWYQZ55.js.map} +1 -1
- package/dist/{chunk-COBUPOMD.js → chunk-T7IYBGGO.cjs} +5 -770
- package/dist/chunk-T7IYBGGO.cjs.map +1 -0
- package/dist/{chunk-DYYAXDXI.cjs → chunk-X2VADBA4.cjs} +31 -11
- package/dist/chunk-X2VADBA4.cjs.map +1 -0
- package/dist/{chunk-EYMHWJTW.cjs → chunk-YU6QFFI4.cjs} +9 -228
- package/dist/chunk-YU6QFFI4.cjs.map +1 -0
- package/dist/{chunk-MABBKINE.cjs → chunk-ZMSYKV62.cjs} +5 -5
- package/dist/{chunk-MABBKINE.cjs.map → chunk-ZMSYKV62.cjs.map} +1 -1
- package/dist/{chunk-NBDPIRQS.cjs → chunk-ZPMFT2JW.js} +4 -786
- package/dist/chunk-ZPMFT2JW.js.map +1 -0
- package/dist/index.cjs +475 -104
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +386 -11
- package/dist/index.js.map +1 -1
- package/dist/middleware.cjs +24 -23
- package/dist/middleware.js +3 -2
- package/dist/migrations-IHERIQVD.js +4 -0
- package/dist/migrations-IHERIQVD.js.map +1 -0
- package/dist/migrations-POFD5KNG.cjs +13 -0
- package/dist/migrations-POFD5KNG.cjs.map +1 -0
- package/dist/routes.cjs +25 -28
- package/dist/routes.js +6 -5
- package/dist/services.cjs +19 -18
- package/dist/services.js +2 -1
- package/dist/templates.cjs +17 -21
- package/dist/templates.js +2 -2
- package/dist/utils.cjs +11 -11
- package/dist/utils.js +1 -1
- package/migrations/001_initial_schema.sql +2 -2
- package/migrations/007_demo_login_plugin.sql +1 -1
- package/migrations/020_add_email_plugin.sql +22 -0
- package/migrations/021_add_magic_link_auth_plugin.sql +42 -0
- package/migrations/021_add_otp_login.sql +42 -0
- package/migrations/022_add_tinymce_plugin.sql +25 -0
- package/migrations/023_add_mdxeditor_plugin.sql +25 -0
- package/migrations/024_add_quill_editor_plugin.sql +25 -0
- package/migrations/025_add_easymde_plugin.sql +25 -0
- package/package.json +3 -2
- package/dist/chunk-4I25AGUR.cjs.map +0 -1
- package/dist/chunk-ABYMIXRN.js.map +0 -1
- package/dist/chunk-COBUPOMD.js.map +0 -1
- package/dist/chunk-DYYAXDXI.cjs.map +0 -1
- package/dist/chunk-EYMHWJTW.cjs.map +0 -1
- package/dist/chunk-NBDPIRQS.cjs.map +0 -1
- package/dist/chunk-OKPDQO2Y.js.map +0 -1
- package/dist/chunk-TMIRVVQ7.cjs.map +0 -1
- package/dist/chunk-VEC5MLT3.js.map +0 -1
- package/dist/chunk-WRRLB6KG.js.map +0 -1
- package/migrations/002_faq_plugin.sql +0 -86
|
@@ -399,14 +399,14 @@ function renderAdminLayoutCatalyst(data) {
|
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
try {
|
|
402
|
-
const response = await fetch('/api/migrations/status');
|
|
402
|
+
const response = await fetch('/admin/api/migrations/status');
|
|
403
403
|
if (response.ok) {
|
|
404
404
|
const data = await response.json();
|
|
405
|
-
if (data.pendingMigrations > 0) {
|
|
405
|
+
if (data.success && data.data && data.data.pendingMigrations > 0) {
|
|
406
406
|
const banner = document.getElementById('migration-banner');
|
|
407
407
|
const countElement = document.getElementById('migration-count');
|
|
408
408
|
if (banner && countElement) {
|
|
409
|
-
countElement.textContent = data.pendingMigrations;
|
|
409
|
+
countElement.textContent = data.data.pendingMigrations;
|
|
410
410
|
banner.classList.remove('hidden');
|
|
411
411
|
}
|
|
412
412
|
}
|
|
@@ -458,17 +458,15 @@ function renderCatalystSidebar(currentPath = "", user, dynamicMenuItems, isMobil
|
|
|
458
458
|
icon: `<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
|
|
459
459
|
<path d="M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0zM12.93 17c.046-.327.07-.66.07-1a6.97 6.97 0 00-1.5-4.33A5 5 0 0119 16v1h-6.07zM6 11a5 5 0 015 5v1H1v-1a5 5 0 015-5z"/>
|
|
460
460
|
</svg>`
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
if (enableExperimentalFeatures) {
|
|
464
|
-
baseMenuItems.push({
|
|
461
|
+
},
|
|
462
|
+
{
|
|
465
463
|
label: "Plugins",
|
|
466
464
|
path: "/admin/plugins",
|
|
467
465
|
icon: `<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
468
466
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"/>
|
|
469
467
|
</svg>`
|
|
470
|
-
}
|
|
471
|
-
|
|
468
|
+
}
|
|
469
|
+
];
|
|
472
470
|
const settingsMenuItem = {
|
|
473
471
|
label: "Settings",
|
|
474
472
|
path: "/admin/settings",
|
|
@@ -2947,222 +2945,6 @@ function renderCheckboxPage(data) {
|
|
|
2947
2945
|
return renderAdminLayoutCatalyst(layoutData);
|
|
2948
2946
|
}
|
|
2949
2947
|
|
|
2950
|
-
// src/templates/pages/admin-faq-list.template.ts
|
|
2951
|
-
init_admin_layout_catalyst_template();
|
|
2952
|
-
function renderFAQList(data) {
|
|
2953
|
-
const { faqs, totalCount, currentPage, totalPages, message, messageType } = data;
|
|
2954
|
-
const pageContent = `
|
|
2955
|
-
<div>
|
|
2956
|
-
<!-- Header -->
|
|
2957
|
-
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between mb-6">
|
|
2958
|
-
<div>
|
|
2959
|
-
<h1 class="text-2xl/8 font-semibold text-zinc-950 dark:text-white sm:text-xl/8">FAQ Management</h1>
|
|
2960
|
-
<p class="mt-2 text-sm/6 text-zinc-500 dark:text-zinc-400">Manage frequently asked questions</p>
|
|
2961
|
-
</div>
|
|
2962
|
-
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
|
2963
|
-
<a href="/admin/faq/new"
|
|
2964
|
-
class="inline-flex items-center justify-center rounded-lg bg-zinc-950 dark:bg-white px-3.5 py-2.5 text-sm font-semibold text-white dark:text-zinc-950 hover:bg-zinc-800 dark:hover:bg-zinc-100 transition-colors shadow-sm">
|
|
2965
|
-
<svg class="-ml-0.5 mr-1.5 h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
|
2966
|
-
<path d="M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z" />
|
|
2967
|
-
</svg>
|
|
2968
|
-
Add FAQ
|
|
2969
|
-
</a>
|
|
2970
|
-
</div>
|
|
2971
|
-
</div>
|
|
2972
|
-
|
|
2973
|
-
${message ? renderAlert({ type: messageType || "info", message, dismissible: true }) : ""}
|
|
2974
|
-
|
|
2975
|
-
<!-- Filters -->
|
|
2976
|
-
<div class="relative rounded-xl overflow-hidden mb-6">
|
|
2977
|
-
<!-- Gradient Background -->
|
|
2978
|
-
<div class="absolute inset-0 bg-gradient-to-r from-cyan-500/10 via-blue-500/10 to-purple-500/10 dark:from-cyan-400/20 dark:via-blue-400/20 dark:to-purple-400/20"></div>
|
|
2979
|
-
|
|
2980
|
-
<div class="relative bg-white/80 dark:bg-zinc-900/80 backdrop-blur-xl shadow-sm ring-1 ring-zinc-950/5 dark:ring-white/10">
|
|
2981
|
-
<div class="px-6 py-5">
|
|
2982
|
-
<div class="flex items-center justify-between">
|
|
2983
|
-
<div class="flex items-center space-x-4 flex-1">
|
|
2984
|
-
<div>
|
|
2985
|
-
<label for="category" class="block text-sm/6 font-medium text-zinc-950 dark:text-white">Category</label>
|
|
2986
|
-
<div class="mt-2 grid grid-cols-1">
|
|
2987
|
-
<select
|
|
2988
|
-
name="category"
|
|
2989
|
-
id="category"
|
|
2990
|
-
hx-get="/admin/faq"
|
|
2991
|
-
hx-trigger="change"
|
|
2992
|
-
hx-target="#faq-list"
|
|
2993
|
-
hx-include="[name='published'], [name='search']"
|
|
2994
|
-
class="col-start-1 row-start-1 w-full appearance-none rounded-md bg-white/5 dark:bg-white/5 py-1.5 pl-3 pr-8 text-base text-zinc-950 dark:text-white outline outline-1 -outline-offset-1 outline-cyan-500/30 dark:outline-cyan-400/30 *:bg-white dark:*:bg-zinc-800 focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-cyan-500 dark:focus-visible:outline-cyan-400 sm:text-sm/6 min-w-48"
|
|
2995
|
-
>
|
|
2996
|
-
<option value="">All Categories</option>
|
|
2997
|
-
<option value="general">General</option>
|
|
2998
|
-
<option value="technical">Technical</option>
|
|
2999
|
-
<option value="billing">Billing</option>
|
|
3000
|
-
<option value="support">Support</option>
|
|
3001
|
-
</select>
|
|
3002
|
-
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-cyan-600 dark:text-cyan-400 sm:size-4">
|
|
3003
|
-
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
|
3004
|
-
</svg>
|
|
3005
|
-
</div>
|
|
3006
|
-
</div>
|
|
3007
|
-
<div>
|
|
3008
|
-
<label for="published" class="block text-sm/6 font-medium text-zinc-950 dark:text-white">Status</label>
|
|
3009
|
-
<div class="mt-2 grid grid-cols-1">
|
|
3010
|
-
<select
|
|
3011
|
-
name="published"
|
|
3012
|
-
id="published"
|
|
3013
|
-
hx-get="/admin/faq"
|
|
3014
|
-
hx-trigger="change"
|
|
3015
|
-
hx-target="#faq-list"
|
|
3016
|
-
hx-include="[name='category'], [name='search']"
|
|
3017
|
-
class="col-start-1 row-start-1 w-full appearance-none rounded-md bg-white/5 dark:bg-white/5 py-1.5 pl-3 pr-8 text-base text-zinc-950 dark:text-white outline outline-1 -outline-offset-1 outline-cyan-500/30 dark:outline-cyan-400/30 *:bg-white dark:*:bg-zinc-800 focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-cyan-500 dark:focus-visible:outline-cyan-400 sm:text-sm/6 min-w-48"
|
|
3018
|
-
>
|
|
3019
|
-
<option value="">All</option>
|
|
3020
|
-
<option value="true">Published</option>
|
|
3021
|
-
<option value="false">Draft</option>
|
|
3022
|
-
</select>
|
|
3023
|
-
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-cyan-600 dark:text-cyan-400 sm:size-4">
|
|
3024
|
-
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
|
3025
|
-
</svg>
|
|
3026
|
-
</div>
|
|
3027
|
-
</div>
|
|
3028
|
-
<div class="flex-1 max-w-md">
|
|
3029
|
-
<label for="search" class="block text-sm font-medium text-zinc-950 dark:text-white mb-2">Search</label>
|
|
3030
|
-
<div class="relative group">
|
|
3031
|
-
<div class="absolute left-3.5 top-2.5 flex items-center justify-center w-5 h-5 rounded-full bg-gradient-to-br from-cyan-400 to-blue-500 dark:from-cyan-300 dark:to-blue-400 opacity-90 group-focus-within:opacity-100 transition-opacity">
|
|
3032
|
-
<svg class="h-3 w-3 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2.5">
|
|
3033
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
|
|
3034
|
-
</svg>
|
|
3035
|
-
</div>
|
|
3036
|
-
<input
|
|
3037
|
-
type="text"
|
|
3038
|
-
name="search"
|
|
3039
|
-
id="search"
|
|
3040
|
-
placeholder="Search questions..."
|
|
3041
|
-
hx-get="/admin/faq"
|
|
3042
|
-
hx-trigger="keyup changed delay:300ms"
|
|
3043
|
-
hx-target="#faq-list"
|
|
3044
|
-
hx-include="[name='category'], [name='published']"
|
|
3045
|
-
class="w-full rounded-full bg-transparent px-11 py-2 text-sm text-zinc-950 dark:text-white placeholder-zinc-500 dark:placeholder-zinc-400 border-2 border-cyan-200/50 dark:border-cyan-700/50 focus:outline-none focus:border-cyan-500 dark:focus:border-cyan-400 focus:shadow-lg focus:shadow-cyan-500/20 dark:focus:shadow-cyan-400/20 transition-all duration-300"
|
|
3046
|
-
/>
|
|
3047
|
-
</div>
|
|
3048
|
-
</div>
|
|
3049
|
-
</div>
|
|
3050
|
-
<div class="flex items-center gap-x-3 ml-4">
|
|
3051
|
-
<span class="text-sm/6 font-medium text-zinc-700 dark:text-zinc-300 px-3 py-1.5 rounded-full bg-white/60 dark:bg-zinc-800/60 backdrop-blur-sm">${totalCount} ${totalCount === 1 ? "item" : "items"}</span>
|
|
3052
|
-
<button
|
|
3053
|
-
onclick="location.reload()"
|
|
3054
|
-
class="inline-flex items-center gap-x-1.5 px-3 py-1.5 bg-white/90 dark:bg-zinc-800/90 backdrop-blur-sm text-zinc-950 dark:text-white text-sm font-medium rounded-full ring-1 ring-inset ring-cyan-200/50 dark:ring-cyan-700/50 hover:bg-gradient-to-r hover:from-cyan-50 hover:to-blue-50 dark:hover:from-cyan-900/30 dark:hover:to-blue-900/30 hover:ring-cyan-300 dark:hover:ring-cyan-600 transition-all duration-200"
|
|
3055
|
-
>
|
|
3056
|
-
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
3057
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
|
|
3058
|
-
</svg>
|
|
3059
|
-
Refresh
|
|
3060
|
-
</button>
|
|
3061
|
-
</div>
|
|
3062
|
-
</div>
|
|
3063
|
-
</div>
|
|
3064
|
-
</div>
|
|
3065
|
-
</div>
|
|
3066
|
-
|
|
3067
|
-
<!-- FAQ List -->
|
|
3068
|
-
<div id="faq-list">
|
|
3069
|
-
${faqs.length > 0 ? renderTable({
|
|
3070
|
-
tableId: "faq-table",
|
|
3071
|
-
rowClickable: true,
|
|
3072
|
-
rowClickUrl: (row) => `/admin/faq/${row.id}`,
|
|
3073
|
-
columns: [
|
|
3074
|
-
{ key: "question", label: "Question", sortable: true, sortType: "string" },
|
|
3075
|
-
{ key: "category", label: "Category", sortable: true, sortType: "string" },
|
|
3076
|
-
{ key: "isPublished", label: "Status", sortable: true, sortType: "boolean" },
|
|
3077
|
-
{ key: "sortOrder", label: "Order", sortable: true, sortType: "number" },
|
|
3078
|
-
{ key: "created_at", label: "Created", sortable: true, sortType: "date" },
|
|
3079
|
-
{ key: "actions", label: "Actions", sortable: false }
|
|
3080
|
-
],
|
|
3081
|
-
rows: faqs.map((faq) => ({
|
|
3082
|
-
id: faq.id,
|
|
3083
|
-
question: `
|
|
3084
|
-
<div class="max-w-xs">
|
|
3085
|
-
<div class="font-medium text-zinc-950 dark:text-white truncate">${escapeHtml(faq.question)}</div>
|
|
3086
|
-
${faq.tags ? `<div class="text-sm text-zinc-500 dark:text-zinc-400 mt-1">${escapeHtml(faq.tags)}</div>` : ""}
|
|
3087
|
-
</div>
|
|
3088
|
-
`,
|
|
3089
|
-
category: faq.category ? `
|
|
3090
|
-
<span class="inline-flex items-center rounded-md bg-purple-50 dark:bg-purple-500/10 px-2.5 py-1 text-sm font-medium text-purple-700 dark:text-purple-300 ring-1 ring-inset ring-purple-700/10 dark:ring-purple-400/20">
|
|
3091
|
-
${escapeHtml(faq.category)}
|
|
3092
|
-
</span>
|
|
3093
|
-
` : '<span class="text-zinc-500 dark:text-zinc-400">\u2014</span>',
|
|
3094
|
-
isPublished: faq.isPublished ? `
|
|
3095
|
-
<span class="inline-flex items-center rounded-md bg-lime-50 dark:bg-lime-500/10 px-2.5 py-1 text-sm font-medium text-lime-700 dark:text-lime-300 ring-1 ring-inset ring-lime-700/10 dark:ring-lime-400/20">
|
|
3096
|
-
Published
|
|
3097
|
-
</span>
|
|
3098
|
-
` : `
|
|
3099
|
-
<span class="inline-flex items-center rounded-md bg-yellow-50 dark:bg-yellow-500/10 px-2.5 py-1 text-sm font-medium text-yellow-700 dark:text-yellow-300 ring-1 ring-inset ring-yellow-700/10 dark:ring-yellow-400/20">
|
|
3100
|
-
Draft
|
|
3101
|
-
</span>
|
|
3102
|
-
`,
|
|
3103
|
-
sortOrder: faq.sortOrder.toString(),
|
|
3104
|
-
created_at: new Date(faq.created_at * 1e3).toLocaleDateString(),
|
|
3105
|
-
actions: `
|
|
3106
|
-
<div class="flex space-x-2">
|
|
3107
|
-
<button
|
|
3108
|
-
class="inline-flex items-center justify-center p-1.5 rounded-lg bg-red-600 text-white hover:bg-red-700 transition-colors"
|
|
3109
|
-
hx-delete="/admin/faq/${faq.id}"
|
|
3110
|
-
hx-confirm="Are you sure you want to delete this FAQ?"
|
|
3111
|
-
hx-target="#faq-list"
|
|
3112
|
-
hx-swap="outerHTML"
|
|
3113
|
-
title="Delete"
|
|
3114
|
-
>
|
|
3115
|
-
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
3116
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/>
|
|
3117
|
-
</svg>
|
|
3118
|
-
</button>
|
|
3119
|
-
</div>
|
|
3120
|
-
`
|
|
3121
|
-
})),
|
|
3122
|
-
selectable: true
|
|
3123
|
-
}) : `
|
|
3124
|
-
<div class="rounded-xl bg-white dark:bg-zinc-900 shadow-sm ring-1 ring-zinc-950/5 dark:ring-white/10 p-8 text-center">
|
|
3125
|
-
<svg class="mx-auto h-12 w-12 text-zinc-400 dark:text-zinc-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
3126
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
3127
|
-
</svg>
|
|
3128
|
-
<h3 class="mt-2 text-sm font-medium text-zinc-950 dark:text-white">No FAQs</h3>
|
|
3129
|
-
<p class="mt-1 text-sm text-zinc-500 dark:text-zinc-400">Get started by creating your first FAQ.</p>
|
|
3130
|
-
<div class="mt-6">
|
|
3131
|
-
<a href="/admin/faq/new"
|
|
3132
|
-
class="inline-flex items-center justify-center rounded-lg bg-zinc-950 dark:bg-white px-3.5 py-2.5 text-sm font-semibold text-white dark:text-zinc-950 hover:bg-zinc-800 dark:hover:bg-zinc-100 transition-colors shadow-sm">
|
|
3133
|
-
<svg class="-ml-1 mr-2 h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
|
3134
|
-
<path d="M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z" />
|
|
3135
|
-
</svg>
|
|
3136
|
-
New FAQ
|
|
3137
|
-
</a>
|
|
3138
|
-
</div>
|
|
3139
|
-
</div>
|
|
3140
|
-
`}
|
|
3141
|
-
</div>
|
|
3142
|
-
|
|
3143
|
-
${totalPages > 1 ? renderPagination({
|
|
3144
|
-
currentPage,
|
|
3145
|
-
totalPages,
|
|
3146
|
-
totalItems: totalCount,
|
|
3147
|
-
itemsPerPage: 20,
|
|
3148
|
-
startItem: (currentPage - 1) * 20 + 1,
|
|
3149
|
-
endItem: Math.min(currentPage * 20, totalCount),
|
|
3150
|
-
baseUrl: "/admin/faq"
|
|
3151
|
-
}) : ""}
|
|
3152
|
-
</div>
|
|
3153
|
-
`;
|
|
3154
|
-
const layoutData = {
|
|
3155
|
-
title: "FAQ Management - Admin",
|
|
3156
|
-
currentPath: "/admin/faq",
|
|
3157
|
-
user: data.user,
|
|
3158
|
-
content: pageContent
|
|
3159
|
-
};
|
|
3160
|
-
return renderAdminLayoutCatalyst(layoutData);
|
|
3161
|
-
}
|
|
3162
|
-
function escapeHtml(unsafe) {
|
|
3163
|
-
return unsafe.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
3164
|
-
}
|
|
3165
|
-
|
|
3166
2948
|
// src/templates/pages/admin-testimonials-list.template.ts
|
|
3167
2949
|
init_admin_layout_catalyst_template();
|
|
3168
2950
|
function renderTestimonialsList(data) {
|
|
@@ -3742,6 +3524,6 @@ function renderFormField(field) {
|
|
|
3742
3524
|
`;
|
|
3743
3525
|
}
|
|
3744
3526
|
|
|
3745
|
-
export { adminLayoutV2, getConfirmationDialogScript, init_admin_layout_catalyst_template, init_logo_template, renderAdminLayout, renderAdminLayoutCatalyst, renderAlert, renderCheckboxPage, renderCodeExamplesList, renderConfirmationDialog, renderDesignPage,
|
|
3746
|
-
//# sourceMappingURL=chunk-
|
|
3747
|
-
//# sourceMappingURL=chunk-
|
|
3527
|
+
export { adminLayoutV2, getConfirmationDialogScript, init_admin_layout_catalyst_template, init_logo_template, renderAdminLayout, renderAdminLayoutCatalyst, renderAlert, renderCheckboxPage, renderCodeExamplesList, renderConfirmationDialog, renderDesignPage, renderForm, renderFormField, renderLogo, renderPagination, renderTable, renderTestimonialsList };
|
|
3528
|
+
//# sourceMappingURL=chunk-5RKQB2JG.js.map
|
|
3529
|
+
//# sourceMappingURL=chunk-5RKQB2JG.js.map
|