mirror of
https://github.com/we-promise/sure.git
synced 2026-06-02 09:19:02 +00:00
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).
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="flex flex-row gap-2 items-baseline">
|
||||
<%= 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 %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@
|
||||
<% if series.any? %>
|
||||
<div
|
||||
id="lineChart"
|
||||
class="w-full h-full"
|
||||
class="w-full h-full privacy-sensitive"
|
||||
data-controller="time-series-chart"
|
||||
data-time-series-chart-data-value="<%= series.to_json %>"></div>
|
||||
<% else %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<div class="rounded-xl bg-container shadow-xs border border-alpha-black-25 p-4">
|
||||
<h4 class="text-secondary text-sm"><%= title %></h4>
|
||||
<p class="text-xl font-medium text-primary">
|
||||
<p class="text-xl font-medium text-primary privacy-sensitive">
|
||||
<%= content %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<div class="col-span-2 text-right">
|
||||
<% 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 @@
|
||||
<div class="col-span-2 text-right">
|
||||
<%# 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" %>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<% if series.any? %>
|
||||
<div
|
||||
id="netWorthChart"
|
||||
class="w-full flex-1 min-h-52"
|
||||
class="w-full flex-1 min-h-52 privacy-sensitive"
|
||||
data-controller="time-series-chart"
|
||||
data-time-series-chart-data-value="<%= series.to_json %>"></div>
|
||||
<% else %>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<div class="flex items-center gap-4">
|
||||
<h3 class="font-medium">
|
||||
<span class="text-2xl text-primary">
|
||||
<span class="text-2xl text-primary privacy-sensitive">
|
||||
<%= format_money entry.amount_money %>
|
||||
</span>
|
||||
|
||||
@@ -48,14 +48,14 @@
|
||||
|
||||
<div class="flex items-center justify-between text-sm">
|
||||
<dt class="text-secondary"><%= t(".purchase_price_label") %></dt>
|
||||
<dd class="text-primary"><%= format_money trade.price_money %></dd>
|
||||
<dd class="text-primary privacy-sensitive"><%= format_money trade.price_money %></dd>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if trade.security.current_price.present? %>
|
||||
<div class="flex items-center justify-between text-sm">
|
||||
<dt class="text-secondary"><%= t(".current_market_price_label") %></dt>
|
||||
<dd class="text-primary"><%= format_money trade.security.current_price %></dd>
|
||||
<dd class="text-primary privacy-sensitive"><%= format_money trade.security.current_price %></dd>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="flex items-start justify-between gap-4">
|
||||
<div>
|
||||
<h3 class="font-medium flex items-center gap-2">
|
||||
<span class="text-2xl text-primary">
|
||||
<span class="text-2xl text-primary privacy-sensitive">
|
||||
<%= format_money @transfer.amount_abs %>
|
||||
</span>
|
||||
<span class="text-lg text-secondary">
|
||||
@@ -35,7 +35,7 @@
|
||||
</dl>
|
||||
<dl class="flex items-center gap-2 justify-between">
|
||||
<dt class="text-secondary">Amount</dt>
|
||||
<dd class="font-medium text-red-500"><%= format_money @transfer.outflow_transaction.entry.amount_money * -1 %></dd>
|
||||
<dd class="font-medium text-red-500 privacy-sensitive"><%= format_money @transfer.outflow_transaction.entry.amount_money * -1 %></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<%= render "shared/ruler", classes: "my-2" %>
|
||||
@@ -53,7 +53,7 @@
|
||||
</dl>
|
||||
<dl class="flex items-center gap-2 justify-between">
|
||||
<dt class="text-secondary">Amount</dt>
|
||||
<dd class="font-medium text-green-500">+<%= format_money @transfer.inflow_transaction.entry.amount_money * -1 %></dd>
|
||||
<dd class="font-medium text-green-500 privacy-sensitive">+<%= format_money @transfer.inflow_transaction.entry.amount_money * -1 %></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<div class="flex items-center gap-4">
|
||||
<h3 class="font-medium">
|
||||
<span class="text-2xl text-primary">
|
||||
<span class="text-2xl text-primary privacy-sensitive">
|
||||
<%= format_money entry.amount_money %>
|
||||
</span>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-span-4 justify-self-end">
|
||||
<%= 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" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user