From 7557ffcda1c06d5a87fddfff8b3935c8e98ccb23 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Wed, 6 Mar 2019 09:54:56 -0600 Subject: [PATCH] Mark deleted channels in /subscription_manager --- assets/css/darktheme.css | 4 ++++ assets/css/default.css | 4 ++++ src/invidious.cr | 9 +-------- src/invidious/views/subscription_manager.ecr | 10 ++++++---- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/assets/css/darktheme.css b/assets/css/darktheme.css index dce2cb91a..1b70956bb 100644 --- a/assets/css/darktheme.css +++ b/assets/css/darktheme.css @@ -28,6 +28,10 @@ body { color: rgba(35, 35, 35, 1); } +.pure-form input[type="file"] { + color: #f0f0f0; +} + .navbar > .searchbar input { background-color: inherit; color: inherit; diff --git a/assets/css/default.css b/assets/css/default.css index 85a8911ff..cc29e1efc 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -1,3 +1,7 @@ +.deleted { + background-color: rgb(255, 0, 0, 0.5); +} + .channel-owner { background-color: #008bec; color: #fff; diff --git a/src/invidious.cr b/src/invidious.cr index fa4f4a17a..bbf9b4c94 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1583,14 +1583,7 @@ post "/data_control" do |env| user.subscriptions += body["subscriptions"].as_a.map { |a| a.as_s } user.subscriptions.uniq! - user.subscriptions.select! do |ucid| - begin - get_channel(ucid, PG_DB, false, false) - true - rescue ex - false - end - end + user.subscriptions = get_batch_channels(user.subscriptions, PG_DB, false, false) PG_DB.exec("UPDATE users SET subscriptions = $1 WHERE email = $2", user.subscriptions, user.email) end diff --git a/src/invidious/views/subscription_manager.ecr b/src/invidious/views/subscription_manager.ecr index 3c0836eaa..0f9762f99 100644 --- a/src/invidious/views/subscription_manager.ecr +++ b/src/invidious/views/subscription_manager.ecr @@ -4,7 +4,9 @@
-

<%= translate(locale, "`x` subscriptions", %(#{subscriptions.size})) %>

+

+ <%= translate(locale, "`x` subscriptions", %(#{subscriptions.size})) %> +

@@ -20,15 +22,15 @@ <% subscriptions.each do |channel| %>
-