From fddca10b6bc00bd252013725c5bd925b3b77be32 Mon Sep 17 00:00:00 2001 From: syeopite Date: Sat, 26 Jun 2021 21:24:07 -0700 Subject: [PATCH] Small download refactoring. See commit message Wrap download widget around details box Remove ability to disable dl on only certain vids --- src/invidious/helpers/helpers.cr | 1 - src/invidious/views/watch.ecr | 71 ++++++++++++++++++-------------- 2 files changed, 39 insertions(+), 33 deletions(-) diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index f9cffa3b..d67b395e 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -92,7 +92,6 @@ class Config property admins : Array(String) = [] of String property external_port : Int32? = nil property default_user_preferences : ConfigPreferences = ConfigPreferences.from_yaml("") - property dmca_content : Array(String) = [] of String # For compliance with DMCA, disables download widget using list of video IDs property check_tables : Bool = false # Check table integrity, automatically try to add any missing columns, create tables, etc. property cache_annotations : Bool = false # Cache annotations requested from IA, will not cache empty annotations or annotations that only contain cards property banner : String? = nil # Optional banner to be displayed along top of page for announcements, etc. diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 97f0e6f3..418f85c5 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -161,40 +161,47 @@ we're going to need to do it here in order to allow for translations. <% end %> <% end %> - <% if CONFIG.dmca_content.includes?(video.id) || CONFIG.disabled?("downloads") %> -

<%= translate(locale, "Download is disabled.") %>

+ <% if CONFIG.disabled?("downloads") %> <% else %> -
-
- - -
+
+ +

+ + <%= translate(locale, "Download") %> +

+
- - +
+
+ +
+ + +
+
<% end %>

<%= number_with_separator(video.views) %>