Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions apps/frontend/app/clan/[clanName]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { notFound } from 'next/navigation';
import Image from 'next/image';
import prisma from '../../../utils/prisma';
import { LayoutTabs } from './LayoutTabs';
import { paramsSchema } from './schema';
Expand Down Expand Up @@ -61,20 +62,23 @@ export default async function Index({
<ActivityHeader
apiPath={`/api/clan/${encodeString(clanName)}/activity`}
activity={activity}
contentClassName="flex-col justify-center gap-2"
contentClassName="flex-row items-center gap-4"
>
<h1 className="text-2xl font-bold">{clan.name}</h1>
<div className="flex flex-row divide-x">
<span className="pr-4">
<ClanPlayerCount
activeCount={clan.activePlayerCount}
totalCount={clan._count.clanPlayerInfos}
/>
</span>
<span className="px-4">
Playtime: {formatPlayTime(clan.playTime)}
</span>
</div>
<Image src="/clan.png" width={79} height={100} alt="Clan" />
<section className="flex flex-col gap-2">
<h1 className="text-2xl font-bold">{clan.name}</h1>
<div className="flex flex-row divide-x">
<span className="pr-4">
<ClanPlayerCount
activeCount={clan.activePlayerCount}
totalCount={clan._count.clanPlayerInfos}
/>
</span>
<span className="px-4">
Playtime: {formatPlayTime(clan.playTime)}
</span>
</div>
</section>
</ActivityHeader>
</header>

Expand Down
75 changes: 40 additions & 35 deletions apps/frontend/app/server/[ip]/[port]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { z } from 'zod';
import { notFound } from 'next/navigation';
import { isIP } from 'net';
import Link from 'next/link';
import Image from 'next/image';
import { List, ListCell } from '../../../../components/List';
import { searchParamPageSchema } from '../../../../utils/page';
import prisma from '../../../../utils/prisma';
Expand Down Expand Up @@ -43,7 +44,8 @@ function ipAndPort(ip: string, port: number) {
function OfflineServer({ gameServer }: { gameServer: GameServer }) {
return (
<main className="flex flex-col gap-8 py-12">
<header className="flex flex-row px-20 gap-8">
<header className="flex flex-row items-center px-20 gap-4">
<Image src="/server.png" width={124} height={100} alt="Server" />
<section className="flex flex-col gap-2 grow">
<h1 className="text-2xl font-bold">
{ipAndPort(gameServer.ip, gameServer.port)}
Expand Down Expand Up @@ -143,41 +145,44 @@ export default async function Index({
<ActivityHeader
apiPath={`/api/server/${encodeIp(gameServer.ip)}/${gameServer.port}/activity`}
activity={activity}
contentClassName="flex-col justify-center gap-2"
contentClassName="flex-row items-center gap-4"
>
<h1 className="text-2xl font-bold">
{gameServer.gameServerState.name}
</h1>
<div className="flex flex-row divide-x">
<span className="pr-4">
<Link
className="hover:underline"
href={{
pathname: `/gametype/${encodeString(
gameServer.gameServerState.map.gameTypeName
)}`,
}}
>
{gameServer.gameServerState.map.gameTypeName}
</Link>
</span>
<span className="px-4">
<Link
className="hover:underline"
href={{
pathname: `/gametype/${encodeString(
gameServer.gameServerState.map.gameTypeName
)}/map/${encodeString(gameServer.gameServerState.map.name)}`,
}}
>
{gameServer.gameServerState.map.name}
</Link>
</span>
<span className="px-4">{`${gameServer.gameServerState.numClients} / ${gameServer.gameServerState.maxClients} clients`}</span>
<span className="px-4">
Playtime: {formatPlayTime(gameServer.playTime)}
</span>
</div>
<Image src="/server.png" width={124} height={100} alt="Server" />
<section className="flex flex-col gap-2">
<h1 className="text-2xl font-bold">
{gameServer.gameServerState.name}
</h1>
<div className="flex flex-row divide-x">
<span className="pr-4">
<Link
className="hover:underline"
href={{
pathname: `/gametype/${encodeString(
gameServer.gameServerState.map.gameTypeName
)}`,
}}
>
{gameServer.gameServerState.map.gameTypeName}
</Link>
</span>
<span className="px-4">
<Link
className="hover:underline"
href={{
pathname: `/gametype/${encodeString(
gameServer.gameServerState.map.gameTypeName
)}/map/${encodeString(gameServer.gameServerState.map.name)}`,
}}
>
{gameServer.gameServerState.map.name}
</Link>
</span>
<span className="px-4">{`${gameServer.gameServerState.numClients} / ${gameServer.gameServerState.maxClients} clients`}</span>
<span className="px-4">
Playtime: {formatPlayTime(gameServer.playTime)}
</span>
</div>
</section>
</ActivityHeader>
</header>

Expand Down
Binary file added apps/frontend/public/clan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/frontend/public/server.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading