Add RSS alternate to channel and subscription pages

This commit is contained in:
Omar Roth 2019-03-07 13:34:33 -06:00
parent 1d6c763e92
commit 10abcd519f
3 changed files with 4 additions and 1 deletions

View File

@ -1880,6 +1880,7 @@ get "/feed/subscriptions" do |env|
user = user.as(User)
sid = sid.as(String)
preferences = user.preferences
token = user.token
if preferences.unseen_only
env.set "show_watched", true

View File

@ -1,5 +1,6 @@
<% content_for "header" do %>
<title><%= author %> - Invidious</title>
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/channel/<%= ucid %>" />
<% end %>
<div class="pure-g h-box">

View File

@ -1,5 +1,6 @@
<% content_for "header" do %>
<title><%= translate(locale, "Subscriptions") %> - Invidious</title>
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/private?token=<%= token %>" />
<% end %>
<%= rendered "components/feed_menu" %>
@ -17,7 +18,7 @@
</div>
<div class="pure-u-1-3" style="text-align:right;">
<h3>
<a href="/feed/private?token=<%= user.token %>"><i class="icon ion-logo-rss"></i></a>
<a href="/feed/private?token=<%= token %>"><i class="icon ion-logo-rss"></i></a>
</h3>
</div>
</div>