|
4 | 4 | Batch Details |
5 | 5 | </.card_preheding> |
6 | 6 | <.card |
7 | | - class="px-4 py-5 min-h-fit flex flex-col" |
| 7 | + class="relative px-4 py-5 min-h-fit flex flex-col" |
8 | 8 | inner_class="font-semibold inline-flex flex-col text-base gap-y-2 text-muted-foreground [&>p]:text-foreground [&>a]:text-foreground [&>*]:break-all [&>*]:font-normal" |
9 | 9 | > |
10 | | - Merkle Root Hash: |
| 10 | + Batch Hash: |
11 | 11 | <p><%= @merkle_root %></p> |
| 12 | + Status: <.dynamic_badge class="w-fit" status={@current_batch.is_verified} /> |
12 | 13 | Amount of Proofs in this Batch: |
13 | 14 | <p><%= @current_batch.amount_of_proofs %></p> |
14 | 15 | <%= if @current_batch.cost_per_proof != nil do %> |
15 | 16 | Cost per Proof: |
16 | 17 | <p> |
17 | 18 | <%= @current_batch.cost_per_proof |> EthConverter.wei_to_eth() %> ETH |
18 | 19 | <%= if @eth_usd_price != :empty and @eth_usd_price != "0.00000" do %> |
19 | | - (<%= @eth_usd_price %> USD) |
| 20 | + <span class="inline-flex md:inline-block">(<%= @eth_usd_price %> USD)</span> |
20 | 21 | <% end %> |
21 | 22 | </p> |
22 | 23 | <% end %> |
23 | | - Submission Block Number: |
| 24 | + Proofs in this batch: |
| 25 | + <%= if @proof_hashes != :empty do %> |
| 26 | + <%= if @proof_hashes == :nil do %> |
| 27 | + <p class="normal-case"> |
| 28 | + Proofs couldn't be shown for this Batch |
| 29 | + </p> |
| 30 | + <% else %> |
| 31 | + <div class="h-36 overflow-y-auto text-foreground space-y-2"> |
| 32 | + <p :for={proof <- @proof_hashes}><%= proof %></p> |
| 33 | + </div> |
| 34 | + <.button class="w-fit text-foreground" phx-click="hide_proofs"> |
| 35 | + <.icon name="hero-eye-slash" class="size-4" /> Hide Proofs |
| 36 | + </.button> |
| 37 | + <% end %> |
| 38 | + <% else %> |
| 39 | + <.button class="w-fit text-foreground font-semibold" phx-click="show_proofs"> |
| 40 | + <.icon name="hero-eye" class="size-4" /> Show Proofs |
| 41 | + </.button> |
| 42 | + <% end %> |
| 43 | + <.divider /> Submission Block Number: |
24 | 44 | <.a |
25 | 45 | target="_blank" |
26 | 46 | rel="noopener" |
|
44 | 64 | <p> |
45 | 65 | <%= @current_batch.submission_timestamp |> Utils.parse_timestamp() %> |
46 | 66 | </p> |
47 | | - Status: <.dynamic_badge class="w-fit" status={@current_batch.is_verified} /> |
48 | 67 | <%= if @current_batch.is_verified do %> |
49 | | - Response Block Number: |
| 68 | + <.divider /> Response Block Number: |
50 | 69 | <.a |
51 | 70 | target="_blank" |
52 | 71 | rel="noopener" |
|
68 | 87 | <p> |
69 | 88 | <%= @current_batch.response_timestamp |> Utils.parse_timestamp() %> |
70 | 89 | </p> |
71 | | - Share: |
72 | 90 | <%!-- |
73 | 91 | %20 represents a space |
74 | 92 | %23 represents the hash symbol (#) |
75 | 93 | %0A represents a line feed (LF) or Unix-style newline |
76 | 94 | --%> |
77 | 95 | <.live_component |
| 96 | + class="absolute top-4 md:-top-12 right-5" |
78 | 97 | id={"tweet_#{@merkle_root}"} |
79 | 98 | module={TweetComponent} |
80 | 99 | text={"Just%20submitted%20a%20proof%20via%20@alignedlayer%0AI%20am%20now%20%23aligned%20✅%0A#{@site_url}/batches/#{@merkle_root}"} |
81 | 100 | /> |
82 | 101 | <% end %> |
83 | | - Proofs in this batch: |
84 | | - <%= if @proof_hashes != :empty do %> |
85 | | - <%= if @proof_hashes == :nil do %> |
86 | | - <p class="normal-case"> |
87 | | - Proofs couldn't be shown for this Batch |
88 | | - </p> |
89 | | - <% else %> |
90 | | - <div class="h-32 overflow-y-auto text-foreground space-y-2"> |
91 | | - <p :for={proof <- @proof_hashes}><%= proof %></p> |
92 | | - <.button class="w-fit text-foreground" phx-click="hide_proofs"> |
93 | | - <.icon name="hero-eye-slash" class="size-4" /> Hide Proofs |
94 | | - </.button> |
95 | | - </div> |
96 | | - <% end %> |
97 | | - <% else %> |
98 | | - <.button class="w-fit text-foreground font-semibold" phx-click="show_proofs"> |
99 | | - <.icon name="hero-eye" class="size-4" /> Show Proofs |
100 | | - </.button> |
101 | | - <% end %> |
102 | 102 | </.card> |
103 | 103 | <% else %> |
104 | 104 | <div class="flex flex-col space-y-6 justify-center grow relative text-center md:pt-14"> |
|
0 commit comments