This cleans up the code quite a bit, but also allows links in editable content to be rendered with the default style.
49 lines
1.3 KiB
Plaintext
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 %>
|