akkounts/app/views/admin/lightning/index.html.erb
Râu Cao 843bcd8cb9
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Remove special link class
This cleans up the code quite a bit, but also allows links in editable
content to be rendered with the default style.
2025-05-29 15:43:28 +04:00

49 lines
1.3 KiB
Plaintext

<%= render HeaderComponent.new(title: "Lightning Network") %>
<%= render MainSimpleComponent.new do %>
<section>
<%= render QuickstatsContainerComponent.new do %>
<%= render QuickstatsItemComponent.new(
type: :number,
title: 'Current user balance',
value: @ln[:current_balance],
unit: 'sats'
) %>
<%= render QuickstatsItemComponent.new(
type: :number,
title: 'Users with sats',
value: @ln[:users_with_sats],
meta: "/ #{User.count}"
) %>
<% end %>
</section>
<section>
<h3>Accounts</h3>
<table class="divided">
<thead>
<tr>
<th>LN Account</th>
<th>User</th>
<th>Balance</th>
</tr>
</thead>
<tbody>
<% @accounts.each do |account| %>
<tr>
<td class="font-mono">
<%= account.login %>
</td>
<td>
<% if user = @users.find{ |u| u[2] == account.login } %>
<%= link_to user[0], admin_user_path(user[0]) %>
<% end %>
</td>
<td><%= number_with_delimiter account.balance.to_i.to_s %></td>
</tr>
<% end %>
</tbody>
</table>
</section>
<% end %>