2018-03-25 03:38:35 +00:00
|
|
|
<% content_for "header" do %>
|
2018-12-20 21:32:09 +00:00
|
|
|
<title><%= translate(locale, "Subscriptions") %> - Invidious</title>
|
2019-03-07 19:34:33 +00:00
|
|
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/private?token=<%= token %>" />
|
2018-03-25 03:38:35 +00:00
|
|
|
<% end %>
|
|
|
|
|
2019-02-24 17:51:33 +00:00
|
|
|
<%= rendered "components/feed_menu" %>
|
|
|
|
|
2018-07-29 14:47:32 +00:00
|
|
|
<div class="pure-g h-box">
|
2018-12-20 17:05:54 +00:00
|
|
|
<div class="pure-u-1-3">
|
2018-07-20 16:19:49 +00:00
|
|
|
<h3>
|
2018-12-20 21:32:09 +00:00
|
|
|
<a href="/subscription_manager"><%= translate(locale, "Manage subscriptions") %></a>
|
2018-07-20 16:19:49 +00:00
|
|
|
</h3>
|
|
|
|
</div>
|
2019-05-02 01:03:39 +00:00
|
|
|
<div class="pure-u-1-3" style="text-align:center">
|
2018-12-20 17:05:54 +00:00
|
|
|
<h3>
|
2018-12-20 21:32:09 +00:00
|
|
|
<a href="/feed/history"><%= translate(locale, "Watch history") %></a>
|
2018-12-20 17:05:54 +00:00
|
|
|
</h3>
|
|
|
|
</div>
|
2019-05-02 01:03:39 +00:00
|
|
|
<div class="pure-u-1-3" style="text-align:right">
|
2018-07-20 16:19:49 +00:00
|
|
|
<h3>
|
2019-03-07 19:34:33 +00:00
|
|
|
<a href="/feed/private?token=<%= token %>"><i class="icon ion-logo-rss"></i></a>
|
2018-07-20 16:19:49 +00:00
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-06 00:48:55 +00:00
|
|
|
|
2019-05-02 01:03:39 +00:00
|
|
|
<center>
|
|
|
|
<%= translate(locale, "`x` unseen notifications", "#{notifications.size}") %>
|
|
|
|
</center>
|
2018-08-30 21:52:29 +00:00
|
|
|
|
|
|
|
<% if !notifications.empty? %>
|
2019-05-02 01:03:39 +00:00
|
|
|
<div class="h-box">
|
|
|
|
<hr>
|
|
|
|
</div>
|
2018-08-30 21:52:29 +00:00
|
|
|
<% end %>
|
|
|
|
|
2018-11-20 00:43:06 +00:00
|
|
|
<div class="pure-g">
|
2019-05-02 01:03:39 +00:00
|
|
|
<% notifications.each_slice(4) do |slice| %>
|
|
|
|
<% slice.each do |item| %>
|
|
|
|
<%= rendered "components/item" %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2018-11-20 00:43:06 +00:00
|
|
|
</div>
|
2018-08-06 18:49:52 +00:00
|
|
|
|
|
|
|
<div class="h-box">
|
|
|
|
<hr>
|
|
|
|
</div>
|
2018-05-08 02:57:47 +00:00
|
|
|
|
2018-11-20 00:43:06 +00:00
|
|
|
<div class="pure-g">
|
2019-05-02 01:03:39 +00:00
|
|
|
<% videos.each_slice(4) do |slice| %>
|
|
|
|
<% slice.each do |item| %>
|
|
|
|
<%= rendered "components/item" %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2018-11-20 00:43:06 +00:00
|
|
|
</div>
|
2018-03-25 03:38:35 +00:00
|
|
|
|
2018-11-20 04:06:59 +00:00
|
|
|
<script>
|
|
|
|
function mark_watched(target) {
|
2019-04-16 04:23:40 +00:00
|
|
|
var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode;
|
2019-05-02 01:03:39 +00:00
|
|
|
tile.style.display = 'none';
|
2018-11-20 04:06:59 +00:00
|
|
|
|
2019-05-02 01:03:39 +00:00
|
|
|
var url = '/watch_ajax?action_mark_watched=1&redirect=false' +
|
|
|
|
'&id=' + target.getAttribute('data-id');
|
2018-11-20 04:06:59 +00:00
|
|
|
var xhr = new XMLHttpRequest();
|
2019-05-02 01:03:39 +00:00
|
|
|
xhr.responseType = 'json';
|
2018-11-20 04:06:59 +00:00
|
|
|
xhr.timeout = 20000;
|
2019-05-02 01:03:39 +00:00
|
|
|
xhr.open('POST', url, true);
|
|
|
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
|
|
xhr.send('csrf_token=<%= URI.escape(env.get?("csrf_token").try &.as(String) || "") %>');
|
2018-11-20 04:06:59 +00:00
|
|
|
|
|
|
|
xhr.onreadystatechange = function() {
|
|
|
|
if (xhr.readyState == 4) {
|
|
|
|
if (xhr.status != 200) {
|
2019-05-02 01:03:39 +00:00
|
|
|
tile.style.display = '';
|
2018-11-20 04:06:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2019-03-01 22:47:06 +00:00
|
|
|
<div class="pure-g h-box">
|
2019-04-14 22:04:52 +00:00
|
|
|
<div class="pure-u-1 pure-u-lg-1-5">
|
2019-05-02 01:03:39 +00:00
|
|
|
<% if page >= 2 %>
|
|
|
|
<a href="/feed/subscriptions?max_results=<%= max_results %>&page=<%= page - 1 %>">
|
|
|
|
<%= translate(locale, "Previous page") %>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
2018-03-25 03:38:35 +00:00
|
|
|
</div>
|
2019-04-14 22:04:52 +00:00
|
|
|
<div class="pure-u-1 pure-u-lg-3-5"></div>
|
2019-05-02 01:03:39 +00:00
|
|
|
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
|
2018-08-15 00:15:33 +00:00
|
|
|
<% if (videos.size + notifications.size) == max_results %>
|
2018-12-20 21:32:09 +00:00
|
|
|
<a href="/feed/subscriptions?max_results=<%= max_results %>&page=<%= page + 1 %>">
|
|
|
|
<%= translate(locale, "Next page") %>
|
|
|
|
</a>
|
2018-08-15 00:15:33 +00:00
|
|
|
<% end %>
|
2018-03-25 03:38:35 +00:00
|
|
|
</div>
|
2018-08-17 16:04:38 +00:00
|
|
|
</div>
|