mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 03:24:09 +00:00
* 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
18 lines
751 B
Plaintext
18 lines
751 B
Plaintext
<%# locals: { trend:, comparison_label: nil } %>
|
|
|
|
<p class="text-sm" style="color: <%= trend.color %>">
|
|
<% if trend.direction.flat? %>
|
|
<%= 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) %>
|
|
</span>
|
|
<% 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>
|