kilo-cms 0.3.0 → 0.3.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kilo-cms",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "An installable, config-driven CMS engine for Next.js — admin panel, RBAC, a generic field-type engine, and an API, mounted into your own app. Define your content schema via config, not a hand-maintained registry.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cms",
|
package/src/admin/CmsSidebar.tsx
CHANGED
|
@@ -7,6 +7,7 @@ import { authClient } from '../auth-client'
|
|
|
7
7
|
import type { ContentViewSettings } from '../collections/content-view'
|
|
8
8
|
import { useCmsSiteSettings } from './CmsSiteSettingsProvider'
|
|
9
9
|
import { useCmsTheme } from './CmsThemeProvider'
|
|
10
|
+
import { KILO_CMS_VERSION } from '../version'
|
|
10
11
|
|
|
11
12
|
type Section = 'dashboard' | 'scheduled' | 'review-queue' | 'media' | 'settings' | 'users' | 'roles' | 'collections' | 'singles'
|
|
12
13
|
type IconName = 'grid' | 'calendar' | 'image' | 'gear' | 'logout' | 'users' | 'shield' | 'inbox' | 'layers' | 'database' | 'star' | 'folder' | 'trash'
|
|
@@ -143,5 +144,6 @@ export function CmsSidebar({ active, userName, contentContext, mediaContext }: {
|
|
|
143
144
|
<div className="cms-context-title"><p className="cms-nav-label">CMS feature</p><strong>{featureContext.title}</strong></div>
|
|
144
145
|
<div className="cms-context-groups">{featureContext.groups.map((group) => <section className="cms-context-group" key={group.label}><Link href={group.links[0]?.href ?? '/admin/settings'}>{group.label}</Link><div>{group.links.map((link) => <Link href={link.href} className={pathname === link.href ? 'active' : ''} key={link.href}>{link.label}</Link>)}</div></section>)}</div>
|
|
145
146
|
</nav> : null}
|
|
147
|
+
<p className="cms-sidebar-version" title="Kilo CMS version">v{KILO_CMS_VERSION}</p>
|
|
146
148
|
</aside>
|
|
147
149
|
}
|
|
@@ -14,6 +14,7 @@ import { Button } from './Button'
|
|
|
14
14
|
import { cmsAppearancePresets, cmsColorKeys, cmsSizeKeys, normalizeCmsAppearance, resolvedAppearanceTokens, type CmsAppearance, type CmsColorKey, type CmsSizeKey } from '../cms-appearance'
|
|
15
15
|
import { allApprovalContentTypes, defaultPublishingWorkflow, normalizePublishingWorkflow, type ApprovalContentType, type PublishingWorkflow } from '../publishing-workflow'
|
|
16
16
|
import { contentTypeDefs } from '../content-types'
|
|
17
|
+
import { KILO_CMS_VERSION } from '../version'
|
|
17
18
|
|
|
18
19
|
type Settings = { siteName: string; logoLight: string | null; logoDark: string | null; metaTitle: string; metaDescription: string; metaImage: string | null; cmsAppearance: CmsAppearance; publishingWorkflow: PublishingWorkflow; createdAt?: string; updatedAt?: string }
|
|
19
20
|
type Errors = Partial<Record<'siteName', string>>
|
|
@@ -91,6 +92,10 @@ export function SiteSettingsEditor({ userName }: { userName: string }) {
|
|
|
91
92
|
<CheckboxGroupField label="Require approval before publish" hint="This rule is enforced by the CMS API, including direct publish requests." value={settings.publishingWorkflow.approvalRequired} onChange={(approvalRequired) => update('publishingWorkflow', { approvalRequired: approvalRequired.filter((item): item is ApprovalContentType => (allApprovalContentTypes as string[]).includes(item)) })} options={approvalOptions} />
|
|
92
93
|
</section>
|
|
93
94
|
<CmsAppearanceEditor value={settings.cmsAppearance} onChange={(cmsAppearance) => { update('cmsAppearance', cmsAppearance); setAppearance(cmsAppearance) }} />
|
|
95
|
+
<section className="cms-section">
|
|
96
|
+
<div className="cms-section-heading"><p className="section-label">About</p><p>The Kilo CMS version this admin is running — include it when reporting a bug.</p></div>
|
|
97
|
+
<div className="cms-meta-list"><div><span>Kilo CMS version</span><span>v{KILO_CMS_VERSION}</span></div></div>
|
|
98
|
+
</section>
|
|
94
99
|
</div><aside className="cms-editor-sidebar"><p>{status}</p><Button variant="primary" type="button" onClick={save} icon="↗">Save settings</Button><div className="cms-meta-list"><div><span>Created</span><span>{formatDateTime(settings.createdAt)}</span></div><div><span>Updated</span><span>{formatDateTime(settings.updatedAt)}</span></div></div></aside></div>}
|
|
95
100
|
</section></main>
|
|
96
101
|
}
|
package/src/admin/admin.css
CHANGED
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
height: 100vh;
|
|
233
233
|
display: grid;
|
|
234
234
|
grid-template-columns: 46px minmax(0, 1fr);
|
|
235
|
-
grid-template-rows: auto minmax(0, 1fr);
|
|
235
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
236
236
|
column-gap: 16px;
|
|
237
237
|
padding: 0 4px 8px 0;
|
|
238
238
|
border-right: 1px solid var(--line);
|
|
@@ -6634,4 +6634,13 @@
|
|
|
6634
6634
|
.cms-theme-presets {
|
|
6635
6635
|
grid-template-columns: 1fr 1fr
|
|
6636
6636
|
}
|
|
6637
|
-
}
|
|
6637
|
+
}
|
|
6638
|
+
.cms-sidebar-version {
|
|
6639
|
+
grid-column: 1 / -1;
|
|
6640
|
+
grid-row: 3;
|
|
6641
|
+
margin: 0;
|
|
6642
|
+
padding: 8px 0 0;
|
|
6643
|
+
font-size: 11px;
|
|
6644
|
+
text-align: center;
|
|
6645
|
+
color: var(--muted)
|
|
6646
|
+
}
|