add copy opml feed button - correct url

This commit is contained in:
robs 2024-12-13 17:24:46 +01:00
parent 08b77e942f
commit 13b4f086f8
2 changed files with 5 additions and 1 deletions

View file

@ -43,6 +43,10 @@ defmodule PinchflatWeb.Sources.SourceHTML do
url(conn, ~p"/sources/#{source.uuid}/feed") <> ".xml"
end
def opml_feed_url(conn) do
url(conn, ~p"/podcasts/opml") <> ".xml"
end
def output_path_template_override_placeholders(media_profiles) do
media_profiles
|> Enum.map(&{&1.id, &1.output_path_template})

View file

@ -3,7 +3,7 @@
<nav>
<.button color="bg-transparent" x-data="{ copied: false }" x-on:click={~s"
copyWithCallbacks(
`#{~p"/podcasts/opml"}`,
'#{opml_feed_url(@conn)}',
() => copied = true,
() => copied = false
)