From 2022ca9d319d5d233f987b2e54cd0e164ff18e2d Mon Sep 17 00:00:00 2001 From: Aki Wu Date: Sun, 7 Apr 2024 22:00:47 +0800 Subject: [PATCH] fix ui --- .../stylesheets/application.tailwind.css | 18 ++++++++++++++++-- app/models/message.rb | 2 +- app/views/layouts/application.html.erb | 2 +- app/views/messages/_message.html.erb | 10 ++++++---- app/views/messages/_show_message.html.erb | 2 +- app/views/messages/index.html.erb | 2 +- 6 files changed, 26 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index 2fef6da..a805d8a 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -6,8 +6,22 @@ html, body { /* background-color: rgb(252, 251, 248); */ } -table, dd { - font-family: "Ubuntu Mono", monospace; +dd { + font-family: "Noto Sans Mono", monospace; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; + font-variation-settings: + "wdth" 100; +} + +.mono { + font-family: "Noto Sans Mono", monospace; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; + font-variation-settings: + "wdth" 100; } .pagination a { diff --git a/app/models/message.rb b/app/models/message.rb index 0e4e963..f22b2f0 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -35,7 +35,7 @@ class Message < ApplicationRecord def status_label if status == 'accepted' - 'Accepted' + 'Pending' elsif status == 'root_ready' 'Root Ready' elsif status == 'dispatch_success' diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 821e855..0c69f67 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -7,7 +7,7 @@ <%= csp_meta_tag %> - + <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %> diff --git a/app/views/messages/_message.html.erb b/app/views/messages/_message.html.erb index f5ed201..4e59203 100644 --- a/app/views/messages/_message.html.erb +++ b/app/views/messages/_message.html.erb @@ -1,18 +1,20 @@ - <%= link_to short(message.msg_hash), message_by_tx_or_hash_path(message.msg_hash), class: 'underline' %> + <%= link_to short(message.msg_hash), message_by_tx_or_hash_path(message.msg_hash), class: 'underline' %> -
+
<%= link_to message.status_label, "#{request.path}?status=#{message.status}" %>
<%= link_to message.from_network.name, network_messages_path(message.from_network.name), class: 'underline' %> > <%= link_to message.to_network.name, network_messages_path('_', message.to_network.name), class: 'underline' %> - <%= address_link_short(message.from_network, message.from) %> - <%= address_link_short(message.to_network, message.to) %> + <%= address_link_short(message.from_network, message.from) %> + <%= address_link_short(message.to_network, message.to) %> <%= time_ago_in_words(message.block_timestamp) %> ago <% if message.dispatch_block_timestamp %> <%= time_consumption(message) %> + <% else %> + - <% end %> <%= link_to "MORE", message_by_tx_or_hash_path(message.msg_hash), class: "underline" %> diff --git a/app/views/messages/_show_message.html.erb b/app/views/messages/_show_message.html.erb index 068ad21..aea5524 100644 --- a/app/views/messages/_show_message.html.erb +++ b/app/views/messages/_show_message.html.erb @@ -6,7 +6,7 @@
Direction
<%= link_to message.from_network.name, network_messages_path(message.from_network.name), class: 'underline' %> - -> + > <%= link_to message.to_network.name, network_messages_path('_', message.to_network.name), class: 'underline' %>
diff --git a/app/views/messages/index.html.erb b/app/views/messages/index.html.erb index 48dee93..27cbec5 100644 --- a/app/views/messages/index.html.erb +++ b/app/views/messages/index.html.erb @@ -6,7 +6,7 @@
- +
Hash