From e39e8f3dba8f719ee3fdab89f0cb2d71ceaed629 Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Tue, 15 Dec 2020 01:11:15 -0500 Subject: [PATCH 1/3] Home page paginator no longer disappears for empty pages Paginator length fixed Updated styling on paginator Added new text if videos are not present on the home page (due to filter or no downloads in general) --- .../components/recent-videos/recent-videos.component.html | 5 ++++- .../components/recent-videos/recent-videos.component.scss | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/components/recent-videos/recent-videos.component.html b/src/app/components/recent-videos/recent-videos.component.html index f530163..ec4616c 100644 --- a/src/app/components/recent-videos/recent-videos.component.html +++ b/src/app/components/recent-videos/recent-videos.component.html @@ -34,6 +34,9 @@
+
+ No videos found. +
@@ -43,7 +46,7 @@
- diff --git a/src/app/components/recent-videos/recent-videos.component.scss b/src/app/components/recent-videos/recent-videos.component.scss index 5530225..49023ec 100644 --- a/src/app/components/recent-videos/recent-videos.component.scss +++ b/src/app/components/recent-videos/recent-videos.component.scss @@ -47,6 +47,10 @@ top: 10px; } +.paginator { + margin-top: 5px; +} + .my-videos-title { text-align: center; position: relative; From 43b0c2fb9e1b0c119510db2eb9f60071ae583082 Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Tue, 15 Dec 2020 17:19:15 -0500 Subject: [PATCH 2/3] Fixed bug that prevented subscription videos from being shown in the subscription page --- .../subscription-file-card.component.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/app/subscription/subscription-file-card/subscription-file-card.component.ts b/src/app/subscription/subscription-file-card/subscription-file-card.component.ts index c63a6f3..e500a7d 100644 --- a/src/app/subscription/subscription-file-card/subscription-file-card.component.ts +++ b/src/app/subscription/subscription-file-card/subscription-file-card.component.ts @@ -15,9 +15,6 @@ export class SubscriptionFileCardComponent implements OnInit { image_errored = false; image_loaded = false; - scrollSubject; - scrollAndLoad; - formattedDuration = null; @Input() file; @@ -27,13 +24,7 @@ export class SubscriptionFileCardComponent implements OnInit { @Output() goToFileEmit = new EventEmitter(); @Output() reloadSubscription = new EventEmitter(); - constructor(private snackBar: MatSnackBar, private postsService: PostsService, private dialog: MatDialog) { - this.scrollSubject = new Subject(); - this.scrollAndLoad = Observable.merge( - Observable.fromEvent(window, 'scroll'), - this.scrollSubject - ); - } + constructor(private snackBar: MatSnackBar, private postsService: PostsService, private dialog: MatDialog) {} ngOnInit() { if (this.file.duration) { @@ -45,10 +36,6 @@ export class SubscriptionFileCardComponent implements OnInit { this.image_errored = true; } - onHoverResponse() { - this.scrollSubject.next(); - } - imageLoaded(loaded) { this.image_loaded = true; } From ff8886d2e0d5d4a79eda95d8c468fadae02a140e Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Tue, 15 Dec 2020 17:20:04 -0500 Subject: [PATCH 3/3] Simplified rxjs imports on the home page and potentially removed an erroneous error --- src/app/main/main.component.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/app/main/main.component.ts b/src/app/main/main.component.ts index e6cfe48..013d0f3 100644 --- a/src/app/main/main.component.ts +++ b/src/app/main/main.component.ts @@ -1,19 +1,11 @@ import { Component, OnInit, ElementRef, ViewChild, ViewChildren, QueryList } from '@angular/core'; import {PostsService} from '../posts.services'; import {FileCardComponent} from '../file-card/file-card.component'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import {FormControl, Validators} from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { saveAs } from 'file-saver'; -import 'rxjs/add/observable/of'; -import 'rxjs/add/operator/mapTo'; -import 'rxjs/add/operator/toPromise'; -import 'rxjs/add/observable/fromEvent' -import 'rxjs/add/operator/filter' -import 'rxjs/add/operator/debounceTime' -import 'rxjs/add/operator/do' -import 'rxjs/add/operator/switch' import { YoutubeSearchService, Result } from '../youtube-search.service'; import { Router, ActivatedRoute } from '@angular/router'; import { CreatePlaylistComponent } from 'app/create-playlist/create-playlist.component';