create-nextjs-cms 0.5.73 → 0.5.74
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 +3 -3
- package/templates/default/app/(rootLayout)/layout.tsx +3 -1
- package/templates/default/components/Layout.tsx +10 -1
- package/templates/default/components/Sidebar.tsx +4 -4
- package/templates/default/components/form/helpers/_section-hot-reload.js +1 -1
- package/templates/default/package.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-nextjs-cms",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.74",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"tsx": "^4.20.6",
|
|
30
30
|
"typescript": "^5.9.2",
|
|
31
31
|
"@lzcms/eslint-config": "0.3.0",
|
|
32
|
-
"@lzcms/
|
|
33
|
-
"@lzcms/
|
|
32
|
+
"@lzcms/tsconfig": "0.1.0",
|
|
33
|
+
"@lzcms/prettier-config": "0.1.0"
|
|
34
34
|
},
|
|
35
35
|
"prettier": "@lzcms/prettier-config",
|
|
36
36
|
"scripts": {
|
|
@@ -8,7 +8,9 @@ export default async function CMSLayout({ children }: { children: React.ReactNod
|
|
|
8
8
|
|
|
9
9
|
return (
|
|
10
10
|
<HydrateClient>
|
|
11
|
-
<Layout logoUrlPath={cmsConfig.ui.logo}
|
|
11
|
+
<Layout logoUrlPath={cmsConfig.ui.logo} logoText={cmsConfig.ui.logoText}>
|
|
12
|
+
{children}
|
|
13
|
+
</Layout>
|
|
12
14
|
</HydrateClient>
|
|
13
15
|
)
|
|
14
16
|
}
|
|
@@ -9,7 +9,15 @@ import { Toaster } from '@/components/ui/toaster'
|
|
|
9
9
|
import { useSession } from 'nextjs-cms/auth/react'
|
|
10
10
|
import LoadingSpinners from '@/components/LoadingSpinners'
|
|
11
11
|
|
|
12
|
-
function Layout({
|
|
12
|
+
function Layout({
|
|
13
|
+
children,
|
|
14
|
+
logoUrlPath,
|
|
15
|
+
logoText,
|
|
16
|
+
}: {
|
|
17
|
+
children: React.ReactNode
|
|
18
|
+
logoUrlPath: string
|
|
19
|
+
logoText: string
|
|
20
|
+
}) {
|
|
13
21
|
const [showMobileSidebar, setShowMobileSidebar] = useState(false)
|
|
14
22
|
const session = useSession({
|
|
15
23
|
required: true,
|
|
@@ -35,6 +43,7 @@ function Layout({ children, logoUrlPath }: { children: React.ReactNode, logoUrlP
|
|
|
35
43
|
}}
|
|
36
44
|
mobileSidebar={showMobileSidebar}
|
|
37
45
|
logoUrlPath={logoUrlPath}
|
|
46
|
+
logoText={logoText}
|
|
38
47
|
/>
|
|
39
48
|
{showMobileSidebar && (
|
|
40
49
|
// Display a black transparent div to close the sidebar when clicked outside
|
|
@@ -12,7 +12,7 @@ import { trpc } from '@/app/_trpc/client'
|
|
|
12
12
|
import { useToast } from '@/components/ui/use-toast'
|
|
13
13
|
import { logout, useSession } from 'nextjs-cms/auth/react'
|
|
14
14
|
|
|
15
|
-
const Sidebar = (props: SidebarProps & { logoUrlPath: string }) => {
|
|
15
|
+
const Sidebar = (props: SidebarProps & { logoUrlPath: string; logoText: string }) => {
|
|
16
16
|
const session = useSession()
|
|
17
17
|
const [navItems] = trpc.navigation.getSidebar.useSuspenseQuery()
|
|
18
18
|
const { toast } = useToast()
|
|
@@ -48,12 +48,12 @@ const Sidebar = (props: SidebarProps & { logoUrlPath: string }) => {
|
|
|
48
48
|
<div
|
|
49
49
|
className={classNames({
|
|
50
50
|
'sticky top-0 flex h-[65px] items-center bg-indigo-700 transition-none dark:bg-slate-900': true,
|
|
51
|
-
'justify-start p-4
|
|
51
|
+
'justify-start gap-2 p-4': true,
|
|
52
52
|
})}
|
|
53
53
|
>
|
|
54
54
|
<Image src={props.logoUrlPath} alt='logo' width={32} height={32} />
|
|
55
|
-
<span className='px-2 text-white/90 transition-all duration-150
|
|
56
|
-
|
|
55
|
+
<span className='bg-transparent px-2 font-normal tracking-[0.1em] text-white/90 transition-all duration-150'>
|
|
56
|
+
{props.logoText}
|
|
57
57
|
</span>
|
|
58
58
|
</div>
|
|
59
59
|
<ScrollArea type='always' className='grow'>
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"nanoid": "^5.1.2",
|
|
65
65
|
"next": "16.1.1",
|
|
66
66
|
"next-themes": "^0.4.6",
|
|
67
|
-
"nextjs-cms": "0.5.
|
|
67
|
+
"nextjs-cms": "0.5.74",
|
|
68
68
|
"plaiceholder": "^3.0.0",
|
|
69
69
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
70
70
|
"qrcode": "^1.5.4",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"eslint-config-prettier": "^10.0.1",
|
|
98
98
|
"eslint-plugin-prettier": "^5.2.3",
|
|
99
99
|
"fs-extra": "^11.3.3",
|
|
100
|
-
"nextjs-cms-kit": "0.5.
|
|
100
|
+
"nextjs-cms-kit": "0.5.74",
|
|
101
101
|
"postcss": "^8.5.1",
|
|
102
102
|
"prettier": "3.5.0",
|
|
103
103
|
"raw-loader": "^4.0.2",
|