Merge branch 'cloudflare' of https://github.com/hamster1963/nezha-dash into cloudflare

This commit is contained in:
GH Action - Upstream Sync 2024-10-14 02:15:51 +00:00
commit 1ac39940b7

View File

@ -38,8 +38,18 @@ export default function ServerCard({
> >
<Popover> <Popover>
<PopoverTrigger asChild> <PopoverTrigger asChild>
<section className={"flex items-center justify-start gap-2 lg:w-28"}> <section
{showFlag ? <ServerFlag country_code={country_code} /> : null} className="grid items-center gap-2 lg:w-28"
style={{ gridTemplateColumns: "auto 1fr auto" }}
>
<div
className={cn(
"flex items-center justify-center",
showFlag ? "min-w-[17px]" : "min-w-0",
)}
>
{showFlag ? <ServerFlag country_code={country_code} /> : null}
</div>
<p <p
className={cn( className={cn(
"break-all font-bold tracking-tight", "break-all font-bold tracking-tight",
@ -48,7 +58,7 @@ export default function ServerCard({
> >
{name} {name}
</p> </p>
<span className="h-2 w-2 shrink-0 rounded-full bg-green-500"></span> <span className="h-2 w-2 shrink-0 rounded-full bg-green-500 self-center"></span>
</section> </section>
</PopoverTrigger> </PopoverTrigger>
<PopoverContent side="top"> <PopoverContent side="top">
@ -121,14 +131,27 @@ export default function ServerCard({
</Card> </Card>
) : ( ) : (
<Card <Card
className={ className={cn(
"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",
} showNetTransfer
? "lg:min-h-[91px] min-h-[123px]"
: "lg:min-h-[61px] min-h-[93px]",
)}
> >
<Popover> <Popover>
<PopoverTrigger asChild> <PopoverTrigger asChild>
<section className={"flex items-center justify-start gap-2 lg:w-28"}> <section
{showFlag ? <ServerFlag country_code={country_code} /> : null} className="grid items-center gap-2 lg:w-28"
style={{ gridTemplateColumns: "auto 1fr auto" }}
>
<div
className={cn(
"flex items-center justify-center",
showFlag ? "min-w-[17px]" : "min-w-0",
)}
>
{showFlag ? <ServerFlag country_code={country_code} /> : null}
</div>
<p <p
className={cn( className={cn(
"break-all font-bold tracking-tight", "break-all font-bold tracking-tight",
@ -137,7 +160,7 @@ export default function ServerCard({
> >
{name} {name}
</p> </p>
<span className="h-2 w-2 shrink-0 rounded-full bg-red-500"></span> <span className="h-2 w-2 shrink-0 rounded-full bg-red-500 self-center"></span>
</section> </section>
</PopoverTrigger> </PopoverTrigger>
<PopoverContent className="w-fit p-2" side="top"> <PopoverContent className="w-fit p-2" side="top">