Compare commits

..

2 Commits

Author SHA1 Message Date
70a4ece5bc
feat: add numbers to RaceChart 2025-03-03 16:05:28 +01:00
406ea9ffdd
feat: remove unnecessary CORS origins 2025-03-03 16:02:44 +01:00
2 changed files with 4 additions and 6 deletions

View File

@ -18,10 +18,8 @@ from security import (
app = FastAPI(title="cutt") app = FastAPI(title="cutt")
api_router = APIRouter(prefix="/api") api_router = APIRouter(prefix="/api")
origins = [ origins = [
"*", "https://cutt.0124816.xyz",
"http://localhost", "http://localhost:5173",
"http://localhost:3000",
"http://localhost:8000",
] ]
app.add_middleware( app.add_middleware(

View File

@ -64,13 +64,13 @@ const RaceChart: FC<RaceChartProps> = ({ players, std }) => {
paintOrder={"stroke fill"} paintOrder={"stroke fill"}
fontFamily="monospace" fontFamily="monospace"
> >
{player.name} {index + 1}. {player.name}
</text> </text>
<text <text
key={index} key={index}
x={ x={
4 + 4 +
Math.max(...players.map((p, _) => p.name.length)) * (4 + Math.max(...players.map((p, _) => p.name.length))) *
(barHeight - 1.5 * gap) * (barHeight - 1.5 * gap) *
0.66 0.66
} }