diff --git a/lib/music_library/online_store_templates.ex b/lib/music_library/online_store_templates.ex index d7509f2c..65592916 100644 --- a/lib/music_library/online_store_templates.ex +++ b/lib/music_library/online_store_templates.ex @@ -75,4 +75,9 @@ defmodule MusicLibrary.OnlineStoreTemplates do |> String.replace("{title}", URI.encode_www_form(record.title)) |> String.replace("{format}", URI.encode_www_form(format_string)) end + + def favicon_url(template) do + uri = URI.parse(template.url_template) + "https://www.google.com/s2/favicons?domain=#{uri.host}&sz=16" + end end diff --git a/lib/music_library_web/live/online_store_template_live/index.html.heex b/lib/music_library_web/live/online_store_template_live/index.html.heex index 3963d5d3..cae1c96b 100644 --- a/lib/music_library_web/live/online_store_template_live/index.html.heex +++ b/lib/music_library_web/live/online_store_template_live/index.html.heex @@ -29,7 +29,12 @@ class="flex items-center justify-between py-5" >
-
+
+ {template.name}

{template.name}

diff --git a/lib/music_library_web/live/wishlist_live/show.html.heex b/lib/music_library_web/live/wishlist_live/show.html.heex index 30da7991..febdfeff 100644 --- a/lib/music_library_web/live/wishlist_live/show.html.heex +++ b/lib/music_library_web/live/wishlist_live/show.html.heex @@ -281,7 +281,13 @@ :for={template <- @online_store_templates} class="flex items-center justify-between py-2 px-3 bg-gray-50 dark:bg-gray-800 rounded-lg" > - + {template.name} + {template.name} <.button