mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 05:25:24 +02:00
* Add lookbook + viewcomponent, organize design system file * Build menu component * Button updates * More button fixes * Replace all menus with new ViewComponent * Checkpoint: fix tests, all buttons and menus converted * Split into Link and Button components for clarity * Button cleanup * Simplify custom confirmation configuration in views * Finalize button, link component API * Add toggle field to custom form builder + Component * Basic tabs component * Custom tabs, convert all menu / tab instances in app * Gem updates * Centralized icon helper * Update all icon usage to central helper * Lint fixes * Centralize all disclosure instances * Dialog replacements * Consolidation of all dialog styles * Test fixes * Fix app layout issues, move to component with slots * Layout simplification * Flakey test fix * Fix dashboard mobile issues * Finalize homepage * Lint fixes * Fix shadows and borders in dark mode * Fix tests * Remove stale class * Fix filled icon logic * Move transparent? to public interface
44 lines
1.8 KiB
Text
44 lines
1.8 KiB
Text
<%# locals: (account:, return_to: nil) %>
|
|
|
|
<%= turbo_frame_tag dom_id(account) do %>
|
|
<div class="p-4 flex items-center justify-between gap-3 group/account">
|
|
<div class="flex items-center gap-3">
|
|
<%= render "accounts/logo", account: account, size: "md" %>
|
|
|
|
<div>
|
|
<% if account.scheduled_for_deletion? %>
|
|
<p class="text-sm font-medium text-primary">
|
|
<span>
|
|
<%= account.name %>
|
|
</span>
|
|
<span class="text-red-500 animate-pulse">
|
|
(deletion in progress...)
|
|
</span>
|
|
</p>
|
|
<% else %>
|
|
<%= link_to account.name, account, class: [(account.is_active ? "text-primary" : "text-subdued"), "text-sm font-medium hover:underline"], data: { turbo_frame: "_top" } %>
|
|
<% if account.long_subtype_label %>
|
|
<p class="text-sm text-secondary truncate"><%= account.long_subtype_label %></p>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% unless account.scheduled_for_deletion? %>
|
|
<%= link_to edit_account_path(account, return_to: return_to), data: { turbo_frame: :modal }, class: "group-hover/account:flex hidden hover:opacity-80 items-center justify-center" do %>
|
|
<%= icon("pencil-line", size: "sm") %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
<div class="flex items-center gap-8">
|
|
<p class="text-sm font-medium <%= account.is_active ? "text-primary" : "text-subdued" %>">
|
|
<%= format_money account.balance_money %>
|
|
</p>
|
|
|
|
<% unless account.scheduled_for_deletion? %>
|
|
<%= styled_form_with model: account, data: { turbo_frame: "_top", controller: "auto-submit-form" } do |f| %>
|
|
<%= f.toggle :is_active, { data: { auto_submit_form_target: "auto" } } %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|