chore:/update fallback port
This commit is contained in:
@@ -6,7 +6,7 @@ module.exports = {
|
|||||||
cwd: __dirname,
|
cwd: __dirname,
|
||||||
env: {
|
env: {
|
||||||
NODE_ENV: 'production',
|
NODE_ENV: 'production',
|
||||||
PORT: process.env.PORT || 3001,
|
PORT: process.env.PORT || 3010,
|
||||||
API_UPSTREAM: process.env.API_UPSTREAM || 'http://127.0.0.1:6000',
|
API_UPSTREAM: process.env.API_UPSTREAM || 'http://127.0.0.1:6000',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
|
|
||||||
PORT=3001
|
PORT=3010
|
||||||
API_UPSTREAM=http://127.0.0.1:6000
|
API_UPSTREAM=http://127.0.0.1:6000
|
||||||
|
|
||||||
WEBHOOK_PORT=3011
|
WEBHOOK_PORT=3011
|
||||||
|
|||||||
+38
-24
@@ -125,6 +125,11 @@ function App() {
|
|||||||
history: { status: 'idle', data: null, error: null },
|
history: { status: 'idle', data: null, error: null },
|
||||||
games: { 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) {
|
function navigate(path) {
|
||||||
window.history.pushState({}, '', path)
|
window.history.pushState({}, '', path)
|
||||||
@@ -342,11 +347,6 @@ function App() {
|
|||||||
}
|
}
|
||||||
}, [route.page, route.teamName])
|
}, [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 topTeamName = bestTeamName(teams[0])
|
||||||
const searchPlaceholder =
|
const searchPlaceholder =
|
||||||
searchHint.status === 'ready' ? `Found ${searchHint.name}` : topTeamName || 'Search teams'
|
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">
|
<h3 className="truncate text-lg font-semibold">
|
||||||
{match.map_name || 'Unknown map'}
|
{match.map_name || 'Unknown map'}
|
||||||
</h3>
|
</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>
|
</div>
|
||||||
<span className="shrink-0 rounded-md bg-surface px-2 py-1 text-xs font-semibold text-text-soft">
|
<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>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-4 grid grid-cols-[1fr_auto_1fr] items-center gap-3 text-sm">
|
<div className="mt-4 grid grid-cols-[1fr_auto] items-center gap-3 text-sm">
|
||||||
<p className="truncate text-right font-semibold text-fury-cyan">
|
<p className="truncate font-semibold text-fury-cyan">
|
||||||
{match.winning_tag || match.winning_squadron || 'Winner'}
|
{match.team_name || 'TSS team'}
|
||||||
</p>
|
</p>
|
||||||
<span className="text-xs font-semibold uppercase text-text-muted">vs</span>
|
<p className="text-text-soft">
|
||||||
<p className="truncate font-semibold text-fury-violet">
|
{formatNumber(match.player_count)} players
|
||||||
{match.losing_tag || match.losing_squadron || 'Loser'}
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</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>
|
</article>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
@@ -924,23 +928,33 @@ function BattleLogsPage({ live, matches }) {
|
|||||||
<div className="overflow-hidden rounded-lg border border-border bg-fury-white shadow-sm">
|
<div className="overflow-hidden rounded-lg border border-border bg-fury-white shadow-sm">
|
||||||
{matches.map((match) => (
|
{matches.map((match) => (
|
||||||
<div
|
<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}
|
key={match.session_id}
|
||||||
>
|
>
|
||||||
<div className="min-w-0">
|
<div className="min-w-0">
|
||||||
<p className="truncate font-semibold">{match.map_name || 'Unknown map'}</p>
|
<p className="truncate font-semibold">{match.map_name || 'Unknown map'}</p>
|
||||||
<p className="text-xs text-text-soft">{formatDate(match.endtime_unix)}</p>
|
<p className="text-xs text-text-soft">
|
||||||
</div>
|
{formatDate(match.timestamp)} · {match.session_id}
|
||||||
<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>
|
</p>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user