The personal finance app for everyone
Finalize profile settings page for v0.2.0-alpha (#1194)
Zach Gollwitzerb4b4e5df31ee
diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.cssindex d3ba7908..110f31d0 100644--- a/app/assets/stylesheets/application.tailwind.css+++ b/app/assets/stylesheets/application.tailwind.css@@ -107,8 +107,12 @@@apply bg-gray-900 text-white hover:bg-gray-700;}- .btn--light {- @apply bg-gray-25 border border-alpha-black-200 text-gray-900 hover:bg-gray-50;+ .btn--outline {+ @apply border border-alpha-black-200 text-gray-900 hover:bg-gray-50;+ }++ .btn--ghost {+ @apply border border-transparent text-gray-900 hover:bg-gray-50;}}diff --git a/app/models/demo/generator.rb b/app/models/demo/generator.rbindex 76b54918..20e5c01c 100644--- a/app/models/demo/generator.rb+++ b/app/models/demo/generator.rb@@ -70,6 +70,7 @@ class Demo::Generatoremail: "[email protected]",first_name: "Demo",last_name: "User",+ role: "admin",password: "password"enddiff --git a/app/views/accounts/_sync_all_button.html.erb b/app/views/accounts/_sync_all_button.html.erbindex 9b5f7213..0cf16bbd 100644--- a/app/views/accounts/_sync_all_button.html.erb+++ b/app/views/accounts/_sync_all_button.html.erb@@ -1,4 +1,4 @@-<%= button_to sync_all_accounts_path, class: "btn btn--light flex items-center gap-2", title: "Sync All" do %>+<%= button_to sync_all_accounts_path, class: "btn btn--outline flex items-center gap-2", title: "Sync All" do %><%= lucide_icon "refresh-cw", class: "w-5 h-5" %><span><%= t("accounts.sync_all.button_text") %></span><% end %>diff --git a/app/views/settings/_nav.html.erb b/app/views/settings/_nav.html.erbindex 3ed3c58b..7edaf8a8 100644--- a/app/views/settings/_nav.html.erb+++ b/app/views/settings/_nav.html.erb@@ -1,66 +1,76 @@-<div class="flex items-center gap-1 mb-6">- <%= link_to return_to_path(params), class: "flex items-center gap-1 text-gray-900 font-medium text-sm" do %>- <%= lucide_icon "chevron-left", class: "w-5 h-5 text-gray-500" %>- <span>Back</span>- <% end %>- <span data-controller="hotkey" data-hotkey="Escape" data-action="hotkey#navigateBack" class="uppercase bg-gray-100 rounded-sm px-1 py-0.5 text-xs text-gray-500 shadow-sm ml-1">- esc- </span>-</div>-<nav class="space-y-4">- <section class="space-y-2">- <div class="flex items-center gap-2">- <h3 class="uppercase text-gray-500 font-medium text-xs"><%= t(".general_section_title") %></h3>- <div class="h-px bg-alpha-black-100 w-full"></div>- </div>- <ul class="space-y-1">- <li>- <%= sidebar_link_to t(".profile_label"), settings_profile_path, icon: "circle-user" %>- </li>- <li>- <%= sidebar_link_to t(".preferences_label"), settings_preferences_path, icon: "bolt" %>- </li>- <% if self_hosted? %>+<div class="space-y-4">+ <div class="flex items-center gap-2 p-2">+ <%= link_to return_to_path(params), class: "flex items-center gap-1 text-gray-900 font-medium text-sm" do %>+ <%= lucide_icon "chevron-left", class: "w-5 h-5 text-gray-500" %>+ <span>Back</span>+ <% end %>+ <span data-controller="hotkey" data-hotkey="Escape" data-action="hotkey#navigateBack" class="uppercase bg-gray-100 rounded-sm px-1 py-0.5 text-xs text-gray-500 shadow-sm ml-1">+ esc+ </span>+ </div>+ <nav class="space-y-4">+ <section class="space-y-2">+ <div class="flex items-center gap-2 px-3">+ <h3 class="uppercase text-gray-500 font-medium text-xs"><%= t(".general_section_title") %></h3>+ <div class="h-px bg-alpha-black-100 w-full"></div>+ </div>+ <ul class="space-y-1">+ <li>+ <%= sidebar_link_to t(".profile_label"), settings_profile_path, icon: "circle-user" %>+ </li>+ <li>+ <%= sidebar_link_to t(".preferences_label"), settings_preferences_path, icon: "bolt" %>+ </li>+ <% if self_hosted? %>+ <li>+ <%= sidebar_link_to t(".self_hosting_label"), settings_hosting_path, icon: "database" %>+ </li>+ <% end %>+ <li>+ <%= sidebar_link_to t(".accounts_label"), accounts_path, icon: "layers" %>+ </li>+ </ul>+ </section>++ <section class="space-y-2">+ <div class="flex items-center gap-2 px-3">+ <h3 class="uppercase text-gray-500 font-medium text-xs"><%= t(".transactions_section_title") %></h3>+ <div class="h-px bg-alpha-black-100 w-full"></div>+ </div>+ <ul class="space-y-1">+ <li>+ <%= sidebar_link_to t(".tags_label"), tags_path, icon: "tags" %>+ </li><li>- <%= sidebar_link_to t(".self_hosting_label"), settings_hosting_path, icon: "database" %>+ <%= sidebar_link_to t(".categories_label"), categories_path, icon: "shapes" %></li>+ <li>+ <%= sidebar_link_to t(".merchants_label"), merchants_path, icon: "store" %>+ </li>+ <li>+ <%= sidebar_link_to t(".imports_label"), imports_path, icon: "download" %>+ </li>+ </ul>+ </section>++ <section class="space-y-2">+ <div class="flex items-center gap-2 px-3">+ <h3 class="uppercase text-gray-500 font-medium text-xs"><%= t(".other_section_title") %></h3>+ <div class="h-px bg-alpha-black-100 w-full"></div>+ </div>+ <ul class="space-y-1">+ <li>+ <%= sidebar_link_to t(".whats_new_label"), changelog_path, icon: "box" %>+ <%= sidebar_link_to t(".feedback_label"), feedback_path, icon: "megaphone" %>+ </li>+ </ul>+ </section>++ <section>+ <%= button_to session_path, method: :delete, class: "flex items-center gap-2 px-3 py-2 rounded-xl border text-sm font-medium w-full text-error hover:bg-gray-100 border-transparent" do %>+ <%= lucide_icon("log-out", class: "w-5 h-5 shrink-0") %>+ <span><%= t(".logout") %></span><% end %>- <li>- <%= sidebar_link_to t(".accounts_label"), accounts_path, icon: "layers" %>- </li>- </li>- </ul>-</section>-<section class="space-y-2">- <div class="flex items-center gap-2">- <h3 class="uppercase text-gray-500 font-medium text-xs"><%= t(".transactions_section_title") %></h3>- <div class="h-px bg-alpha-black-100 w-full"></div>- </div>- <ul class="space-y-1">- <li>- <%= sidebar_link_to t(".tags_label"), tags_path, icon: "tags" %>- </li>- <li>- <%= sidebar_link_to t(".categories_label"), categories_path, icon: "shapes" %>- </li>- <li>- <%= sidebar_link_to t(".merchants_label"), merchants_path, icon: "store" %>- </li>- <li>- <%= sidebar_link_to t(".imports_label"), imports_path, icon: "download" %>- </li>- </ul>-</section>-<section class="space-y-2">- <div class="flex items-center gap-2">- <h3 class="uppercase text-gray-500 font-medium text-xs"><%= t(".other_section_title") %></h3>- <div class="h-px bg-alpha-black-100 w-full"></div>- </div>- <ul class="space-y-1">- <li>- <%= sidebar_link_to t(".whats_new_label"), changelog_path, icon: "box" %>- <%= sidebar_link_to t(".feedback_label"), feedback_path, icon: "megaphone" %>- </li>- </ul>-</section>-</nav>+ </section>+ </nav>+</div>diff --git a/app/views/settings/profiles/show.html.erb b/app/views/settings/profiles/show.html.erbindex b2eda05c..595f749b 100644--- a/app/views/settings/profiles/show.html.erb+++ b/app/views/settings/profiles/show.html.erb@@ -61,12 +61,6 @@<p class="uppercase text-gray-500 font-medium text-xs"><%= Current.user.role %></p></div></div>- <div>- <button disabled class="cursor-not-allowed flex gap-1 justify-center w-full block items-center px-4 py-2">- <%= lucide_icon "plus", class: "w-4 h-4 text-gray-500" %>- <span class="text-gray-500 text-sm font-medium"><%= t(".add_member") %></span>- </button>- </div></div></div><% end %>diff --git a/app/views/transactions/_header.html.erb b/app/views/transactions/_header.html.erbindex 874f0d3f..6e47a265 100644--- a/app/views/transactions/_header.html.erb+++ b/app/views/transactions/_header.html.erb@@ -11,7 +11,7 @@</div><% end %>- <%= link_to new_import_path(enable_type_selector: true), class: "rounded-lg bg-gray-50 border border-gray-200 flex items-center gap-1 justify-center px-3 py-2", data: { turbo_frame: "modal" } do %>+ <%= link_to new_import_path(enable_type_selector: true), class: "btn btn--outline flex items-center gap-2", data: { turbo_frame: "modal" } do %><%= lucide_icon("download", class: "text-gray-500 w-4 h-4") %><p class="text-sm font-medium text-gray-900"><%= t(".import") %></p><% end %>diff --git a/app/views/transactions/searches/_form.html.erb b/app/views/transactions/searches/_form.html.erbindex 2cbccd63..84f628b3 100644--- a/app/views/transactions/searches/_form.html.erb+++ b/app/views/transactions/searches/_form.html.erb@@ -15,7 +15,7 @@</div></div><div data-controller="menu" class="relative">- <button id="transaction-filters-button" data-menu-target="button" type="button" class="border border-gray-200 block h-full rounded-lg flex items-center gap-2 px-4">+ <button id="transaction-filters-button" data-menu-target="button" type="button" class="btn btn--outline flex items-center gap-2"><%= lucide_icon("list-filter", class: "w-5 h-5 text-gray-500") %><p class="text-sm font-medium text-gray-900">Filter</p></button>diff --git a/app/views/transactions/searches/_menu.html.erb b/app/views/transactions/searches/_menu.html.erbindex d474ca55..a42840ef 100644--- a/app/views/transactions/searches/_menu.html.erb+++ b/app/views/transactions/searches/_menu.html.erb@@ -33,7 +33,7 @@<div class="flex justify-between items-center gap-2 bg-white p-3"><div><% if @q.present? %>- <%= link_to t(".clear_filters"), transactions_path, class: "text-sm underline text-gray-500" %>+ <%= link_to t(".clear_filters"), transactions_path, class: "btn btn--ghost" %><% end %></div>diff --git a/config/locales/views/settings/en.yml b/config/locales/views/settings/en.ymlindex 700ec20a..e4bbb1bb 100644--- a/config/locales/views/settings/en.yml+++ b/config/locales/views/settings/en.yml@@ -34,8 +34,8 @@ en:password_placeholder: "*******"port: Portport_placeholder: 587- send_test_email: Send Test Email- send_test_email_button: Send Test Email+ send_test_email: Send test email+ send_test_email_button: Send test emailsend_test_email_description: Verify SMTP settings by sending a test emailtitle: SMTP Email Configurationusername: Username@@ -62,6 +62,7 @@ en:feedback_label: Feedbackgeneral_section_title: Generalimports_label: Imports+ logout: Logoutmerchants_label: Merchantsother_section_title: Morepreferences_label: Preferences@@ -89,13 +90,12 @@ en:destroy:success: Account deleted successfully.show:- add_member: Add Memberconfirm_delete:body: Are you sure you want to permanently delete your account? This actionis irreversible.title: Delete account?danger_zone_title: Danger Zone- delete_account: Delete Account+ delete_account: Delete accountdelete_account_warning: Deleting your account will permanently remove allyour data and cannot be undone.household_form_input_placeholder: Enter household name