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) user = user.as(User)
sid = sid.as(String) sid = sid.as(String)
preferences = user.preferences preferences = user.preferences
token = user.token
if preferences.unseen_only if preferences.unseen_only
env.set "show_watched", true env.set "show_watched", true

View File

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

View File

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