Beide routes hadden alleen sub-pages; /flows en /settings zelf gaven 404. Minimale index met kaartjes naar de bestaande sub-routes, consistent met het home-dashboard. Onderdeel van IDEA-060 voor een rijkere indexering later. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
import Link from 'next/link'
|
|
import { redirect } from 'next/navigation'
|
|
import { getCurrentUser } from '@/lib/session'
|
|
|
|
export const dynamic = 'force-dynamic'
|
|
|
|
const FLOWS = [
|
|
{
|
|
href: '/flows/update-scrum4me-web',
|
|
title: 'Update Scrum4Me website',
|
|
desc: 'Pull main, build, restart container, run smoke tests',
|
|
},
|
|
{
|
|
href: '/flows/update-caddy-config',
|
|
title: 'Update Caddy config',
|
|
desc: 'Reload Caddy met nieuwe Caddyfile + cert renewal check',
|
|
},
|
|
]
|
|
|
|
export default async function FlowsIndex() {
|
|
const user = await getCurrentUser()
|
|
if (!user) redirect('/login')
|
|
|
|
return (
|
|
<div className="min-h-screen bg-background p-6">
|
|
<div className="mx-auto max-w-6xl space-y-6">
|
|
<div>
|
|
<h1 className="text-2xl font-semibold tracking-tight">Flows</h1>
|
|
<p className="text-sm text-muted-foreground">Multi-step deployments met dry-run en audit-log</p>
|
|
</div>
|
|
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
|
{FLOWS.map((f) => (
|
|
<Link
|
|
key={f.href}
|
|
href={f.href}
|
|
className="block rounded-lg border bg-card p-5 transition-colors hover:bg-accent"
|
|
>
|
|
<h2 className="text-lg font-medium">{f.title}</h2>
|
|
<p className="mt-1 text-sm text-muted-foreground">{f.desc}</p>
|
|
</Link>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|