Merge pull request 'fix: refractor card art post-merge fixes — cache bypass, template guards, dev server' (#180) from fix/refractor-card-art-followup into main
All checks were successful
Build Docker Image / build (push) Successful in 8m29s

This commit is contained in:
cal 2026-04-04 17:41:05 +00:00
commit ad5d5561c6
4 changed files with 13 additions and 23 deletions

View File

@ -757,6 +757,7 @@ async def get_batter_card(
f"storage/cards/cardset-{this_player.cardset.id}/{card_type}/{player_id}-{d}-v{variant}.png"
)
and html is False
and tier is None
):
return FileResponse(
path=f"storage/cards/cardset-{this_player.cardset.id}/{card_type}/{player_id}-{d}-v{variant}.png",

View File

@ -55,21 +55,21 @@ python -c "import fastapi, peewee, playwright" 2>/dev/null || {
python -c "
from playwright.sync_api import sync_playwright
p = sync_playwright().start()
b = p.chromium.launch(args=['--no-sandbox'])
b.close()
print(p.chromium.executable_path)
p.stop()
" 2>/dev/null || {
" >/dev/null 2>&1 || {
echo "Playwright Chromium not installed. Run: playwright install chromium"
exit 1
}
# Check dev DB is reachable
DB_HOST="${POSTGRES_HOST_LOCAL:-10.10.0.42}"
python -c "
import socket
s = socket.create_connection(('10.10.0.42', 5432), timeout=3)
import socket, sys
s = socket.create_connection((sys.argv[1], 5432), timeout=3)
s.close()
" 2>/dev/null || {
echo "Cannot reach dev PostgreSQL at 10.10.0.42:5432 — is the homelab up?"
" "$DB_HOST" 2>/dev/null || {
echo "Cannot reach dev PostgreSQL at ${DB_HOST}:5432 — is the homelab up?"
exit 1
}
@ -92,7 +92,7 @@ set +a
# Override DB host to point at the dev server's IP (not Docker network name)
export DATABASE_TYPE=postgresql
export POSTGRES_HOST="${POSTGRES_HOST_LOCAL:-10.10.0.42}"
export POSTGRES_HOST="$DB_HOST"
export POSTGRES_PORT="${POSTGRES_PORT:-5432}"
export POSTGRES_DB="${POSTGRES_DB:-paperdynasty_dev}"
export POSTGRES_USER="${POSTGRES_USER:-sba_admin}"

View File

@ -6,13 +6,13 @@
</head>
<body>
<div id="fullCard" style="width: 1200px; height: 600px;">
{% if refractor_tier is defined and refractor_tier > 0 %}
{%- set diamond_colors = {
1: {'color': '#1a6b1a', 'highlight': '#40b040'},
2: {'color': '#2070b0', 'highlight': '#50a0e8'},
3: {'color': '#a82020', 'highlight': '#e85050'},
4: {'color': '#6b2d8e', 'highlight': '#a060d0'},
} -%}
{% if refractor_tier is defined and refractor_tier > 0 %}
{%- set dc = diamond_colors[refractor_tier] -%}
{%- set filled_bg = 'linear-gradient(135deg, ' ~ dc.highlight ~ ' 0%, ' ~ dc.color ~ ' 50%, ' ~ dc.color ~ ' 100%)' -%}
<div class="tier-diamond{% if refractor_tier == 4 %} diamond-glow{% endif %}">

View File

@ -1,11 +1,11 @@
{% if refractor_tier is defined and refractor_tier > 0 %}
<style>
/* Shared rules for all refractor tiers */
#fullCard {
position: relative;
overflow: hidden;
}
</style>
{% if refractor_tier is defined and refractor_tier > 0 %}
<style>
.tier-diamond {
position: absolute;
left: 597px;
@ -68,9 +68,6 @@
border-bottom-color: #7a9cc4;
border-bottom-width: 4px;
}
#resultHeader.border-bot {
border-bottom-width: 4px;
}
#resultHeader .border-right-thick {
border-right-width: 6px;
}
@ -216,12 +213,4 @@
{% endif %}
</style>
{% else %}
<style>
/* T0 Standard — no tier overrides */
#fullCard {
position: relative;
overflow: hidden;
}
</style>
{% endif %}