chore:/update fallback port
This commit is contained in:
+38
-24
@@ -125,6 +125,11 @@ function App() {
|
||||
history: { status: 'idle', data: null, error: null },
|
||||
games: { status: 'idle', data: null, error: null },
|
||||
})
|
||||
const teams = useMemo(
|
||||
() => leaderboard.data?.teams || leaderboard.data?.squadrons || [],
|
||||
[leaderboard.data],
|
||||
)
|
||||
const matches = live.data?.matches || []
|
||||
|
||||
function navigate(path) {
|
||||
window.history.pushState({}, '', path)
|
||||
@@ -342,11 +347,6 @@ function App() {
|
||||
}
|
||||
}, [route.page, route.teamName])
|
||||
|
||||
const teams = useMemo(
|
||||
() => leaderboard.data?.teams || leaderboard.data?.squadrons || [],
|
||||
[leaderboard.data],
|
||||
)
|
||||
const matches = live.data?.matches || []
|
||||
const topTeamName = bestTeamName(teams[0])
|
||||
const searchPlaceholder =
|
||||
searchHint.status === 'ready' ? `Found ${searchHint.name}` : topTeamName || 'Search teams'
|
||||
@@ -523,22 +523,26 @@ function RecentGamesSection({ live, matches, navigate }) {
|
||||
<h3 className="truncate text-lg font-semibold">
|
||||
{match.map_name || 'Unknown map'}
|
||||
</h3>
|
||||
<p className="mt-1 text-xs text-text-soft">{formatDate(match.endtime_unix)}</p>
|
||||
<p className="mt-1 text-xs text-text-soft">{formatDate(match.timestamp)}</p>
|
||||
</div>
|
||||
<span className="shrink-0 rounded-md bg-surface px-2 py-1 text-xs font-semibold text-text-soft">
|
||||
{match.game_type || match.mode || 'SQB'}
|
||||
{match.result || 'Unknown'}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="mt-4 grid grid-cols-[1fr_auto_1fr] items-center gap-3 text-sm">
|
||||
<p className="truncate text-right font-semibold text-fury-cyan">
|
||||
{match.winning_tag || match.winning_squadron || 'Winner'}
|
||||
<div className="mt-4 grid grid-cols-[1fr_auto] items-center gap-3 text-sm">
|
||||
<p className="truncate font-semibold text-fury-cyan">
|
||||
{match.team_name || 'TSS team'}
|
||||
</p>
|
||||
<span className="text-xs font-semibold uppercase text-text-muted">vs</span>
|
||||
<p className="truncate font-semibold text-fury-violet">
|
||||
{match.losing_tag || match.losing_squadron || 'Loser'}
|
||||
<p className="text-text-soft">
|
||||
{formatNumber(match.player_count)} players
|
||||
</p>
|
||||
</div>
|
||||
<div className="mt-3 flex flex-wrap gap-2 text-xs text-text-soft">
|
||||
<span>{formatNumber(match.stats?.ground_kills)} ground</span>
|
||||
<span>{formatNumber(match.stats?.air_kills)} air</span>
|
||||
<span>{formatNumber(match.stats?.deaths)} deaths</span>
|
||||
</div>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
@@ -924,23 +928,33 @@ function BattleLogsPage({ live, matches }) {
|
||||
<div className="overflow-hidden rounded-lg border border-border bg-fury-white shadow-sm">
|
||||
{matches.map((match) => (
|
||||
<div
|
||||
className="grid gap-4 border-b border-surface px-5 py-4 md:grid-cols-[1fr_1.2fr_auto]"
|
||||
className="grid gap-4 border-b border-surface px-5 py-4 md:grid-cols-[1fr_1fr_auto_repeat(4,auto)] md:items-center"
|
||||
key={match.session_id}
|
||||
>
|
||||
<div className="min-w-0">
|
||||
<p className="truncate font-semibold">{match.map_name || 'Unknown map'}</p>
|
||||
<p className="text-xs text-text-soft">{formatDate(match.endtime_unix)}</p>
|
||||
</div>
|
||||
<div className="grid grid-cols-[1fr_auto_1fr] items-center gap-3 text-sm">
|
||||
<p className="truncate text-right font-semibold text-fury-cyan">
|
||||
{match.winning_tag || match.winning_squadron || 'Winner'}
|
||||
</p>
|
||||
<span className="text-xs font-semibold uppercase text-text-muted">vs</span>
|
||||
<p className="truncate font-semibold text-fury-violet">
|
||||
{match.losing_tag || match.losing_squadron || 'Loser'}
|
||||
<p className="text-xs text-text-soft">
|
||||
{formatDate(match.timestamp)} · {match.session_id}
|
||||
</p>
|
||||
</div>
|
||||
<p className="text-sm text-text-soft">{match.game_type || match.mode || 'SQB'}</p>
|
||||
<div className="min-w-0">
|
||||
<p className="truncate font-semibold text-fury-cyan">
|
||||
{match.team_name || 'TSS team'}
|
||||
</p>
|
||||
<p className="truncate text-xs text-text-soft">{match.long_name || 'TSS battle record'}</p>
|
||||
</div>
|
||||
<p
|
||||
className={`w-fit rounded-md px-3 py-1 text-sm font-semibold ${String(match.result).toLowerCase() === 'win'
|
||||
? 'bg-surface text-fury-cyan'
|
||||
: 'bg-fury-ice text-fury-violet'
|
||||
}`}
|
||||
>
|
||||
{match.result || 'Unknown'}
|
||||
</p>
|
||||
<p className="text-sm">{formatNumber(match.player_count)} players</p>
|
||||
<p className="text-sm">{formatNumber(match.stats?.ground_kills)} ground</p>
|
||||
<p className="text-sm">{formatNumber(match.stats?.air_kills)} air</p>
|
||||
<p className="text-sm">{formatNumber(match.stats?.deaths)} deaths</p>
|
||||
</div>
|
||||
))}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user