From b6b093c57840bf554ccd3a4db0fc7957a9a7acb5 Mon Sep 17 00:00:00 2001 From: sokiee Date: Sun, 22 Mar 2026 10:57:56 +0100 Subject: [PATCH] Extend privacy headers Extend privacy mode coverage to remaining financial views Transfers, trades, valuations, and holdings detail views were missing the privacy-sensitive class, leaving amounts visible when privacy mode was enabled. Also adds blur to the summary card partial (used by credit cards, loans, etc.), account chart balances, and time series chart containers (dashboard net worth and per-account charts). --- app/components/UI/account/chart.html.erb | 6 +++--- app/views/accounts/_summary_card.html.erb | 2 +- app/views/holdings/_holding.html.erb | 6 +++--- app/views/pages/dashboard/_net_worth_chart.html.erb | 2 +- app/views/trades/_header.html.erb | 6 +++--- app/views/transfers/show.html.erb | 6 +++--- app/views/valuations/_header.html.erb | 2 +- app/views/valuations/_valuation.html.erb | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/components/UI/account/chart.html.erb b/app/components/UI/account/chart.html.erb index ff54a5789..ac935938d 100644 --- a/app/components/UI/account/chart.html.erb +++ b/app/components/UI/account/chart.html.erb @@ -9,10 +9,10 @@ <% end %>
- <%= tag.p view_balance_money.format, class: "text-primary text-3xl font-medium truncate" %> + <%= tag.p view_balance_money.format, class: "text-primary text-3xl font-medium truncate privacy-sensitive" %> <% if converted_balance_money %> - <%= tag.p converted_balance_money.format, class: "text-sm font-medium text-secondary" %> + <%= tag.p converted_balance_money.format, class: "text-sm font-medium text-secondary privacy-sensitive" %> <% end %>
@@ -45,7 +45,7 @@ <% if series.any? %>
<% else %> diff --git a/app/views/accounts/_summary_card.html.erb b/app/views/accounts/_summary_card.html.erb index fe327728e..b711c1cd9 100644 --- a/app/views/accounts/_summary_card.html.erb +++ b/app/views/accounts/_summary_card.html.erb @@ -2,7 +2,7 @@

<%= title %>

-

+

<%= content %>

diff --git a/app/views/holdings/_holding.html.erb b/app/views/holdings/_holding.html.erb index 164acfc1e..c0ba88e64 100644 --- a/app/views/holdings/_holding.html.erb +++ b/app/views/holdings/_holding.html.erb @@ -37,7 +37,7 @@
<% if holding.amount_money %> - <%= tag.p format_money holding.amount_money %> + <%= tag.p format_money(holding.amount_money), class: "privacy-sensitive" %> <% else %> <%= tag.p "--", class: "text-secondary" %> <% end %> @@ -47,8 +47,8 @@
<%# Show Total Return (unrealized G/L) when cost basis exists (from trades or manual) %> <% if holding.trend %> - <%= tag.p format_money(holding.trend.value), style: "color: #{holding.trend.color};" %> - <%= tag.p "(#{holding.trend.percent_formatted})", style: "color: #{holding.trend.color};" %> + <%= tag.p format_money(holding.trend.value), class: "privacy-sensitive", style: "color: #{holding.trend.color};" %> + <%= tag.p "(#{holding.trend.percent_formatted})", class: "privacy-sensitive", style: "color: #{holding.trend.color};" %> <% else %> <%= tag.p "--", class: "text-secondary" %> <%= tag.p t(".no_cost_basis"), class: "text-xs text-secondary" %> diff --git a/app/views/pages/dashboard/_net_worth_chart.html.erb b/app/views/pages/dashboard/_net_worth_chart.html.erb index 08e284ae5..1a5f81d68 100644 --- a/app/views/pages/dashboard/_net_worth_chart.html.erb +++ b/app/views/pages/dashboard/_net_worth_chart.html.erb @@ -26,7 +26,7 @@ <% if series.any? %>
<% else %> diff --git a/app/views/trades/_header.html.erb b/app/views/trades/_header.html.erb index 68976a392..3cd66872e 100644 --- a/app/views/trades/_header.html.erb +++ b/app/views/trades/_header.html.erb @@ -8,7 +8,7 @@

- + <%= format_money entry.amount_money %> @@ -48,14 +48,14 @@
<%= t(".purchase_price_label") %>
-
<%= format_money trade.price_money %>
+
<%= format_money trade.price_money %>
<% end %> <% if trade.security.current_price.present? %>
<%= t(".current_market_price_label") %>
-
<%= format_money trade.security.current_price %>
+
<%= format_money trade.security.current_price %>
<% end %> diff --git a/app/views/transfers/show.html.erb b/app/views/transfers/show.html.erb index 5a369a2c6..792899bbb 100644 --- a/app/views/transfers/show.html.erb +++ b/app/views/transfers/show.html.erb @@ -3,7 +3,7 @@

- + <%= format_money @transfer.amount_abs %> @@ -35,7 +35,7 @@
Amount
-
<%= format_money @transfer.outflow_transaction.entry.amount_money * -1 %>
+
<%= format_money @transfer.outflow_transaction.entry.amount_money * -1 %>

<%= render "shared/ruler", classes: "my-2" %> @@ -53,7 +53,7 @@
Amount
-
+<%= format_money @transfer.inflow_transaction.entry.amount_money * -1 %>
+
+<%= format_money @transfer.inflow_transaction.entry.amount_money * -1 %>

diff --git a/app/views/valuations/_header.html.erb b/app/views/valuations/_header.html.erb index e00959ef4..2db8c8739 100644 --- a/app/views/valuations/_header.html.erb +++ b/app/views/valuations/_header.html.erb @@ -7,7 +7,7 @@

- + <%= format_money entry.amount_money %> diff --git a/app/views/valuations/_valuation.html.erb b/app/views/valuations/_valuation.html.erb index 201628ff1..46ca62eda 100644 --- a/app/views/valuations/_valuation.html.erb +++ b/app/views/valuations/_valuation.html.erb @@ -26,7 +26,7 @@

- <%= tag.p format_money(entry.amount_money), class: "font-bold text-sm text-primary" %> + <%= tag.p format_money(entry.amount_money), class: "font-bold text-sm text-primary privacy-sensitive" %>
<% end %>