Fixes: 1. useFetch: add credentials:'same-origin' — cookie wasn't being sent with API calls, causing 401 → React error boundary → 'Etwas ist schiefgelaufen' 2. Instance detail Sheet now loads correctly (cookie sent with request) New instance actions (UI + API): - Redeploy: triggers Dokploy application.redeploy (rebuilds from latest commit) - Stop: triggers Dokploy application.stop (pauses container) - Start: triggers Dokploy application.start (resumes container) - Remove: existing delete (SlideCommit confirmation) Dokploy deploy fix: - deployApplication now calls markRunning before deploy - This ensures Dokploy creates a deployment job ActionsRow redesigned: - demo_active/active: [Redeploy] [Stop] [Demo +7d] [Remove] - grace: [Start] [Remove] - failed: [Retry] [Remove] - provisioning/deleting/deleted: no actions
62 lines
1.8 KiB
TypeScript
Executable File
62 lines
1.8 KiB
TypeScript
Executable File
"use client";
|
|
|
|
// global-error.tsx — Next.js special page, rendered OUTSIDE the root layout.
|
|
// Must be fully self-contained: no ThemeProvider, no Sonner, no context hooks.
|
|
// dynamic = 'force-dynamic' prevents static prerendering which crashes because
|
|
// the build tries to resolve the full module graph including layout providers.
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export default function GlobalError({
|
|
error,
|
|
reset,
|
|
}: {
|
|
error: Error & { digest?: string };
|
|
reset: () => void;
|
|
}) {
|
|
return (
|
|
<html lang="de">
|
|
<body
|
|
style={{
|
|
margin: 0,
|
|
minHeight: "100vh",
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
background: "#0a0a0a",
|
|
color: "#fafafa",
|
|
}}
|
|
>
|
|
<div style={{ textAlign: "center", padding: "2rem", maxWidth: 480 }}>
|
|
<h1 style={{ fontSize: "1.5rem", marginBottom: "0.5rem" }}>
|
|
Etwas ist schiefgelaufen
|
|
</h1>
|
|
<p style={{ color: "#a1a1a1", fontSize: "0.875rem", marginBottom: "1.5rem" }}>
|
|
Ein unerwarteter Fehler ist aufgetreten. Bitte versuche es erneut.
|
|
</p>
|
|
{error.digest && (
|
|
<p style={{ color: "#525252", fontSize: "0.75rem", marginBottom: "1.5rem" }}>
|
|
Fehler-ID: {error.digest}
|
|
</p>
|
|
)}
|
|
<button
|
|
onClick={() => reset()}
|
|
style={{
|
|
padding: "0.5rem 1rem",
|
|
borderRadius: "0.375rem",
|
|
border: "1px solid #404040",
|
|
background: "transparent",
|
|
color: "#fafafa",
|
|
cursor: "pointer",
|
|
fontSize: "0.875rem",
|
|
}}
|
|
>
|
|
Erneut versuchen
|
|
</button>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|