feat(views): Add icon for embed youtube video on thumbnails
All checks were successful
Invidious CI / build (push) Successful in 5m15s

This commit is contained in:
Fijxu 2025-01-21 17:21:23 -03:00
parent 842473dd37
commit 7d02c1827a
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4
2 changed files with 6 additions and 0 deletions

View file

@ -103,12 +103,15 @@
if item.is_a?(PlaylistVideo)
link_url = "/watch?v=#{item.id}&list=#{item.plid}&index=#{item.index}"
endpoint_params = "?v=#{item.id}&list=#{item.plid}"
embed_id = item.id
elsif item.is_a?(MixVideo)
link_url = "/watch?v=#{item.id}&list=#{item.rdid}"
endpoint_params = "?v=#{item.id}&list=#{item.rdid}"
embed_id = item.id
else
link_url = "/watch?v=#{item.id}"
endpoint_params = "?v=#{item.id}"
embed_id = item.id
end
-%>

View file

@ -1,5 +1,8 @@
<div class="flex-right flexible">
<div class="icon-buttons">
<a title="<%=translate(locale, "videoinfo_youTube_embed_link")%>" rel="noreferrer noopener" href="https://www.youtube.com/embed/<%=embed_id%>">
<i class="icon ion-md-open"></i>
</a>
<a title="<%=translate(locale, "videoinfo_watch_on_youTube")%>" rel="noreferrer noopener" href="https://www.youtube.com/watch<%=endpoint_params%>">
<i class="icon ion-logo-youtube"></i>
</a>