From 4c7fc2f910ba4b21d379441319e18d44cc60775f Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 18 Feb 2024 02:53:19 +0200 Subject: [PATCH] add user balance / boost address info --- src/Controller/UserController.php | 12 +++++++++--- templates/default/user/list.html.twig | 23 +++++++++++------------ 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index 99ca6fc..f6f6d54 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -99,9 +99,15 @@ class UserController extends AbstractController $list[] = [ - 'name' => $user['key'], - 'total' => $total, - 'rooms' => $rooms, + 'name' => $user['key'], + 'balance' => $client->getBalance( + $user['key'] + ), + 'address' => $client->getAccountAddress( + $user['key'] + ), + 'total' => $total, + 'rooms' => $rooms, ]; } } diff --git a/templates/default/user/list.html.twig b/templates/default/user/list.html.twig index 2dfd6c7..6d96f3c 100644 --- a/templates/default/user/list.html.twig +++ b/templates/default/user/list.html.twig @@ -7,19 +7,18 @@
  • - @{{ user.name }} + @{{ user.name }} / {{ 'balance' | trans }}: {{ user.balance }} / {{ 'boost' | trans }}: {{ user.address }} - {# @TODO #} - {% for namespace, total in user.rooms %} - {{ namespace | keva_namespace_value }} - {{ total }} - {% endfor %} - +
    + {% for namespace, total in user.rooms %} + {{ namespace | keva_namespace_value }} + {{ total }} + {% endfor %}
  • {% endfor %}