Browse Source

add user balance / boost address info

main
ghost 4 months ago
parent
commit
4c7fc2f910
  1. 12
      src/Controller/UserController.php
  2. 23
      templates/default/user/list.html.twig

12
src/Controller/UserController.php

@ -99,9 +99,15 @@ class UserController extends AbstractController
$list[] = $list[] =
[ [
'name' => $user['key'], 'name' => $user['key'],
'total' => $total, 'balance' => $client->getBalance(
'rooms' => $rooms, $user['key']
),
'address' => $client->getAccountAddress(
$user['key']
),
'total' => $total,
'rooms' => $rooms,
]; ];
} }
} }

23
templates/default/user/list.html.twig

@ -7,19 +7,18 @@
<li> <li>
<div> <div>
<strong> <strong>
@{{ user.name }} @{{ user.name }} / {{ 'balance' | trans }}: {{ user.balance }} / {{ 'boost' | trans }}: {{ user.address }}
</strong> </strong>
<span style="float:right">{# @TODO #} <br />
{% for namespace, total in user.rooms %} {% for namespace, total in user.rooms %}
<a href="{{ <a href="{{
path('room_namespace', path('room_namespace',
{ {
mode : request.get('mode'), mode : request.get('mode'),
namespace : namespace, _fragment : 'latest' namespace : namespace, _fragment : 'latest'
}) }}">{{ namespace | keva_namespace_value }}</a> }) }}">{{ namespace | keva_namespace_value }}</a>
{{ total }} {{ total }}
{% endfor %} {% endfor %}
</span>
</div> </div>
</li> </li>
{% endfor %} {% endfor %}

Loading…
Cancel
Save