invidious-mod/src/invidious/views/subscriptions.ecr

90 行
2.4 KiB
Plaintext
Raw 通常表示 履歴

2018-03-25 12:38:35 +09:00
<% content_for "header" do %>
2018-12-21 06:32:09 +09:00
<title><%= translate(locale, "Subscriptions") %> - Invidious</title>
2018-03-25 12:38:35 +09:00
<% end %>
<div class="pure-g h-box">
<div class="pure-u-1-3">
2018-07-21 01:19:49 +09:00
<h3>
2018-12-21 06:32:09 +09:00
<a href="/subscription_manager"><%= translate(locale, "Manage subscriptions") %></a>
2018-07-21 01:19:49 +09:00
</h3>
</div>
<div class="pure-u-1-3" style="text-align:center;">
<h3>
2018-12-21 06:32:09 +09:00
<a href="/feed/history"><%= translate(locale, "Watch history") %></a>
</h3>
</div>
2018-07-25 09:34:49 +09:00
<div class="pure-u-1-3" style="text-align:right;">
2018-07-21 01:19:49 +09:00
<h3>
<a href="/feed/private?token=<%= user.token %>"><i class="icon ion-logo-rss"></i></a>
2018-07-21 01:19:49 +09:00
</h3>
</div>
</div>
2018-07-06 09:48:55 +09:00
2018-12-21 06:32:09 +09:00
<center><%= translate(locale, "`x` unseen notifications", "#{notifications.size}") %></center>
2018-08-31 06:52:29 +09:00
<% if !notifications.empty? %>
<div class="h-box">
<hr>
</div>
<% end %>
2018-11-20 09:43:06 +09:00
<div class="pure-g">
2018-08-07 03:48:02 +09:00
<% notifications.each_slice(4) do |slice| %>
<% slice.each do |item| %>
<%= rendered "components/item" %>
2018-08-07 03:48:02 +09:00
<% end %>
<% end %>
2018-11-20 09:43:06 +09:00
</div>
2018-08-07 03:49:52 +09:00
<div class="h-box">
<hr>
</div>
2018-11-20 09:43:06 +09:00
<div class="pure-g">
2018-03-25 12:38:35 +09:00
<% videos.each_slice(4) do |slice| %>
<% slice.each do |item| %>
<%= rendered "components/item" %>
2018-06-02 07:26:00 +09:00
<% end %>
2018-03-25 12:38:35 +09:00
<% end %>
2018-11-20 09:43:06 +09:00
</div>
2018-03-25 12:38:35 +09:00
<script>
function mark_watched(target) {
var tile = target.parentNode.parentNode.parentNode.parentNode;
tile.style.display = "none";
var url = "/mark_watched?redirect=false&id=" + target.getAttribute("data-id");
var xhr = new XMLHttpRequest();
xhr.responseType = "json";
xhr.timeout = 20000;
xhr.open("GET", url, true);
xhr.send();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status != 200) {
tile.style.display = "";
}
}
}
}
</script>
2018-03-25 12:38:35 +09:00
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-5">
<% if page >= 2 %>
2018-12-21 06:32:09 +09:00
<a href="/feed/subscriptions?max_results=<%= max_results %>&page=<%= page - 1 %>">
<%= translate(locale, "Previous page") %>
</a>
2018-03-25 12:38:35 +09:00
<% end %>
</div>
<div class="pure-u-1 pure-u-md-3-5"></div>
<div style="text-align:right;" class="pure-u-1 pure-u-md-1-5">
<% if (videos.size + notifications.size) == max_results %>
2018-12-21 06:32:09 +09:00
<a href="/feed/subscriptions?max_results=<%= max_results %>&page=<%= page + 1 %>">
<%= translate(locale, "Next page") %>
</a>
<% end %>
2018-03-25 12:38:35 +09:00
</div>
2018-08-18 01:04:38 +09:00
</div>