feat(routes): index pages voor /flows en /settings
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>
This commit is contained in:
parent
252e535f23
commit
656aa27a7f
2 changed files with 87 additions and 0 deletions
46
app/flows/page.tsx
Normal file
46
app/flows/page.tsx
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
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>
|
||||
)
|
||||
}
|
||||
41
app/settings/page.tsx
Normal file
41
app/settings/page.tsx
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import Link from 'next/link'
|
||||
import { redirect } from 'next/navigation'
|
||||
import { getCurrentUser } from '@/lib/session'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
const SETTINGS = [
|
||||
{
|
||||
href: '/settings/backups',
|
||||
title: 'Backups',
|
||||
desc: 'Postgres dumps en restore-runbook',
|
||||
},
|
||||
]
|
||||
|
||||
export default async function SettingsIndex() {
|
||||
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">Settings</h1>
|
||||
<p className="text-sm text-muted-foreground">Configuratie en onderhoud</p>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
{SETTINGS.map((s) => (
|
||||
<Link
|
||||
key={s.href}
|
||||
href={s.href}
|
||||
className="block rounded-lg border bg-card p-5 transition-colors hover:bg-accent"
|
||||
>
|
||||
<h2 className="text-lg font-medium">{s.title}</h2>
|
||||
<p className="mt-1 text-sm text-muted-foreground">{s.desc}</p>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue