mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2026-04-05 12:47:17 +02:00
feat: add hover-intent prefetch for Open Deck button (WEB_PREFETCH=1) (#68)
This commit is contained in:
parent
1f01d8b493
commit
e8b8fab3f8
11 changed files with 138 additions and 5 deletions
|
|
@ -11,7 +11,7 @@ from typing import Any, Dict, List, Optional, Tuple
|
|||
from ..app import templates
|
||||
from ..services.orchestrator import tags_for_commander
|
||||
from ..services.summary_utils import format_theme_label, format_theme_list, summary_ctx
|
||||
from ..app import ENABLE_BUDGET_MODE
|
||||
from ..app import ENABLE_BUDGET_MODE, ENABLE_PREFETCH
|
||||
|
||||
|
||||
router = APIRouter(prefix="/decks")
|
||||
|
|
@ -445,7 +445,10 @@ async def decks_view(request: Request, name: str) -> HTMLResponse:
|
|||
except Exception:
|
||||
pass
|
||||
|
||||
return templates.TemplateResponse("decks/view.html", ctx)
|
||||
resp = templates.TemplateResponse("decks/view.html", ctx)
|
||||
if ENABLE_PREFETCH:
|
||||
resp.headers["Cache-Control"] = "private, max-age=30, must-revalidate"
|
||||
return resp
|
||||
|
||||
|
||||
@router.get("/compare", response_class=HTMLResponse)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue