diff --git a/.gitattributes b/.gitattributes index 8dc432343..767c681d5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,3 +7,8 @@ db/schema.rb linguist-generated vendor/* linguist-vendored config/credentials/*.yml.enc diff=rails_credentials config/credentials.yml.enc diff=rails_credentials + +# Ensure consistent line endings for scripts and Ruby files to avoid shebang issues on Windows +bin/* text eol=lf +*.sh text eol=lf +*.rb text eol=lf diff --git a/app/views/holdings/show.html.erb b/app/views/holdings/show.html.erb index 66a1ca725..67b4329ba 100644 --- a/app/views/holdings/show.html.erb +++ b/app/views/holdings/show.html.erb @@ -1,5 +1,5 @@ -<%= render DS::Dialog.new(variant: "drawer") do |dialog| %> - <% dialog.with_header do %> +<%= render DS::Dialog.new(frame: "drawer") do |dialog| %> + <% dialog.with_header(hide_close_icon: true) do %>
<%= tag.h3 @holding.name, class: "text-2xl font-medium text-primary" %> diff --git a/app/views/layouts/shared/_head.html.erb b/app/views/layouts/shared/_head.html.erb index a878b66a9..b96ce2c61 100644 --- a/app/views/layouts/shared/_head.html.erb +++ b/app/views/layouts/shared/_head.html.erb @@ -19,13 +19,19 @@ + - - + <%# Use theme colors that match both light and dark modes %> + + + - + <%# Provide multiple iOS icons (standard 180x180 and larger) %> + + + <% if Rails.env.production? && (posthog_config = Rails.configuration.x.posthog).try(:api_key).present? %> <%= render "shared/posthog", posthog_api_key: posthog_config.api_key, posthog_host: posthog_config.host %> diff --git a/app/views/layouts/shared/_htmldoc.html.erb b/app/views/layouts/shared/_htmldoc.html.erb index 5520735eb..f58f9c0d0 100644 --- a/app/views/layouts/shared/_htmldoc.html.erb +++ b/app/views/layouts/shared/_htmldoc.html.erb @@ -7,7 +7,7 @@ data-theme="<%= theme %>" data-controller="theme" data-theme-user-preference-value="<%= Current.user&.theme || "system" %>" - class="h-[100vh] text-primary bg-surface overflow-hidden overscroll-none font-sans <%= @os %>"> + class="text-primary bg-surface overflow-hidden overscroll-none font-sans <%= @os %>"> <%= render "layouts/shared/head" %> <%= yield :head %> diff --git a/app/views/pages/dashboard/_investment_summary.html.erb b/app/views/pages/dashboard/_investment_summary.html.erb index 30b83a067..f10f0d776 100644 --- a/app/views/pages/dashboard/_investment_summary.html.erb +++ b/app/views/pages/dashboard/_investment_summary.html.erb @@ -83,9 +83,9 @@ <%= t(".period_activity", period: period.label) %>
-
+
-
+
<%= icon "trending-up", size: "sm", color: "green" %>
@@ -94,7 +94,7 @@
-
+
<%= icon "trending-down", size: "sm", color: "orange" %>
@@ -103,7 +103,7 @@
-
+
<%= icon "arrow-left-right", size: "sm", color: "blue" %>
diff --git a/app/views/pwa/manifest.json.erb b/app/views/pwa/manifest.json.erb index 05382503b..e7960c255 100644 --- a/app/views/pwa/manifest.json.erb +++ b/app/views/pwa/manifest.json.erb @@ -16,8 +16,9 @@ ], "start_url": "/", "display": "standalone", - "display_override": ["fullscreen", "minimal-ui"], + "display_override": ["window-controls-overlay", "minimal-ui"], "scope": "/", + "orientation": "any", "description": "<%= j product_name %> is your personal finance assistant.", "theme_color": "#F9F9F9", "background_color": "#F9F9F9" diff --git a/app/views/settings/_settings_nav.html.erb b/app/views/settings/_settings_nav.html.erb index de5442173..90608e652 100644 --- a/app/views/settings/_settings_nav.html.erb +++ b/app/views/settings/_settings_nav.html.erb @@ -84,8 +84,8 @@ nav_sections = [ <% end %> -
diff --git a/app/views/shared/_transaction_type_tabs.html.erb b/app/views/shared/_transaction_type_tabs.html.erb index b2cfe0fdb..820c23071 100644 --- a/app/views/shared/_transaction_type_tabs.html.erb +++ b/app/views/shared/_transaction_type_tabs.html.erb @@ -1,24 +1,30 @@ <%# locals: (active_tab:, account_id: nil) %> -
+
<%= link_to new_transaction_path(nature: "outflow", account_id: account_id), data: { turbo_frame: :modal }, - class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-sm #{active_tab == 'expense' ? 'bg-container text-primary shadow-sm' : 'hover:bg-container text-subdued hover:text-primary hover:shadow-sm'}" do %> + class: "flex-1 min-w-0 flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-sm #{active_tab == 'expense' ? 'bg-container text-primary shadow-sm' : 'hover:bg-container text-subdued hover:text-primary hover:shadow-sm'}" do %> <%= icon "minus-circle" %> - <%= tag.span t("shared.transaction_tabs.expense") %> + <%= tag.span class: "truncate" do %> + <%= t("shared.transaction_tabs.expense") %> + <% end %> <% end %> <%= link_to new_transaction_path(nature: "inflow", account_id: account_id), data: { turbo_frame: :modal }, - class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-sm #{active_tab == 'income' ? 'bg-container text-primary shadow-sm' : 'hover:bg-container text-subdued hover:text-primary hover:shadow-sm'}" do %> + class: "flex-1 min-w-0 flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-sm #{active_tab == 'income' ? 'bg-container text-primary shadow-sm' : 'hover:bg-container text-subdued hover:text-primary hover:shadow-sm'}" do %> <%= icon "plus-circle" %> - <%= tag.span t("shared.transaction_tabs.income") %> + <%= tag.span class: "truncate" do %> + <%= t("shared.transaction_tabs.income") %> + <% end %> <% end %> <%= link_to new_transfer_path, data: { turbo_frame: :modal }, - class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-sm #{active_tab == 'transfer' ? 'bg-container text-primary shadow-sm' : 'hover:bg-container text-subdued hover:text-primary hover:shadow-sm'}" do %> + class: "flex-1 min-w-0 flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-sm #{active_tab == 'transfer' ? 'bg-container text-primary shadow-sm' : 'hover:bg-container text-subdued hover:text-primary hover:shadow-sm'}" do %> <%= icon "arrow-right-left" %> - <%= tag.span t("shared.transaction_tabs.transfer") %> + <%= tag.span class: "truncate" do %> + <%= t("shared.transaction_tabs.transfer") %> + <% end %> <% end %>
diff --git a/app/views/trades/show.html.erb b/app/views/trades/show.html.erb index c60543441..d5eea69f6 100644 --- a/app/views/trades/show.html.erb +++ b/app/views/trades/show.html.erb @@ -1,5 +1,5 @@ -<%= render DS::Dialog.new(variant: "drawer") do |dialog| %> - <% dialog.with_header do %> +<%= render DS::Dialog.new(frame: "drawer") do |dialog| %> + <% dialog.with_header(hide_close_icon: true) do %> <%= render "trades/header", entry: @entry %> <% end %> diff --git a/app/views/transactions/_header.html.erb b/app/views/transactions/_header.html.erb index fd710e63e..3ad9530ae 100644 --- a/app/views/transactions/_header.html.erb +++ b/app/views/transactions/_header.html.erb @@ -1,8 +1,8 @@ <%# locals: (entry:) %> -<%= tag.header class: "mb-4 space-y-1", id: dom_id(entry, :header) do %> -
-

+
+
+

<%= format_money -entry.amount_money %> @@ -10,20 +10,31 @@ <%= entry.currency %> + + <% if entry.transaction.transfer? %> + <%= icon "arrow-left-right", size: "sm", class: "text-secondary" %> + <% end %> + + <% if entry.linked? %> + + <%= icon("refresh-ccw", size: "sm") %> + + <% end %>

- <% if entry.transaction.transfer? %> - <%= icon "arrow-left-right", class: "mt-1" %> - <% end %> - - <% if entry.linked? %> - - <%= icon("refresh-ccw", size: "sm") %> +
+ + <%= I18n.l(entry.date, format: :long) %> - <% end %> + + <% if entry.transaction.pending? %> + "> + <%= icon "clock", size: "sm", color: "current" %> + <%= t("transactions.transaction.pending") %> + + <% end %> +
- - <%= I18n.l(entry.date, format: :long) %> - -<% end %> + <%= render DS::Button.new(variant: "icon", icon: "x", data: { action: "DS--dialog#close" }) %> +
diff --git a/app/views/transactions/show.html.erb b/app/views/transactions/show.html.erb index 5ec582353..0b875ebc8 100644 --- a/app/views/transactions/show.html.erb +++ b/app/views/transactions/show.html.erb @@ -1,5 +1,5 @@ -<%= render DS::Dialog.new(variant: "drawer") do |dialog| %> - <% dialog.with_header do %> +<%= render DS::Dialog.new(frame: "drawer") do |dialog| %> + <% dialog.with_header(hide_close_icon: true) do %> <%= render "transactions/header", entry: @entry %> <% end %> diff --git a/app/views/transfers/_form.html.erb b/app/views/transfers/_form.html.erb index 4158303e4..aff9d0675 100644 --- a/app/views/transfers/_form.html.erb +++ b/app/views/transfers/_form.html.erb @@ -6,9 +6,24 @@

<% end %> -
- <%= render "shared/transaction_type_tabs", active_tab: "transfer" %> -
+ <%# Hide expense/income tabs when creating a transfer involving an investment or crypto account. %> + <% show_type_tabs = true %> + <% account_ids = [] %> + <% account_ids << @from_account_id if defined?(@from_account_id) && @from_account_id.present? %> + <% account_ids << params[:from_account_id] if params[:from_account_id].present? %> + <% account_ids << params[:to_account_id] if params[:to_account_id].present? %> + <% account_ids << transfer.from_account_id if transfer.respond_to?(:from_account_id) && transfer.from_account_id.present? %> + <% account_ids << transfer.to_account_id if transfer.respond_to?(:to_account_id) && transfer.to_account_id.present? %> + + <% if account_ids.any? && Current.family.accounts.where(id: account_ids).any? { |a| a.investment? || a.crypto? } %> + <% show_type_tabs = false %> + <% end %> + + <% if show_type_tabs %> +
+ <%= render "shared/transaction_type_tabs", active_tab: "transfer" %> +
+ <% end %>
<%= f.collection_select :from_account_id, Current.family.accounts.alphabetically, :id, :name, { prompt: t(".select_account"), label: t(".from"), selected: @from_account_id }, required: true %> diff --git a/app/views/transfers/show.html.erb b/app/views/transfers/show.html.erb index a74b96462..f8a8248eb 100644 --- a/app/views/transfers/show.html.erb +++ b/app/views/transfers/show.html.erb @@ -1,8 +1,8 @@ -<%= render DS::Dialog.new(variant: "drawer") do |dialog| %> - <% dialog.with_header do %> -
-
-

+<%= render DS::Dialog.new(frame: "drawer") do |dialog| %> + <% dialog.with_header(hide_close_icon: true) do %> +
+
+

<%= format_money @transfer.amount_abs %> @@ -10,14 +10,16 @@ <%= @transfer.amount_abs.currency.iso_code %> + + <%= icon "arrow-left-right", size: "sm", class: "text-secondary" %>

- <%= icon "arrow-left-right", size: "sm" %> + + <%= @transfer.name %> +
- - <%= @transfer.name %> - + <%= render DS::Button.new(variant: "icon", icon: "x", data: { action: "DS--dialog#close" }) %>
<% end %> diff --git a/app/views/valuations/show.html.erb b/app/views/valuations/show.html.erb index 089d98a43..a5977c23c 100644 --- a/app/views/valuations/show.html.erb +++ b/app/views/valuations/show.html.erb @@ -1,7 +1,7 @@ <% entry, account = @entry, @entry.account %> -<%= render DS::Dialog.new(variant: "drawer") do |dialog| %> - <% dialog.with_header do %> +<%= render DS::Dialog.new(frame: "drawer") do |dialog| %> + <% dialog.with_header(hide_close_icon: true) do %> <%= render "valuations/header", entry: @entry %> <% end %> diff --git a/config/locales/views/transactions/en.yml b/config/locales/views/transactions/en.yml index 1dfa2704f..02287d644 100644 --- a/config/locales/views/transactions/en.yml +++ b/config/locales/views/transactions/en.yml @@ -76,6 +76,7 @@ en: transaction: pending: Pending pending_tooltip: Pending transaction — may change when posted + linked_with_plaid: Linked with Plaid activity_type_tooltip: Investment activity type possible_duplicate: Duplicate? potential_duplicate_tooltip: This may be a duplicate of another transaction diff --git a/public/site.webmanifest b/public/site.webmanifest deleted file mode 100644 index 15a5afe8a..000000000 --- a/public/site.webmanifest +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "", - "short_name": "", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "fullscreen" -}