2024-11-15 13:49:37 -05:00
|
|
|
<%# locals: (path:, link_token: nil) %>
|
2024-11-04 20:27:31 -05:00
|
|
|
|
|
|
|
<%= render layout: "accounts/new/container", locals: { title: t(".title"), back_path: new_account_path } do %>
|
|
|
|
<div class="text-sm">
|
|
|
|
<%= link_to path, class: "flex items-center gap-4 w-full text-center focus:outline-none focus:bg-gray-50 border border-transparent focus:border focus:border-gray-200 px-2 hover:bg-gray-50 rounded-lg p-2" do %>
|
|
|
|
<span class="flex w-8 h-8 shrink-0 grow-0 items-center justify-center rounded-lg bg-alpha-black-50 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.02)]">
|
|
|
|
<%= lucide_icon("keyboard", class: "text-gray-500 w-5 h-5") %>
|
|
|
|
</span>
|
|
|
|
<%= t("accounts.new.method_selector.manual_entry") %>
|
|
|
|
<% end %>
|
|
|
|
|
2024-11-15 13:49:37 -05:00
|
|
|
<% if link_token.present? %>
|
2025-01-31 12:13:58 -06:00
|
|
|
<%# Default US-only Link %>
|
2024-11-15 13:49:37 -05:00
|
|
|
<button data-controller="plaid" data-action="plaid#open modal#close" data-plaid-link-token-value="<%= @link_token %>" class="flex items-center gap-4 w-full text-center focus:outline-none focus:bg-gray-50 border border-transparent focus:border focus:border-gray-200 px-2 hover:bg-gray-50 rounded-lg p-2">
|
|
|
|
<span class="flex w-8 h-8 shrink-0 grow-0 items-center justify-center rounded-lg bg-alpha-black-50 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.02)]">
|
|
|
|
<%= lucide_icon("link-2", class: "text-gray-500 w-5 h-5") %>
|
|
|
|
</span>
|
2025-01-31 12:13:58 -06:00
|
|
|
<%= t(".connected_entry") %>
|
2024-11-15 13:49:37 -05:00
|
|
|
</button>
|
2025-01-31 12:13:58 -06:00
|
|
|
|
|
|
|
<%# EU Link %>
|
|
|
|
<% unless Current.family.country == "US" %>
|
|
|
|
<button data-controller="plaid" data-action="plaid#open modal#close" data-plaid-link-token-value="<%= Current.family.get_link_token(webhooks_url: webhooks_plaid_url, redirect_url: accounts_url, accountable_type: accountable_type.name, region: :eu) %>" class="flex items-center gap-4 w-full text-center focus:outline-none focus:bg-gray-50 border border-transparent focus:border focus:border-gray-200 px-2 hover:bg-gray-50 rounded-lg p-2">
|
|
|
|
<span class="flex w-8 h-8 shrink-0 grow-0 items-center justify-center rounded-lg bg-alpha-black-50 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.02)]">
|
|
|
|
<%= lucide_icon("link-2", class: "text-gray-500 w-5 h-5") %>
|
|
|
|
</span>
|
|
|
|
<%= t(".connected_entry_eu") %>
|
|
|
|
</button>
|
|
|
|
<% end %>
|
2024-11-15 13:49:37 -05:00
|
|
|
<% end %>
|
2024-11-04 20:27:31 -05:00
|
|
|
</div>
|
|
|
|
<% end %>
|