Merge pull request #1055 from ChakibMoMi/feature/privacy-mode

Add privacy mode to blur financial data across the app
This commit is contained in:
soky srm
2026-03-22 11:06:03 +01:00
committed by GitHub
59 changed files with 237 additions and 136 deletions
+2 -2
View File
@@ -13,7 +13,7 @@
} do |form| %>
<div class="space-y-3">
<div>
<div class="flex flex-col items-center justify-center w-full py-8 border border-secondary border-dashed rounded-xl cursor-pointer bg-surface-inset hover:bg-surface-inset-hover transition-colors text-center px-4"
<div class="flex flex-col items-center justify-center w-full py-8 border border-secondary border-dashed rounded-xl cursor-pointer bg-surface-inset hover:bg-surface-inset-hover transition-colors text-center px-4"
data-action="click->attachment-upload#triggerFileInput">
<div data-attachment-upload-target="uploadText" class="flex flex-col items-center">
@@ -28,7 +28,7 @@
<%= form.file_field :attachments,
multiple: true,
accept: Transaction::ALLOWED_CONTENT_TYPES.join(','),
accept: Transaction::ALLOWED_CONTENT_TYPES.join(","),
class: "hidden",
data: {
attachment_upload_target: "fileInput",
+1 -1
View File
@@ -2,7 +2,7 @@
<div class="flex items-start justify-between gap-4" id="<%= dom_id(entry, :header) %>">
<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 -entry.amount_money %>
</span>
<span class="text-lg text-secondary">
+3 -3
View File
@@ -2,17 +2,17 @@
<div class="grid grid-cols-1 md:grid-cols-3 bg-container rounded-xl shadow-border-xs md:divide-x divide-y md:divide-y-0 divide-alpha-black-100 theme-dark:divide-alpha-white-200">
<div class="p-4 space-y-2">
<p class="text-sm text-secondary">Total transactions</p>
<p class="text-primary font-medium text-xl" id="total-transactions"><%= totals.count.round(0) %></p>
<p class="text-primary font-medium text-xl privacy-sensitive" id="total-transactions"><%= totals.count.round(0) %></p>
</div>
<div class="p-4 space-y-2">
<p class="text-sm text-secondary">Income</p>
<p class="text-primary font-medium text-xl" id="total-income">
<p class="text-primary font-medium text-xl privacy-sensitive" id="total-income">
<%= totals.income_money.format %>
</p>
</div>
<div class="p-4 space-y-2">
<p class="text-sm text-secondary">Expenses</p>
<p class="text-primary font-medium text-xl" id="total-expense">
<p class="text-primary font-medium text-xl privacy-sensitive" id="total-expense">
<%= totals.expense_money.format %>
</p>
</div>
+1 -1
View File
@@ -170,7 +170,7 @@
<% end %>
<%= content_tag :p,
transaction.transfer? && view_ctx == "global" ? "+/- #{format_money(entry.amount_money.abs)}" : format_money(-entry.amount_money),
class: ["text-green-600": entry.amount.negative?] %>
class: ["privacy-sensitive", "text-green-600": entry.amount.negative?] %>
</div>
</div>
<% end %>
@@ -20,7 +20,7 @@
<span class="border text-sm font-medium px-3 py-1 rounded-full inline-flex items-center gap-2"
style="
background-color: color-mix(in oklab, <%= tag_color %> 10%, transparent);
border-color: color-mix(in oklab, <%= tag_color%> 20%, transparent);
border-color: color-mix(in oklab, <%= tag_color %> 20%, transparent);
color: <%= tag_color %>;">
<span class="size-1.5 rounded-full" style="background-color: <%= tag_color %>;"></span>
<%= tag.name %>