feat(errors): add embed link on error pages
All checks were successful
Invidious CI / build (push) Successful in 5m35s

Closes #73
This commit is contained in:
Fijxu 2025-01-20 23:52:40 -03:00
parent 43aa7e7303
commit 842473dd37
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4

View file

@ -180,6 +180,7 @@ def error_redirect_helper(env : HTTP::Server::Context)
next_steps_text = translate(locale, "next_steps_error_message") next_steps_text = translate(locale, "next_steps_error_message")
refresh = translate(locale, "next_steps_error_message_refresh") refresh = translate(locale, "next_steps_error_message_refresh")
go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube") go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube")
go_to_youtube_embed = translate(locale, "videoinfo_youTube_embed_link")
switch_instance = translate(locale, "Switch Invidious Instance") switch_instance = translate(locale, "Switch Invidious Instance")
return <<-END_HTML return <<-END_HTML
@ -193,6 +194,7 @@ def error_redirect_helper(env : HTTP::Server::Context)
</li> </li>
<li> <li>
<a rel="noreferrer noopener" href="https://youtube.com#{env.request.resource}">#{go_to_youtube}</a> <a rel="noreferrer noopener" href="https://youtube.com#{env.request.resource}">#{go_to_youtube}</a>
(<a rel="noreferrer noopener" href="https://youtube.com/embed/#{env.params.query["v"]}">#{go_to_youtube_embed}</a>)
</li> </li>
</ul> </ul>
END_HTML END_HTML