2025-07-18 05:52:18 -04:00
|
|
|
<%# locals: (account:, title:, subtitle: nil) %>
|
2024-11-04 20:27:31 -05:00
|
|
|
|
|
|
|
<header class="space-y-4">
|
|
|
|
<div class="flex items-center gap-4">
|
2025-07-18 05:52:18 -04:00
|
|
|
<div class="flex items-center gap-3 overflow-hidden">
|
|
|
|
<%= render "accounts/logo", account: account %>
|
2024-11-04 20:27:31 -05:00
|
|
|
|
2025-07-18 05:52:18 -04:00
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
<div class="truncate">
|
|
|
|
<div class="flex items-center gap-3">
|
|
|
|
<h2 class="font-medium text-xl truncate <%= "animate-pulse" if account.syncing? %>"><%= title %></h2>
|
|
|
|
<% if account.draft? %>
|
|
|
|
<%= render LinkComponent.new(
|
2025-07-03 09:33:07 -04:00
|
|
|
text: "Complete setup",
|
|
|
|
href: edit_account_path(account),
|
|
|
|
variant: :outline,
|
|
|
|
size: :sm,
|
|
|
|
frame: :modal
|
|
|
|
) %>
|
2025-06-10 18:20:06 -04:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2025-07-18 05:52:18 -04:00
|
|
|
<% if subtitle.present? %>
|
|
|
|
<p class="text-sm text-secondary"><%= subtitle %></p>
|
|
|
|
<% end %>
|
2024-11-04 20:27:31 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2025-07-18 05:52:18 -04:00
|
|
|
</div>
|
2024-11-04 20:27:31 -05:00
|
|
|
|
2025-04-30 18:14:22 -04:00
|
|
|
<div class="flex items-center gap-1 ml-auto">
|
2025-06-09 11:35:59 -04:00
|
|
|
<% if Rails.env.development? || self_hosted? %>
|
2025-05-12 18:55:19 -04:00
|
|
|
<%= icon(
|
2025-04-30 18:14:22 -04:00
|
|
|
"refresh-cw",
|
|
|
|
as_button: true,
|
|
|
|
size: "sm",
|
2025-05-12 18:55:19 -04:00
|
|
|
href: account.linked? ? sync_plaid_item_path(account.plaid_account.plaid_item) : sync_account_path(account),
|
2025-04-30 18:14:22 -04:00
|
|
|
disabled: account.syncing?,
|
|
|
|
frame: :_top
|
|
|
|
) %>
|
2024-11-04 20:27:31 -05:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= render "accounts/show/menu", account: account %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</header>
|