-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: KAS <[email protected]>
- Loading branch information
Showing
14 changed files
with
731 additions
and
151 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
apps/web/src/app/daemon-api/[id]/view/[slug]/components.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { AlertCircle, Info, Loader2 } from "lucide-react"; | ||
|
||
export function Loading({ text }: { text: string }) { | ||
return ( | ||
<div className="h-40 w-96 bg-accent/50 rounded-lg border border-border/50 absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 backdrop-blur-md flex items-center justify-center text-muted-foreground gap-3"> | ||
<Loader2 className="animate-spin" /> | ||
<h1 className="text-2xl font-bold">{text}</h1> | ||
</div> | ||
); | ||
} | ||
export function ConnectionAlert({ text, error }: { text: string; error?: boolean }) { | ||
const Comp = error ? AlertCircle : Info; | ||
return ( | ||
<div className="h-40 w-96 bg-accent/50 rounded-lg border border-border/50 absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 backdrop-blur-md flex items-center justify-center text-muted-foreground gap-3"> | ||
<Comp className={`${error && "text-destructive"}`} /> | ||
<h1 className="text-2xl font-semibold">{text}</h1> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { Metadata } from "next"; | ||
export async function generateMetadata(props: { params: Promise<{ slug: string }> }): Promise<Metadata> { | ||
const params = await props.params; | ||
return { | ||
title: `Session ${params.slug.slice(0, 6)}`, | ||
}; | ||
} | ||
export default function ViewLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return children; | ||
} |
Oops, something went wrong.