1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 05:25:24 +02:00

Add trends to sidebar account list (#697)

This commit is contained in:
Josh Brown 2024-04-29 14:56:38 +01:00 committed by GitHub
parent 93953499a6
commit 7f491f5064
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 87 additions and 28 deletions

View file

@ -72,19 +72,23 @@
</ul>
</nav>
<div class="flex flex-col mt-6">
<div class="flex items-center justify-between">
<%= link_to accounts_path, class: "text-xs uppercase text-gray-500 font-bold tracking-wide" do %>
<%= t(".accounts") %>
<% end %>
<div class="flex items-center justify-between px-3 py-2 mb-2">
<div class="flex items-center gap-2 text-xs uppercase text-gray-500">
<%= link_to accounts_path, class: "text-xs uppercase text-gray-500 font-bold tracking-wide" do %>
<%= t(".portfolio") %>
<% end %>
<span class="font-bold tracking-wide">&bull;</span>
<%= form_with url: list_accounts_path, method: :get, class: "flex items-center gap-4", data: { controller: "auto-submit-form", turbo_frame: "account-list" } do %>
<%= render partial: "shared/period_select", locals: { button_class: "flex items-center gap-1 w-full cursor-pointer font-bold tracking-wide" } %>
<% end %>
</div>
<%= link_to new_account_path, class: "block hover:bg-gray-100 p-2 text-sm font-semibold text-gray-900 flex items-center rounded", title: t(".new_account"), data: { turbo_frame: "modal" } do %>
<%= lucide_icon("plus", class: "w-5 h-5 text-gray-500") %>
<% end %>
</div>
<%= link_to new_account_path, class: "flex items-center gap-4 px-2 py-3 mb-1 text-gray-500 text-sm font-medium rounded-[10px] hover:bg-gray-100", data: { turbo_frame: "modal" } do %>
<%= lucide_icon("plus", class: "w-5 h-5") %>
<p><%= t(".new_account") %></p>
<% end %>
<% account_groups.each do |group| %>
<%= render "accounts/account_list", group: group %>
<% end %>
<turbo-frame id="account-list" target="_top">
<% account_groups.each do |group| %>
<%= render "accounts/account_list", group: group %>
<% end %>
</turbo-frame>
</div>

View file

@ -26,7 +26,7 @@
<div id="notification-tray" class="fixed z-50 space-y-1 top-6 right-6"></div>
<%= safe_join(flash.map { |type, message| notification(message, type: type) }) %>
<div class="flex h-full">
<div class="p-6 pb-20 w-80 shrink-0 h-full overflow-y-auto">
<div class="p-6 pb-20 w-[368px] shrink-0 h-full overflow-y-auto">
<% if content_for?(:sidebar) %>
<%= yield :sidebar %>
<% else %>