mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
feat: add detail page
This commit is contained in:
parent
a429ed30ba
commit
3a73f27cea
7
app/[locale]/(main)/detail/[id]/page.tsx
Normal file
7
app/[locale]/(main)/detail/[id]/page.tsx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export default function Page({ params }: { params: { id: string } }) {
|
||||||
|
return (
|
||||||
|
<div className="mx-auto grid w-full max-w-5xl gap-4 md:gap-6">
|
||||||
|
{params.id}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
@ -36,13 +36,21 @@ export default function ServerCard({
|
|||||||
"flex flex-col items-center justify-start gap-3 p-3 md:px-5 lg:flex-row"
|
"flex flex-col items-center justify-start gap-3 p-3 md:px-5 lg:flex-row"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Popover>
|
{/* <Popover>
|
||||||
<PopoverTrigger asChild>
|
<PopoverTrigger asChild>
|
||||||
|
|
||||||
|
</PopoverTrigger>
|
||||||
|
<PopoverContent side="top">
|
||||||
|
<ServerCardPopover status={props.status} host={props.host} />
|
||||||
|
</PopoverContent>
|
||||||
|
</Popover> */}
|
||||||
<section
|
<section
|
||||||
className="grid items-center gap-2 lg:w-28"
|
className="grid items-center gap-2 lg:w-28 cursor-pointer"
|
||||||
style={{ gridTemplateColumns: "auto auto 1fr" }}
|
style={{ gridTemplateColumns: "auto 1fr auto" }}
|
||||||
|
onClick={() => {
|
||||||
|
router.push(`/${locale}/detail/${id}`);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<span className="h-2 w-2 shrink-0 rounded-full bg-green-500 self-center"></span>
|
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex items-center justify-center",
|
"flex items-center justify-center",
|
||||||
@ -59,12 +67,8 @@ export default function ServerCard({
|
|||||||
>
|
>
|
||||||
{name}
|
{name}
|
||||||
</p>
|
</p>
|
||||||
|
<span className="h-2 w-2 shrink-0 rounded-full bg-green-500 self-center"></span>
|
||||||
</section>
|
</section>
|
||||||
</PopoverTrigger>
|
|
||||||
<PopoverContent side="top">
|
|
||||||
<ServerCardPopover status={props.status} host={props.host} />
|
|
||||||
</PopoverContent>
|
|
||||||
</Popover>
|
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
router.push(`/${locale}/${id}`);
|
router.push(`/${locale}/${id}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user