diff --git a/app/assets/tailwind/application.css b/app/assets/tailwind/application.css index 583b228a0..36b65b467 100644 --- a/app/assets/tailwind/application.css +++ b/app/assets/tailwind/application.css @@ -13,6 +13,7 @@ @import "./google-sign-in.css"; @import "./date-picker-dark-mode.css"; @import "./print-report.css"; +@import "./privacy-mode.css"; @layer components { .pcr-app{ diff --git a/app/assets/tailwind/privacy-mode.css b/app/assets/tailwind/privacy-mode.css new file mode 100644 index 000000000..3702b1525 --- /dev/null +++ b/app/assets/tailwind/privacy-mode.css @@ -0,0 +1,14 @@ +/* Privacy Mode - blurs financial numbers when activated */ +html.privacy-mode .privacy-sensitive { + filter: blur(8px); + user-select: none; + transition: filter 0.2s ease; +} + +html.privacy-mode .privacy-sensitive:hover { + filter: blur(4px); +} + +html:not(.privacy-mode) .privacy-sensitive { + transition: filter 0.2s ease; +} \ No newline at end of file diff --git a/app/javascript/controllers/privacy_mode_controller.js b/app/javascript/controllers/privacy_mode_controller.js new file mode 100644 index 000000000..a2358b064 --- /dev/null +++ b/app/javascript/controllers/privacy_mode_controller.js @@ -0,0 +1,32 @@ +import { Controller } from "@hotwired/stimulus" + +// Privacy Mode Controller +// Toggles visibility of financial numbers across the page. +// Elements with class "privacy-sensitive" will be blurred when active. +// State persists in localStorage so it survives page navigations. +export default class extends Controller { + static targets = ["toggle"] + + connect() { + this.active = localStorage.getItem("privacyMode") === "true" + this._apply() + } + + toggle() { + this.active = !this.active + localStorage.setItem("privacyMode", this.active.toString()) + this._apply() + } + + _apply() { + if (this.active) { + document.documentElement.classList.add("privacy-mode") + } else { + document.documentElement.classList.remove("privacy-mode") + } + + this.toggleTargets.forEach((el) => { + el.setAttribute("aria-pressed", this.active.toString()) + }) + } +} \ No newline at end of file diff --git a/app/views/accounts/_account.html.erb b/app/views/accounts/_account.html.erb index c9eadeb86..40f0e0927 100644 --- a/app/views/accounts/_account.html.erb +++ b/app/views/accounts/_account.html.erb @@ -56,7 +56,7 @@ <% elsif account.syncing? %>
<% else %> -

"> +

"> <%= format_money account.balance_money %>

<% end %> diff --git a/app/views/accounts/_accountable_group.html.erb b/app/views/accounts/_accountable_group.html.erb index 934f2bb3e..2ccea54a1 100644 --- a/app/views/accounts/_accountable_group.html.erb +++ b/app/views/accounts/_accountable_group.html.erb @@ -12,7 +12,7 @@
- <%= tag.p format_money(account_group.total_money), class: "text-sm font-medium text-primary" %> + <%= tag.p format_money(account_group.total_money), class: "text-sm font-medium text-primary privacy-sensitive" %> <%= turbo_frame_tag "#{account_group.key}_sparkline", src: accountable_sparkline_path(account_group.key), loading: "lazy", data: { controller: "turbo-frame-timeout", turbo_frame_timeout_timeout_value: 10000 } do %>
@@ -39,7 +39,7 @@
- <%= tag.p format_money(account.balance_money), class: "text-sm font-medium text-primary whitespace-nowrap" %> + <%= tag.p format_money(account.balance_money), class: "text-sm font-medium text-primary whitespace-nowrap privacy-sensitive" %> <%= turbo_frame_tag dom_id(account, :sparkline), src: sparkline_account_path(account), loading: "lazy", data: { controller: "turbo-frame-timeout", turbo_frame_timeout_timeout_value: 10000 } do %>
diff --git a/app/views/budget_categories/_allocation_progress.erb b/app/views/budget_categories/_allocation_progress.erb index 8302a57d0..af854fe00 100644 --- a/app/views/budget_categories/_allocation_progress.erb +++ b/app/views/budget_categories/_allocation_progress.erb @@ -17,9 +17,9 @@ <% end %>

- "><%= format_money(budget.allocated_spending_money) %> + "><%= format_money(budget.allocated_spending_money) %> / - <%= format_money(budget.budgeted_spending_money) %> + <%= format_money(budget.budgeted_spending_money) %>

@@ -34,10 +34,10 @@
<% if budget.available_to_allocate.negative? %>

- Budget exceeded by <%= format_money(budget.available_to_allocate_money.abs) %> + Budget exceeded by <%= format_money(budget.available_to_allocate_money.abs) %>

<% else %> - <%= format_money(budget.available_to_allocate_money) %> + <%= format_money(budget.available_to_allocate_money) %> left to allocate <% end %>
diff --git a/app/views/budget_categories/_budget_category.html.erb b/app/views/budget_categories/_budget_category.html.erb index efa6467c1..8597a1b93 100644 --- a/app/views/budget_categories/_budget_category.html.erb +++ b/app/views/budget_categories/_budget_category.html.erb @@ -57,13 +57,13 @@
<%= t("reports.budget_performance.spent") %>: - + <%= format_money(budget_category.actual_spending_money) %>
<%= t("reports.budget_performance.budgeted") %>: - + <%= format_money(budget_category.budgeted_spending_money) %> <% if budget_category.inherits_parent_budget? %> @@ -73,12 +73,12 @@
<% if budget_category.available_to_spend >= 0 %> <%= t("reports.budget_performance.remaining") %>: - "> + privacy-sensitive"> <%= format_money(budget_category.available_to_spend_money) %> <% else %> <%= t("reports.budget_performance.over_by") %>: - + <%= format_money(budget_category.available_to_spend_money.abs) %> <% end %> @@ -116,13 +116,13 @@

<%= budget_category.category.name %>

-

+

<%= budget_category.median_monthly_expense_money.format %> avg

-

<%= format_money(budget_category.actual_spending_money) %>

+

<%= format_money(budget_category.actual_spending_money) %>

<% end %> diff --git a/app/views/budget_categories/show.html.erb b/app/views/budget_categories/show.html.erb index affb01afc..154a7958f 100644 --- a/app/views/budget_categories/show.html.erb +++ b/app/views/budget_categories/show.html.erb @@ -8,11 +8,11 @@ <% if @budget_category.budget.initialized? %>

- + <%= format_money(@budget_category.actual_spending_money) %> / - <%= format_money(@budget_category.budgeted_spending_money) %> + <%= format_money(@budget_category.budgeted_spending_money) %>

<% end %>
@@ -33,7 +33,7 @@
<%= @budget_category.budget.start_date.strftime("%b %Y") %> spending
-
+
<%= format_money @budget_category.actual_spending_money %>
@@ -42,19 +42,19 @@
Status
<% if @budget_category.available_to_spend.negative? %> -
+
<%= icon "alert-circle", size: "sm", color: "destructive" %> <%= format_money @budget_category.available_to_spend_money.abs %> overspent
<% elsif @budget_category.available_to_spend.zero? %> -
+
<%= icon "x-circle", size: "sm", color: "warning" %> <%= format_money @budget_category.available_to_spend_money %> left
<% else %> -
+
<%= icon "check-circle", size: "sm", color: "success" %> <%= format_money @budget_category.available_to_spend_money %> left @@ -64,7 +64,7 @@
Budgeted
-
+
<%= format_money @budget_category.budgeted_spending_money %>
@@ -72,14 +72,14 @@
Monthly average spending
-
+
<%= @budget_category.avg_monthly_expense_money.format %>
Monthly median spending
-
+
<%= @budget_category.median_monthly_expense_money.format %>
@@ -111,7 +111,7 @@ class: "text-primary hover:underline", data: { turbo_frame: :_top } %>
-

+

<%= format_money transaction.entry.amount_money %>

diff --git a/app/views/budgets/_actuals_summary.html.erb b/app/views/budgets/_actuals_summary.html.erb index 5b4adf1d6..fe9509d9a 100644 --- a/app/views/budgets/_actuals_summary.html.erb +++ b/app/views/budgets/_actuals_summary.html.erb @@ -4,7 +4,7 @@

Income

- + <%= budget.actual_income_money.format %> @@ -32,7 +32,7 @@

Expenses

- <%= budget.actual_spending_money.format %> + <%= budget.actual_spending_money.format %> <% if budget.expense_category_totals.any? %>
diff --git a/app/views/budgets/_budget_donut.html.erb b/app/views/budgets/_budget_donut.html.erb index 8726f4e43..8879d9bfc 100644 --- a/app/views/budgets/_budget_donut.html.erb +++ b/app/views/budgets/_budget_donut.html.erb @@ -8,7 +8,7 @@ Spent
-
"> +
"> <%= format_money(budget.actual_spending_money) %>
@@ -21,7 +21,7 @@ href: edit_budget_path(budget) ) %> <% else %> -
+
<%= format_money Money.new(0, budget.currency || budget.family.currency) %>
@@ -42,7 +42,7 @@

<%= bc.category.name %>

-

"> +

"> <%= format_money(bc.actual_spending_money) %>

@@ -61,7 +61,7 @@ diff --git a/app/views/budgets/_budgeted_summary.html.erb b/app/views/budgets/_budgeted_summary.html.erb index 37e225e75..07905d0d3 100644 --- a/app/views/budgets/_budgeted_summary.html.erb +++ b/app/views/budgets/_budgeted_summary.html.erb @@ -4,7 +4,7 @@

Expected income

- + <%= format_money(budget.expected_income_money) %> @@ -18,7 +18,7 @@
<% end %>
-
+

<%= format_money(budget.actual_income_money) %> earned

<% if budget.remaining_expected_income.negative? %> @@ -34,7 +34,7 @@

Budgeted

- + <%= format_money(budget.budgeted_spending_money) %> @@ -48,7 +48,7 @@
<% end %>
-
+

<%= format_money(budget.actual_spending_money) %> spent

<% if budget.available_to_spend.negative? %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 9d5bc708c..bc2c0ddf8 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -22,7 +22,7 @@ end %> <%= render "layouts/shared/htmldoc" do %>

diff --git a/app/views/pages/dashboard.html.erb b/app/views/pages/dashboard.html.erb index dbb03ca02..4e0122026 100644 --- a/app/views/pages/dashboard.html.erb +++ b/app/views/pages/dashboard.html.erb @@ -9,21 +9,33 @@

- <%= render DS::Link.new( - icon: "plus", - text: t("pages.dashboard.new"), - href: new_account_path, - frame: :modal, - class: "hidden lg:inline-flex" - ) %> +
+ - <%= render DS::Link.new( - variant: "icon-inverse", + <%= render DS::Link.new( icon: "plus", + text: t("pages.dashboard.new"), href: new_account_path, frame: :modal, - class: "rounded-full lg:hidden" + class: "hidden lg:inline-flex" ) %> + + <%= render DS::Link.new( + variant: "icon-inverse", + icon: "plus", + href: new_account_path, + frame: :modal, + class: "rounded-full lg:hidden" + ) %> +
<% end %> diff --git a/app/views/pages/dashboard/_balance_sheet.html.erb b/app/views/pages/dashboard/_balance_sheet.html.erb index 5bacd50c5..0f8710581 100644 --- a/app/views/pages/dashboard/_balance_sheet.html.erb +++ b/app/views/pages/dashboard/_balance_sheet.html.erb @@ -11,7 +11,7 @@ <% if classification_group.account_groups.any? %> · - <%= classification_group.total_money.format(precision: 0) %> + <%= classification_group.total_money.format(precision: 0) %> <% end %>
@@ -29,7 +29,7 @@

<%= account_group.name %>

-

<%= number_to_percentage(account_group.weight, precision: 0) %>

+

<%= number_to_percentage(account_group.weight, precision: 0) %>

<% end %>
@@ -67,7 +67,7 @@
-

<%= format_money(account_group.total_money) %>

+

<%= format_money(account_group.total_money) %>

@@ -92,7 +92,7 @@
-

<%= format_money(account.balance_money) %>

+

<%= format_money(account.balance_money) %>

diff --git a/app/views/pages/dashboard/_group_weight.html.erb b/app/views/pages/dashboard/_group_weight.html.erb index c00655a23..d3bf08e5c 100644 --- a/app/views/pages/dashboard/_group_weight.html.erb +++ b/app/views/pages/dashboard/_group_weight.html.erb @@ -8,5 +8,5 @@
" style="background-color: <%= color %>;">
<% end %> -

<%= number_to_percentage(effective_weight, precision: 2) %>

+

<%= number_to_percentage(effective_weight, precision: 2) %>

diff --git a/app/views/pages/dashboard/_investment_summary.html.erb b/app/views/pages/dashboard/_investment_summary.html.erb index f10f0d776..b6e39afef 100644 --- a/app/views/pages/dashboard/_investment_summary.html.erb +++ b/app/views/pages/dashboard/_investment_summary.html.erb @@ -8,7 +8,7 @@

<%= t(".title") %>

-

+

<%= format_money(investment_statement.portfolio_value_money) %>

@@ -16,7 +16,7 @@ <% if trend %>
<%= t(".total_return") %>: - + <%= format_money(Money.new(trend.value, Current.family.currency)) %> (<%= trend.percent_formatted %>) @@ -52,17 +52,17 @@
-
+
<%= number_to_percentage(holding.weight || 0, precision: 1) %>
-
+
<%= format_money(holding.amount_money) %>
<% if holding.trend %> - + <%= holding.trend.percent_formatted %> <% else %> @@ -90,7 +90,7 @@

<%= t(".contributions") %>

-

<%= format_money(totals.contributions) %>

+

<%= format_money(totals.contributions) %>

@@ -99,7 +99,7 @@

<%= t(".withdrawals") %>

-

<%= format_money(totals.withdrawals) %>

+

<%= format_money(totals.withdrawals) %>

diff --git a/app/views/pages/dashboard/_net_worth_chart.html.erb b/app/views/pages/dashboard/_net_worth_chart.html.erb index 2ac67416b..08e284ae5 100644 --- a/app/views/pages/dashboard/_net_worth_chart.html.erb +++ b/app/views/pages/dashboard/_net_worth_chart.html.erb @@ -5,7 +5,7 @@
<% if series.trend.present? %> -

"> +

"> <%= series.trend.current.format %>

<%= render partial: "shared/trend_change", locals: { trend: series.trend, comparison_label: period.comparison_label } %> diff --git a/app/views/pages/dashboard/_outflows_donut.html.erb b/app/views/pages/dashboard/_outflows_donut.html.erb index 5079dcc9d..8e563e528 100644 --- a/app/views/pages/dashboard/_outflows_donut.html.erb +++ b/app/views/pages/dashboard/_outflows_donut.html.erb @@ -31,7 +31,7 @@ <%= t("pages.dashboard.outflows_donut.total_outflows") %>
-
+
<%= format_money Money.new(outflows_data[:total], outflows_data[:currency]) %>
@@ -41,11 +41,11 @@

<%= category[:name] %>

-

+

<%= outflows_data[:currency_symbol] %><%= number_with_delimiter(category[:amount], delimiter: ",") %>

-

<%= category[:percentage] %>%

+

<%= category[:percentage] %>%

<% end %> @@ -94,8 +94,8 @@ <%= category[:name] %>
- <%= format_money Money.new(category[:amount], category[:currency]) %> - <%= category[:percentage] %>% + <%= format_money Money.new(category[:amount], category[:currency]) %> + <%= category[:percentage] %>%
<% end %> diff --git a/app/views/recurring_transactions/_projected_transaction.html.erb b/app/views/recurring_transactions/_projected_transaction.html.erb index 0f7b8b59d..3659e3fe2 100644 --- a/app/views/recurring_transactions/_projected_transaction.html.erb +++ b/app/views/recurring_transactions/_projected_transaction.html.erb @@ -56,6 +56,6 @@
<% display_amount = recurring_transaction.manual? && recurring_transaction.expected_amount_avg.present? ? recurring_transaction.expected_amount_avg : recurring_transaction.amount %> - <%= content_tag :p, format_money(-Money.new(display_amount, recurring_transaction.currency)), class: ["font-medium", display_amount.negative? ? "text-success" : "text-subdued"] %> + <%= content_tag :p, format_money(-Money.new(display_amount, recurring_transaction.currency)), class: ["font-medium", "privacy-sensitive", display_amount.negative? ? "text-success" : "text-subdued"] %>
diff --git a/app/views/recurring_transactions/index.html.erb b/app/views/recurring_transactions/index.html.erb index 06374fef6..184556a78 100644 --- a/app/views/recurring_transactions/index.html.erb +++ b/app/views/recurring_transactions/index.html.erb @@ -128,11 +128,11 @@ <% end %> - "> + "> <% if recurring_transaction.manual? && recurring_transaction.has_amount_variance? %>
"> ~ - <%= format_money(-recurring_transaction.expected_amount_avg_money) %> + <%= format_money(-recurring_transaction.expected_amount_avg_money) %>
<% else %> <%= format_money(-recurring_transaction.amount_money) %> diff --git a/app/views/reports/_breakdown_table.html.erb b/app/views/reports/_breakdown_table.html.erb index 2034ba4cb..28a3d36c0 100644 --- a/app/views/reports/_breakdown_table.html.erb +++ b/app/views/reports/_breakdown_table.html.erb @@ -11,7 +11,7 @@
<%= icon(icon_name, class: "w-5 h-5") %> <%= t(title_key) %>: - <%= Money.new(total, Current.family.currency).format %> + <%= Money.new(total, Current.family.currency).format %>
diff --git a/app/views/reports/_budget_performance.html.erb b/app/views/reports/_budget_performance.html.erb index a66a50a89..23b93bc3c 100644 --- a/app/views/reports/_budget_performance.html.erb +++ b/app/views/reports/_budget_performance.html.erb @@ -63,13 +63,13 @@
<%= t("reports.budget_performance.spent") %>: - + <%= Money.new(budget_item[:actual], Current.family.currency).format %>
<%= t("reports.budget_performance.budgeted") %>: - + <%= Money.new(budget_item[:budgeted], Current.family.currency).format %>
@@ -78,12 +78,12 @@
<% if budget_item[:remaining] >= 0 %> <%= t("reports.budget_performance.remaining") %>: - + <%= Money.new(budget_item[:remaining], Current.family.currency).format %> <% else %> <%= t("reports.budget_performance.over_by") %>: - + <%= Money.new(budget_item[:remaining].abs, Current.family.currency).format %> <% end %> diff --git a/app/views/reports/_category_row.html.erb b/app/views/reports/_category_row.html.erb index ac37dafe6..80c31245a 100644 --- a/app/views/reports/_category_row.html.erb +++ b/app/views/reports/_category_row.html.erb @@ -37,7 +37,7 @@
- + <%= Money.new(item[:total], Current.family.currency).format %>
diff --git a/app/views/reports/_investment_flows.html.erb b/app/views/reports/_investment_flows.html.erb index 99a01273a..83db092e2 100644 --- a/app/views/reports/_investment_flows.html.erb +++ b/app/views/reports/_investment_flows.html.erb @@ -11,7 +11,7 @@ <%= icon("trending-up", size: "sm", class: "text-green-600") %>

Contributions

-
+
<%= format_money(investment_flows.contributions) %>

Money added to investments

@@ -23,7 +23,7 @@ <%= icon("trending-down", size: "sm", class: "text-orange-600") %>

Withdrawals

-
+
<%= format_money(investment_flows.withdrawals) %>

Money withdrawn from investments

@@ -35,7 +35,7 @@ <%= icon("arrow-right-left", size: "sm", class: "text-primary") %>

Net Flow

-
+
<%= format_money(investment_flows.net_flow) %>

Total net change

diff --git a/app/views/reports/_investment_performance.html.erb b/app/views/reports/_investment_performance.html.erb index aa63cbf4d..a3c514553 100644 --- a/app/views/reports/_investment_performance.html.erb +++ b/app/views/reports/_investment_performance.html.erb @@ -10,7 +10,7 @@ <%= icon("briefcase", size: "sm") %> <%= t("reports.investment_performance.portfolio_value") %>
-

+

<%= format_money(investment_metrics[:portfolio_value]) %>

@@ -22,7 +22,7 @@ <%= t("reports.investment_performance.total_return") %> <% if investment_metrics[:unrealized_trend] %> -

+

<%= format_money(Money.new(investment_metrics[:unrealized_trend].value, Current.family.currency)) %> (<%= investment_metrics[:unrealized_trend].percent_formatted %>)

@@ -37,7 +37,7 @@ <%= icon("arrow-down-to-line", size: "sm") %> <%= t("reports.investment_performance.contributions") %> -

+

<%= format_money(investment_metrics[:period_contributions]) %>

@@ -48,7 +48,7 @@ <%= icon("arrow-up-from-line", size: "sm") %> <%= t("reports.investment_performance.withdrawals") %> -

+

<%= format_money(investment_metrics[:period_withdrawals]) %>

@@ -85,7 +85,7 @@
<%= number_to_percentage(holding.weight || 0, precision: 1) %>
-
<%= format_money(holding.amount_money) %>
+
<%= format_money(holding.amount_money) %>
<% if holding.trend %> @@ -117,7 +117,7 @@ "> <%= t("accounts.tax_treatments.#{treatment}") %> - + <%= format_money(data[:total_gain]) %>
@@ -125,11 +125,11 @@
<%= t("reports.investment_performance.unrealized_gains") %> - <%= format_money(data[:unrealized_gain]) %> + <%= format_money(data[:unrealized_gain]) %>
<%= t("reports.investment_performance.realized_gains") %> - <%= format_money(data[:realized_gain]) %> + <%= format_money(data[:realized_gain]) %>
@@ -205,7 +205,7 @@

<%= account.short_subtype_label %>

-

<%= format_money(account.balance_money) %>

+

<%= format_money(account.balance_money) %>

<% end %> <% end %> diff --git a/app/views/reports/_net_worth.html.erb b/app/views/reports/_net_worth.html.erb index e3c8f01df..0ed1dc2b3 100644 --- a/app/views/reports/_net_worth.html.erb +++ b/app/views/reports/_net_worth.html.erb @@ -4,7 +4,7 @@ <%# Current Net Worth %>

<%= t("reports.net_worth.current_net_worth") %>

-

"> +

"> <%= net_worth_metrics[:current_net_worth].format %>

@@ -14,7 +14,7 @@

<%= t("reports.net_worth.period_change") %>

<% if net_worth_metrics[:trend] %> <% trend = net_worth_metrics[:trend] %> -

+

<%= trend.value.format(signify_positive: true) %>

@@ -29,9 +29,9 @@

<%= t("reports.net_worth.assets_vs_liabilities") %>

- <%= net_worth_metrics[:total_assets].format %> + <%= net_worth_metrics[:total_assets].format %> - - <%= net_worth_metrics[:total_liabilities].format %> + <%= net_worth_metrics[:total_liabilities].format %>
@@ -47,7 +47,7 @@ <% net_worth_metrics[:asset_groups].each_with_index do |group, idx| %>
<%= group[:name] %>
-
<%= group[:total].format %>
+
<%= group[:total].format %>
<% if idx < net_worth_metrics[:asset_groups].size - 1 %> <%= render "shared/ruler", classes: "mx-3 lg:mx-4" %> @@ -68,7 +68,7 @@ <% net_worth_metrics[:liability_groups].each_with_index do |group, idx| %>
<%= group[:name] %>
-
<%= group[:total].format %>
+
<%= group[:total].format %>
<% if idx < net_worth_metrics[:liability_groups].size - 1 %> <%= render "shared/ruler", classes: "mx-3 lg:mx-4" %> diff --git a/app/views/reports/_summary_dashboard.html.erb b/app/views/reports/_summary_dashboard.html.erb index 7ad7ffb8e..927cfd2a7 100644 --- a/app/views/reports/_summary_dashboard.html.erb +++ b/app/views/reports/_summary_dashboard.html.erb @@ -11,12 +11,12 @@
-

+

<%= metrics[:current_income].format %>

<% if metrics[:income_change] %> -
+
<% if metrics[:income_change] >= 0 %> <%= icon("arrow-up", size: "sm") %> @@ -48,12 +48,12 @@
-

+

<%= metrics[:current_expenses].format %>

<% if metrics[:expense_change] %> -
+
<% if metrics[:expense_change] >= 0 %> <%= icon("arrow-up", class: "w-4 h-4 text-destructive") %> @@ -85,7 +85,7 @@
-

"> +

"> <%= metrics[:net_savings].format %>

@@ -108,7 +108,7 @@
<% if metrics[:budget_percent] %> -

+

<%= metrics[:budget_percent] %>%

diff --git a/app/views/reports/_trends_insights.html.erb b/app/views/reports/_trends_insights.html.erb index 397de8ed1..419341853 100644 --- a/app/views/reports/_trends_insights.html.erb +++ b/app/views/reports/_trends_insights.html.erb @@ -24,13 +24,13 @@ (<%= t("reports.trends.current") %>) <% end %>
-
+
<%= Money.new(trend[:income], Current.family.currency).format %>
-
+
<%= Money.new(trend[:expenses], Current.family.currency).format %>
-
"> +
"> <%= Money.new(trend[:net], Current.family.currency).format %>
"> @@ -54,21 +54,21 @@

<%= t("reports.trends.avg_monthly_income") %>

-

+

<%= Money.new(avg_income, Current.family.currency).format %>

<%= t("reports.trends.avg_monthly_expenses") %>

-

+

<%= Money.new(avg_expenses, Current.family.currency).format %>

<%= t("reports.trends.avg_monthly_savings") %>

-

"> +

"> <%= Money.new(avg_net, Current.family.currency).format %>

diff --git a/app/views/shared/_trend_change.html.erb b/app/views/shared/_trend_change.html.erb index ad9c44cf8..7da471193 100644 --- a/app/views/shared/_trend_change.html.erb +++ b/app/views/shared/_trend_change.html.erb @@ -1,6 +1,6 @@ <%# locals: { trend:, comparison_label: nil } %> -

+

<% if trend.direction.flat? %> <%= t(".no_change") %><%= " #{comparison_label}" if defined?(comparison_label) && comparison_label.present? %> <% else %> diff --git a/app/views/transactions/_summary.html.erb b/app/views/transactions/_summary.html.erb index 818283f2c..117b4e933 100644 --- a/app/views/transactions/_summary.html.erb +++ b/app/views/transactions/_summary.html.erb @@ -2,17 +2,17 @@

Total transactions

-

<%= totals.count.round(0) %>

+

<%= totals.count.round(0) %>

Income

-

+

<%= totals.income_money.format %>

Expenses

-

+

<%= totals.expense_money.format %>

diff --git a/config/locales/views/pages/de.yml b/config/locales/views/pages/de.yml index 4df171506..337559dae 100644 --- a/config/locales/views/pages/de.yml +++ b/config/locales/views/pages/de.yml @@ -7,6 +7,7 @@ de: welcome: "Willkommen zurück, %{name}" subtitle: "Hier siehst du, was in deinen Finanzen passiert." new: "Neu" + privacy_mode: "Datenschutzmodus umschalten" net_worth_chart: data_not_available: Für den ausgewählten Zeitraum sind keine Daten verfügbar. title: Nettovermögen diff --git a/config/locales/views/pages/en.yml b/config/locales/views/pages/en.yml index bded845ee..5ccfa5df4 100644 --- a/config/locales/views/pages/en.yml +++ b/config/locales/views/pages/en.yml @@ -15,6 +15,7 @@ en: welcome: "Welcome back, %{name}" subtitle: "Here's what's happening with your finances" new: "New" + privacy_mode: "Toggle privacy mode" drag_to_reorder: "Drag to reorder section" toggle_section: "Toggle section visibility" net_worth_chart: