Initial commit: page-manager Next.js app with Coolify deploy support
Replace Vercel-specific infra (Cron, Blob) with self-hosted equivalents for deployment to Coolify: in-container cron scheduler (scripts/cron-runner.mjs) and disk-based upload storage served via /api/uploads/[...path]. Add Dockerfile, .dockerignore, and /api/health for container health checks. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { prisma } from "@/lib/db";
|
||||
import { getConsoleContext, scopedPageIds } from "@/lib/console";
|
||||
import { Shell } from "@/components/Shell";
|
||||
|
||||
export default async function ConsoleLayout({ children }: { children: React.ReactNode }) {
|
||||
const ctx = await getConsoleContext();
|
||||
const pendingApprovals = await prisma.post.count({
|
||||
where: { pageId: { in: scopedPageIds(ctx) }, status: "PENDING_APPROVAL" },
|
||||
});
|
||||
|
||||
return (
|
||||
<Shell
|
||||
user={{ name: ctx.user.name, email: ctx.user.email, avatarUrl: ctx.user.avatarUrl, superadmin: ctx.user.globalRole === "SUPERADMIN" }}
|
||||
pages={ctx.pages.map(({ id, name, pictureUrl, status }) => ({ id, name, pictureUrl, status }))}
|
||||
selectedId={ctx.selected?.id ?? null}
|
||||
counts={{ pendingApprovals }}
|
||||
>
|
||||
{children}
|
||||
</Shell>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user