fix server page for mobile
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m4s

This commit is contained in:
Lee 2024-04-19 21:43:32 +01:00
parent 97c1b88370
commit 95fef83dcf
3 changed files with 32 additions and 34 deletions

@ -135,7 +135,7 @@ export default async function Page({ params: { platform, hostname } }: Params):
{error && <ErrorCard message={error} />}
{server != null && (
<ContextMenu>
<ContextMenuTrigger>
<ContextMenuTrigger asChild>
<ServerView server={server} favicon={favicon} />
</ContextMenuTrigger>
<ContextMenuContent className="flex flex-col">

@ -45,7 +45,7 @@ export function PlayerView({ player }: PlayerViewProps): ReactElement {
</div>
</div>
</Card>
<div className="flex gap-2">
<div className="flex gap-2 flex-wrap">
<CodeDialog
title="Player Data"
description="The player's data from the API"

@ -24,11 +24,10 @@ type ServerViewProps = {
export function ServerView({ server, favicon }: ServerViewProps): ReactElement {
return (
<div className="flex flex-col gap-2 items-center scale-75 xs:scale-100">
<Card classNameContent="w-max xs:w-fit relative">
<div className="flex relative flex-col gap-2 items-center scale-75 xs:scale-100 w-screen">
<div
className={cn(
"w-[31rem] relative p-2 flex gap-2 rounded-lg pointer-events-none",
"w-[29rem] relative p-2 flex gap-2 rounded-lg pointer-events-none",
'bg-[url("/media/server-background.png")]',
)}
>
@ -41,7 +40,7 @@ export function ServerView({ server, favicon }: ServerViewProps): ReactElement {
/>
{/* Name & MOTD */}
<div className={cn("flex flex-col leading-[1.3rem] w-full", minecraft.className)}>
<div className={cn("flex flex-col leading-[1.3rem]", minecraft.className)}>
<h1>{server.hostname}</h1>
{server.motd.html.map((line: string, index: number): ReactElement => {
return <p key={index} className="pointer-events-auto" dangerouslySetInnerHTML={{ __html: line }}></p>;
@ -56,8 +55,7 @@ export function ServerView({ server, favicon }: ServerViewProps): ReactElement {
<Image src="/media/full-ping.png" alt="Ping!" width={28} height={28} />
</div>
</div>
</Card>
<div className="flex gap-2">
<div className="flex gap-2 flex-wrap">
<CodeDialog
title="Server Data"
description="The servers's data from the API"