Private
Public Access
1
0

chg: dev: remove the wrongly implemented font installation in docker - & replace it with static font on BattleCardGenerator (it solves the shareable image problem on bare-metal too) #8

This commit is contained in:
2026-04-21 14:18:59 +02:00
parent 8935216525
commit 085e010907
7 changed files with 66 additions and 21 deletions

Binary file not shown.

View File

@@ -12,7 +12,9 @@ import { array } from 'prop-types';
import { formatDuration } from '@global-utils/format';
import Dialog from '@mui/material/Dialog';
import { createTheme, styled, ThemeProvider } from '@mui/material/styles';
import { Avatar, BonusPoints, StatRow } from '@global-components';
import { Avatar } from './battle-dialog/Avatar';
import { BonusPoints } from './battle-dialog/BonusPoints';
import { StatRow } from './battle-dialog/StatRow';
const darkTheme = createTheme({ palette: { mode: 'dark' } });
@@ -69,11 +71,11 @@ export const BattleDialog = ({ games }) => {
const endReason = resign
? `${resign.charAt(0).toUpperCase() + resign.slice(1)} resigned`
: 26 <= maxPoints ? 'Points' : 'Abandoned';
const canShare = !canContinue;
const bothRegistered = game.bothRegistered;
const canContinue = bothRegistered && !resign && 26 > maxPoints;
const playUrl = `${window.location.origin}/play/${game.uuid}`;
const shareUrl = `${window.location.origin}/battle/${game.uuid}`;
const canContinue = bothRegistered && !resign && 26 > maxPoints;
const canShare = !canContinue;
const playUrl = `${window.location.origin}/play/${game.uuid}`;
const duration = formatDuration(game.created, game.date);
const pointDiff = Math.abs((game.redPoints ?? 0) - (game.bluePoints ?? 0));