mirror of
https://github.com/we-promise/sure.git
synced 2026-08-12 11:10:20 +00:00
Merge pull request #1055 from ChakibMoMi/feature/privacy-mode
Add privacy mode to blur financial data across the app
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user