Files
adminandClaude Opus 4.8 ba96566c14 feat(infra): payments (Stripe), auth scaffold, engine bridge, embeds, .env.example
Env-guarded so build stays green: /api/payments/[order_id]/deposit+release + /api/webhooks/stripe (lazy Stripe, 50/50 escrow, 501 until keys); /api/auth login|me|logout (HMAC signed-session scaffold, guarded dev login); lib/engine bridges edge->FastAPI (estimates defers to ENGINE_URL when set); components/embed for NocoDB/Metabase signed URLs; .env.example full inventory. tsc 0, build green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 21:19:29 +02:00

40 lines
1.3 KiB
TypeScript

"use client";
// Renders an embedded NocoDB view or Metabase dashboard inside 0pt's mono chrome.
// The parent passes a server-generated SIGNED URL (docs/08) so the customer never
// sees a separate login. No raw credentials reach the client.
export function EmbeddedView({
src,
title,
height = 720,
}: {
src: string | null;
title: string;
height?: number;
}) {
return (
<div className="border border-border bg-background">
<div className="flex items-center justify-between border-b border-border px-4 py-2.5">
<span className="font-mono text-[11px] uppercase tracking-[0.12em] text-muted-foreground">{title}</span>
<span className="inline-block h-1.5 w-1.5" style={{ backgroundColor: "var(--prov-3)" }} />
</div>
{src ? (
<iframe
src={src}
title={title}
className="w-full"
style={{ height, border: "0" }}
sandbox="allow-scripts allow-same-origin allow-forms allow-popups"
loading="lazy"
/>
) : (
<div className="flex items-center justify-center px-6 py-20 text-center">
<p className="font-mono text-[11px] uppercase tracking-[0.1em] text-muted-foreground">
Vyn aktiveras vid leverans.
</p>
</div>
)}
</div>
);
}