mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-07 06:25:19 +02:00
Improve dashboard/account charts and tooltips (#2157)
* Improve net worth hover * Improve graph tooltip * Use locales files for some text on net worth and account charts * Consolidate and simplify trend change between net worth and account charts * Fix test and self-review stuff * Clean up some stuff on the holding sidebar
This commit is contained in:
parent
e6b69c1f5c
commit
341a800b65
10 changed files with 37 additions and 45 deletions
|
@ -1,8 +1,8 @@
|
|||
<%# locals: { trend: } %>
|
||||
<%# locals: { trend:, comparison_label: nil } %>
|
||||
|
||||
<p class="text-sm" style="color: <%= trend.color %>">
|
||||
<% if trend.direction.flat? %>
|
||||
<span>No change</span>
|
||||
<%= t(".no_change") %><%= " #{comparison_label}" if defined?(comparison_label) && comparison_label.present? %>
|
||||
<% else %>
|
||||
<span class="font-mono">
|
||||
<%= trend.value.is_a?(Money) ? format_money(trend.value) : trend.value.round(2) %>
|
||||
|
@ -10,5 +10,8 @@
|
|||
<% unless trend.percent.infinite? %>
|
||||
<span class="font-mono">(<%= lucide_icon(trend.icon, class: "w-4 h-4 align-text-bottom inline") %><%= trend.percent_formatted %>)</span>
|
||||
<% end %>
|
||||
<span class="text-secondary">
|
||||
<%= " #{comparison_label}" if defined?(comparison_label) && comparison_label.present? %>
|
||||
</span>
|
||||
<% end %>
|
||||
</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue