From c9016f446d57f030d11f4bf997d4ef4b27ba00fd Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Sat, 22 Aug 2020 18:55:24 -0400 Subject: [PATCH] Ghosting colors for loading videos is now customizable in an internal config, allowing dark mode to have different colors for the ghosting --- .../components/recent-videos/recent-videos.component.html | 2 +- .../unified-file-card/unified-file-card.component.html | 6 +++--- .../unified-file-card/unified-file-card.component.ts | 1 + src/themes.ts | 6 ++++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/app/components/recent-videos/recent-videos.component.html b/src/app/components/recent-videos/recent-videos.component.html index 3397a4f..52ad566 100644 --- a/src/app/components/recent-videos/recent-videos.component.html +++ b/src/app/components/recent-videos/recent-videos.component.html @@ -37,7 +37,7 @@
- +
diff --git a/src/app/components/unified-file-card/unified-file-card.component.html b/src/app/components/unified-file-card/unified-file-card.component.html index 8b54e7c..27a1b37 100644 --- a/src/app/components/unified-file-card/unified-file-card.component.html +++ b/src/app/components/unified-file-card/unified-file-card.component.html @@ -1,6 +1,6 @@
{{(file_obj.type === 'audio' || file_obj.isAudio) ? 'audiotrack' : 'movie'}}  {{file_obj.registered | date:'shortDate'}}
-
+
@@ -38,11 +38,11 @@
- +
{{card_size === 'large' && file_obj.uploader ? file_obj.uploader + ' - ' : ''}}{{!is_playlist ? file_obj.title : file_obj.name}} - + diff --git a/src/app/components/unified-file-card/unified-file-card.component.ts b/src/app/components/unified-file-card/unified-file-card.component.ts index 5ab6f04..aa4166d 100644 --- a/src/app/components/unified-file-card/unified-file-card.component.ts +++ b/src/app/components/unified-file-card/unified-file-card.component.ts @@ -17,6 +17,7 @@ export class UnifiedFileCardComponent implements OnInit { elevated = false; @Input() loading = true; + @Input() theme = null; @Input() file_obj = null; @Input() card_size = 'medium'; @Input() use_youtubedl_archive = false; diff --git a/src/themes.ts b/src/themes.ts index 102128f..cfe2590 100644 --- a/src/themes.ts +++ b/src/themes.ts @@ -3,6 +3,8 @@ const THEMES_CONFIG = { 'key': 'default', 'background_color': 'ghostwhite', 'alternate_color': 'gray', + 'ghost_primary': '#f9f9f9', + 'ghost_secondary': '#ecebeb', 'css_label': 'default-theme', 'social_theme': 'material-light' }, @@ -10,12 +12,16 @@ const THEMES_CONFIG = { 'key': 'dark', 'background_color': '#141414', 'alternate_color': '#695959', + 'ghost_primary': '#444444', + 'ghost_secondary': '#141414', 'css_label': 'dark-theme', 'social_theme': 'material-dark' }, 'light': { 'key': 'light', 'background_color': 'white', + 'ghost_primary': '#f9f9f9', + 'ghost_secondary': '#ecebeb', 'css_label': 'light-theme', 'social_theme': 'material-light' }