Files
plm-lottery/apps/web/templates/web/app_home.html
T
davideandClaude Sonnet 5.5 42e5e33371 A7: player area - play, wallet, movements (WEB-03, WEB-05, WEB-20..27)
Gioca: the round, the player's funds and their bet; the bet is two steps
(a confirmation screen that sends nothing, then an explicit confirm) with a
fresh idempotency key per screen, and the server re-checks everything.
Portafoglio: spendable apart from in-confirmation, deposit address with a QR
of the player's own address, copy button, simulated test deposits.
Movimenti: the player's own ledger, paged, stacked as cards on a phone.
GET /app/stato/ feeds the page and its polling. Every view takes the user from
the session only. Checked end to end in a real browser (Playwright): status
moves from pending to confirmed without a reload, a double click is one bet.
Mutation checks: cross-account leak, non-idempotent POST and unrestricted
test-deposit amounts are all caught.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 14:41:27 +01:00

30 lines
1.5 KiB
HTML

{% extends "web/base.html" %}
{% load static %}
{% block title %}Gioca · PLM Lottery{% endblock %}
{% block head %}<script src="{% static 'web/home.js' %}" defer></script>{% endblock %}
{% block content %}
<h1>Gioca</h1>
{% include "web/_round_card.html" with poll_url=poll_url show_participate=False %}
<section class="card" aria-labelledby="your-bet">
<h2 id="your-bet">La tua puntata</h2>
<dl class="stats">
<div><dt>Saldo spendibile</dt><dd data-me="spendable_text">{{ me.spendable_text }}</dd></div>
<div data-me="incoming-line"{% if not me.incoming_sats %} hidden{% endif %}><dt>In conferma</dt><dd data-me="incoming_text">{{ me.incoming_text }}</dd></div>
</dl>
<div data-me="participation-box" class="status-box"{% if not me.participation %} hidden{% endif %}>
<p class="badge" data-me="participation_label" data-status="{{ me.participation.status }}">{{ me.participation.label }}</p>
<p data-me="participation_message">{{ me.participation.message }}</p>
</div>
<p class="actions" data-me="bet-form"{% if not me.can_bet %} hidden{% endif %}>
<a class="button big" href="{% url 'web:bet' %}">Punta {{ s.bet_amount_text }}</a>
</p>
<p class="hint" data-me="bet_blocker"{% if not me.bet_blocker %} hidden{% endif %}>{{ me.bet_blocker }}</p>
{% if not me.can_bet and not me.participation and not me.bet_blocker %}<p class="hint" data-me="idle"></p>{% endif %}
<p class="result" data-me="last_result"{% if not me.last_result %} hidden{% endif %}>{{ me.last_result }}</p>
</section>
{% endblock %}