mirror of
https://github.com/we-promise/sure.git
synced 2026-04-28 00:14:23 +00:00
* feat: Add Brand Fetch logo link for logos * docs: brand fetch integration docs * Document CLIENT_ID location? Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Juan José Mata <jjmata@jjmata.com> --------- Signed-off-by: Juan José Mata <jjmata@jjmata.com> Co-authored-by: Vincent Teo <vinteo@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
17 lines
774 B
Plaintext
17 lines
774 B
Plaintext
<%# locals: (account:, size: "md", color: nil) %>
|
|
|
|
<% size_classes = {
|
|
"sm" => "w-6 h-6",
|
|
"md" => "w-9 h-9",
|
|
"lg" => "w-10 h-10",
|
|
"full" => "w-full h-full"
|
|
} %>
|
|
|
|
<% if account.plaid_account_id? && account.institution_domain.present? && Setting.brand_fetch_client_id.present? %>
|
|
<%= image_tag "https://cdn.brandfetch.io/#{account.institution_domain}/icon/fallback/lettermark/w/40/h/40?c=#{Setting.brand_fetch_client_id}", class: "shrink-0 rounded-full #{size_classes[size]}" %>
|
|
<% elsif account.logo.attached? %>
|
|
<%= image_tag account.logo, class: "shrink-0 rounded-full #{size_classes[size]}" %>
|
|
<% else %>
|
|
<%= render DS::FilledIcon.new(variant: :text, hex_color: color || account.accountable.color, text: account.name, size: size, rounded: true) %>
|
|
<% end %>
|