From 5a23d523a840a186150cc5b08d5f60463bfad501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Mon, 29 Jan 2024 18:32:29 +0200 Subject: [PATCH] Add fallback icons for apps on RS app dashboard --- app/components/rs_auth_component.html.erb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/components/rs_auth_component.html.erb b/app/components/rs_auth_component.html.erb index 8a40970..18ffcc8 100644 --- a/app/components/rs_auth_component.html.erb +++ b/app/components/rs_auth_component.html.erb @@ -1,6 +1,12 @@
+ <% if @web_app.icon.attached? %> <%= image_tag s3_image_url(@web_app.icon), class: "h-full w-full" %> + <% elsif @web_app.apple_touch_icon.attached? %> + <%= image_tag s3_image_url(@web_app.apple_touch_icon), class: "h-full w-full" %> + <% else %> + <%= render partial: "icons/remotestorage", locals: { custom_class: "h-full w-full p-0.5 text-gray-200" } %> + <% end %>