add raw json button for player and server
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m32s

This commit is contained in:
Lee
2024-04-18 04:32:30 +01:00
parent ac1d9b4f82
commit 73fcc708ce
6 changed files with 349 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import { Card } from "@/app/components/card";
import { CodeDialog } from "@/app/components/code-dialog";
import { CopyButton } from "@/app/components/copy-button";
import { ErrorCard } from "@/app/components/error-card";
import { LookupServer } from "@/app/components/server/lookup-server";
@ -122,7 +123,19 @@ export default async function Page({ params: { platform, hostname } }: Params):
{server != null && (
<ContextMenu>
<ContextMenuTrigger>
<Card className="w-max xs:w-fit">
<Card className="w-max xs:w-fit relative">
<div className="absolute top-0 right-0 p-2">
<CodeDialog
title="Server Data"
description="The server's data from the API"
code={JSON.stringify(server, undefined, 2)}
>
<button className="bg-background rounded-lg">
<p className="p-1">JSON</p>
</button>
</CodeDialog>
</div>
<div className="flex gap-2 flex-col">
<div className="flex gap-4 flex-col xs:flex-row">
{favicon && (