betterstart-cli 0.0.2 → 0.0.3
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.
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
2
|
+
import { AdminSidebar } from '@admin/components/layouts/admin-sidebar'
|
|
3
|
+
import { SidebarProvider } from '@admin/components/ui/sidebar'
|
|
2
4
|
|
|
3
5
|
export async function AuthGateRsc({ children }: { children: React.ReactNode }) {
|
|
4
6
|
await requireRole([UserRole.ADMIN, UserRole.EDITOR])
|
|
5
|
-
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<SidebarProvider className="min-h-svh">
|
|
10
|
+
<AdminSidebar />
|
|
11
|
+
<div className="relative flex min-w-0 flex-1 flex-col [--admin-shell-content-left:0px] md:[--admin-shell-content-left:var(--sidebar-width)] md:peer-data-[state=collapsed]:[--admin-shell-content-left:var(--sidebar-width-icon)]">
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
</SidebarProvider>
|
|
15
|
+
)
|
|
6
16
|
}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import { AdminSidebar } from '@admin/components/layouts/admin-sidebar'
|
|
2
1
|
import { ContentSkeleton } from '@admin/components/layouts/content-skeleton'
|
|
3
|
-
import { SidebarProvider } from '@admin/components/ui/sidebar'
|
|
4
2
|
import { Suspense } from 'react'
|
|
5
3
|
import { AuthGateRsc } from './auth-gate-rsc'
|
|
6
4
|
|
|
7
5
|
export default function AdminAuthLayout({ children }: { children: React.ReactNode }) {
|
|
8
6
|
return (
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
<Suspense fallback={<ContentSkeleton />}>
|
|
13
|
-
<AuthGateRsc>{children}</AuthGateRsc>
|
|
14
|
-
</Suspense>
|
|
15
|
-
</div>
|
|
16
|
-
</SidebarProvider>
|
|
7
|
+
<Suspense fallback={<ContentSkeleton />}>
|
|
8
|
+
<AuthGateRsc>{children}</AuthGateRsc>
|
|
9
|
+
</Suspense>
|
|
17
10
|
)
|
|
18
11
|
}
|
package/dist/cli.js
CHANGED
|
@@ -17438,7 +17438,7 @@ async function promptPlugins() {
|
|
|
17438
17438
|
process.exit(0);
|
|
17439
17439
|
}
|
|
17440
17440
|
const selectedPlugins = await p7.multiselect({
|
|
17441
|
-
message: `Select
|
|
17441
|
+
message: `Select presets
|
|
17442
17442
|
${styleText("dim", "Press [Spacebar] to select/unselect")}`,
|
|
17443
17443
|
options: [
|
|
17444
17444
|
{
|
|
@@ -22385,7 +22385,7 @@ var TEMPLATE_REGISTRY = {
|
|
|
22385
22385
|
relPath: "app/(admin)/admin/(authenticated)/auth-gate-rsc.tsx",
|
|
22386
22386
|
content: () => readTemplate("pages/auth-gate-rsc.tsx"),
|
|
22387
22387
|
base: "cwd",
|
|
22388
|
-
dependencies: ["auth-session"]
|
|
22388
|
+
dependencies: ["admin-sidebar", "auth-session"]
|
|
22389
22389
|
},
|
|
22390
22390
|
"account-layout": {
|
|
22391
22391
|
relPath: "app/(admin)/admin/(account)/layout.tsx",
|