Implement a setting to retrieve high res logos (#725)

* Implement a setting to retrieve high res logos

* Update _brand_fetch_settings.html.erb

* Add fallback for stock tickers also to use Brandfetch

* Update security.rb

* Update toggle logic for high-res logos setting

Signed-off-by: Juan José Mata <jjmata@jjmata.com>

* Update security.rb

* Update security.rb

---------

Signed-off-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: Juan José Mata <jjmata@jjmata.com>
This commit is contained in:
soky srm
2026-01-21 17:16:51 +01:00
committed by GitHub
co-authored by Juan José Mata
parent ae61df4978
commit abab66675c
14 changed files with 84 additions and 17 deletions
@@ -39,4 +39,21 @@
disabled: ENV["BRAND_FETCH_CLIENT_ID"].present?,
data: { "auto-submit-form-target": "auto" } %>
<% end %>
<div class="flex items-center justify-between mt-4">
<div class="space-y-1">
<p class="text-sm"><%= t(".high_res_label") %></p>
<p class="text-secondary text-sm"><%= t(".high_res_description") %></p>
</div>
<%= styled_form_with model: Setting.new,
url: settings_hosting_path,
method: :patch,
data: { controller: "auto-submit-form", auto_submit_form_trigger_event_value: "change" } do |form| %>
<%= form.toggle :brand_fetch_high_res_logos,
checked: ENV["BRAND_FETCH_HIGH_RES_LOGOS"].present? ? ENV["BRAND_FETCH_HIGH_RES_LOGOS"] == "true" : Setting.brand_fetch_high_res_logos,
disabled: ENV["BRAND_FETCH_HIGH_RES_LOGOS"].present?,
data: { auto_submit_form_target: "auto" } %>
<% end %>
</div>
</div>