Few usability improvements - TX confirmations, fix TX inputs on mobile view
This commit is contained in:
parent
0016657a1e
commit
4dbea96a35
|
@ -74,4 +74,8 @@ defmodule ZcashExplorerWeb.PageController do
|
|||
def mempool(conn, _params) do
|
||||
render(conn, "mempool.html", page_title: "Zcash Mempool")
|
||||
end
|
||||
|
||||
def nodes(conn, _params) do
|
||||
render(conn, "nodes.html", page_title: "Zcash Nodes")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ defmodule ZcashExplorerWeb.RawMempoolLive do
|
|||
|
||||
def render(assigns) do
|
||||
~L"""
|
||||
<div class="shadow overflow-hidden border-b border-gray-200 rounded-lg overflow-x-auto">
|
||||
<div class="shadow overflow-hidden border-b border-gray-200 rounded-lg overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200">
|
||||
<thead class="bg-white-500">
|
||||
<tr>
|
||||
|
@ -12,7 +12,6 @@ defmodule ZcashExplorerWeb.RawMempoolLive do
|
|||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-midnight-500 uppercase tracking-wider">Time</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-midnight-500 uppercase tracking-wider">Fee</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-midnight-500 uppercase tracking-wider">Size</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-midnight-500 uppercase tracking-wider">Currentpriority</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="bg-white-500 divide-y divide-gray-200">
|
||||
|
@ -35,9 +34,6 @@ defmodule ZcashExplorerWeb.RawMempoolLive do
|
|||
<td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-500 hover:text-gray-600">
|
||||
<%= tx["info"]["size"] %>
|
||||
</td>
|
||||
<td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-500 hover:text-gray-600">
|
||||
<%= tx["info"]["currentpriority"] %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
|
|
@ -38,6 +38,7 @@ defmodule ZcashExplorerWeb.Router do
|
|||
get "/search", SearchController, :search
|
||||
get "/blocks", BlockController, :index
|
||||
get "/mempool", PageController, :mempool
|
||||
get "/nodes", PageController, :nodes
|
||||
end
|
||||
|
||||
# Other scopes may use custom stacks.
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
<div class="flex items-center px-2 lg:px-0 xl:w-64">
|
||||
<a href="/">
|
||||
<div class="flex-shrink-0">
|
||||
<img class="h-8 w-auto" src="<%= Routes.static_path(@conn, "/images/zcash-icon-white.svg") %>" alt="Zcash Explorer">
|
||||
<img class="h-8 w-auto" src="<%= Routes.static_path(@conn, "/images/zcash-icon-white.svg") %>" alt="Block Explorer">
|
||||
</div>
|
||||
</a>
|
||||
<a href="/">
|
||||
<div class="flex-shrink-0 px-1 text-white">
|
||||
Zcash Explorer
|
||||
Block Explorer
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<main class="py-4">
|
||||
<div class="grid grid-cols-1 mx-8">
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-500 py-2">
|
||||
Zcash Nodes
|
||||
</h3>
|
||||
<%= live_render(@conn, ZcashExplorerWeb.RawMempoolLive) %>
|
||||
</div>
|
||||
</main>
|
|
@ -11,27 +11,13 @@
|
|||
</div>
|
||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-3">
|
||||
<div class="sm:col-span-2">
|
||||
<dt class="text-sm font-medium text-gray-500">
|
||||
Hash (txid)
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 break-words">
|
||||
<%= @tx.txid %>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">
|
||||
Time (UTC)
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">
|
||||
<%= ZcashExplorerWeb.BlockView.mined_time(@tx.time) %>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">
|
||||
Confirmations
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">
|
||||
<dd class="mt-1 text-xl font-black text-gray-900">
|
||||
<%= if @tx.confirmations == nil do %>
|
||||
0
|
||||
<% else %>
|
||||
|
@ -40,6 +26,16 @@
|
|||
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">
|
||||
Time (UTC)
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">
|
||||
<%= ZcashExplorerWeb.BlockView.mined_time(@tx.time) %>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">
|
||||
|
@ -106,7 +102,7 @@
|
|||
</div>
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">
|
||||
size
|
||||
Size (bytes)
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">
|
||||
<%= @tx.size %>
|
||||
|
@ -149,7 +145,7 @@ Inputs (<%= vin_count(@tx.vin) %>)
|
|||
<li class="pl-3 pr-4 py-3 flex items-center justify-between text-sm">
|
||||
<div class="w-0 flex-1 flex items-center">
|
||||
<a href='/address/<%= input.address %>'>
|
||||
<span class="ml-2 flex-1 w-0 truncate break-all">
|
||||
<span class="flex-1 w-0 break-all">
|
||||
<%= input.address %>
|
||||
</span>
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue