show fl tokens received and sent

This commit is contained in:
Spine
2025-09-16 04:56:34 +00:00
parent 066eacbb88
commit 181847171a
2 changed files with 15 additions and 1 deletions

View File

@@ -24,7 +24,8 @@ $poolSummary = $bonus->poolHistory();
$paginator = new Util\Paginator(TORRENTS_PER_PAGE, (int)($_GET['page'] ?? 1));
$paginator->setTotal($summary['nr']);
echo $Twig->render('user/bonus-history.twig', [
echo $Twig->render('bonus/history.twig', [
'exchange' => $bonus->tokenExchange(),
'history' => $bonus->history($paginator->limit(), $paginator->offset()),
'item' => $bonus->purchaseHistory(),
'summary' => $summary,

View File

@@ -37,6 +37,19 @@
{% elseif total > 5000000 %} extremely
{% elseif total > 10000000 %} exceptionally
{% endif %} well done!</p>
{% endif %}
{% if exchange.received > 0 or exchange.sent > 0 %}
<p>
{%- if exchange.received > 0 %}
You have received {{ exchange.received|number_format }} token{{ exchange.received|plural }}
{%- if exchange.sent > 0 %} and sent {{
exchange.sent|number_format }} token{{ exchange.sent|plural }}.
{%- else -%}.
{%- endif -%}
{%- else -%}
You have sent {{ exchange.sent|number_format }} token{{ exchange.sent|plural }}.
{%- endif -%}
<p>
{% endif %}
</div>
{% endif %}