mirror of https://github.com/iv-org/invidious.git
Mark deleted channels in /subscription_manager
This commit is contained in:
parent
bc9d70109c
commit
7557ffcda1
|
@ -28,6 +28,10 @@ body {
|
||||||
color: rgba(35, 35, 35, 1);
|
color: rgba(35, 35, 35, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pure-form input[type="file"] {
|
||||||
|
color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar > .searchbar input {
|
.navbar > .searchbar input {
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
.deleted {
|
||||||
|
background-color: rgb(255, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
.channel-owner {
|
.channel-owner {
|
||||||
background-color: #008bec;
|
background-color: #008bec;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
|
@ -1583,14 +1583,7 @@ post "/data_control" do |env|
|
||||||
user.subscriptions += body["subscriptions"].as_a.map { |a| a.as_s }
|
user.subscriptions += body["subscriptions"].as_a.map { |a| a.as_s }
|
||||||
user.subscriptions.uniq!
|
user.subscriptions.uniq!
|
||||||
|
|
||||||
user.subscriptions.select! do |ucid|
|
user.subscriptions = get_batch_channels(user.subscriptions, PG_DB, false, false)
|
||||||
begin
|
|
||||||
get_channel(ucid, PG_DB, false, false)
|
|
||||||
true
|
|
||||||
rescue ex
|
|
||||||
false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
PG_DB.exec("UPDATE users SET subscriptions = $1 WHERE email = $2", user.subscriptions, user.email)
|
PG_DB.exec("UPDATE users SET subscriptions = $1 WHERE email = $2", user.subscriptions, user.email)
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
|
|
||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
<div class="pure-u-1-3">
|
<div class="pure-u-1-3">
|
||||||
<h3><%= translate(locale, "`x` subscriptions", %(<span id="count">#{subscriptions.size}</span>)) %></h3>
|
<h3>
|
||||||
|
<a href="/feed/subscriptions"><%= translate(locale, "`x` subscriptions", %(<span id="count">#{subscriptions.size}</span>)) %></a>
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-3" style="text-align:center;">
|
<div class="pure-u-1-3" style="text-align:center;">
|
||||||
<h3>
|
<h3>
|
||||||
|
@ -20,15 +22,15 @@
|
||||||
|
|
||||||
<% subscriptions.each do |channel| %>
|
<% subscriptions.each do |channel| %>
|
||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
<div class="pure-g">
|
<div class="pure-g<% if channel.deleted %> deleted <% end%>">
|
||||||
<div class="pure-u-2-5">
|
<div class="pure-u-2-5">
|
||||||
<h3>
|
<h3 style="padding-left: 0.5em">
|
||||||
<a href="/channel/<%= channel.id %>"><%= channel.author %></a>
|
<a href="/channel/<%= channel.id %>"><%= channel.author %></a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-2-5"></div>
|
<div class="pure-u-2-5"></div>
|
||||||
<div class="pure-u-1-5" style="text-align: right;">
|
<div class="pure-u-1-5" style="text-align: right;">
|
||||||
<h3>
|
<h3 style="padding-right: 0.5em">
|
||||||
<a onclick="remove_subscription(this)"
|
<a onclick="remove_subscription(this)"
|
||||||
data-id="<%= channel.id %>"
|
data-id="<%= channel.id %>"
|
||||||
onmouseenter='this["href"]="javascript:void(0)"'
|
onmouseenter='this["href"]="javascript:void(0)"'
|
||||||
|
|
Loading…
Reference in New Issue