From 4beda9e12adc7b1f3b178cecd6863ebf3cf431f1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 19 Oct 2021 09:44:43 +0200 Subject: Add ability to view my followers --- .../my-subscriptions.component.html | 36 ---------- .../my-subscriptions.component.scss | 84 ---------------------- .../my-subscriptions/my-subscriptions.component.ts | 57 --------------- 3 files changed, 177 deletions(-) delete mode 100644 client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html delete mode 100644 client/src/app/+my-library/my-subscriptions/my-subscriptions.component.scss delete mode 100644 client/src/app/+my-library/my-subscriptions/my-subscriptions.component.ts (limited to 'client/src/app/+my-library/my-subscriptions') diff --git a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html deleted file mode 100644 index ca5ad794a..000000000 --- a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html +++ /dev/null @@ -1,36 +0,0 @@ -

- - - My subscriptions - {{ pagination.totalItems }} - -

- -
- -
- -
You don't have any subscription yet.
- -
- -
diff --git a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.scss b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.scss deleted file mode 100644 index edca06a66..000000000 --- a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.scss +++ /dev/null @@ -1,84 +0,0 @@ -@use '_variables' as *; -@use '_mixins' as *; - -input[type=text] { - @include peertube-input-text(300px); -} - -.video-channel { - @include row-blocks; - - > my-actor-avatar { - @include actor-avatar-size(80px); - - @include margin-right(10px); - } -} - -.video-channel-info { - flex-grow: 1; - - a.video-channel-names { - @include disable-default-a-behaviour; - - width: fit-content; - display: flex; - align-items: baseline; - color: pvar(--mainForegroundColor); - - .video-channel-display-name { - font-weight: $font-semibold; - font-size: 18px; - } - - .video-channel-name { - @include margin-left(5px); - - font-size: 14px; - color: $grey-actor-name; - } - } -} - -.actor-owner { - @include disable-default-a-behaviour; - - font-size: 13px; - color: pvar(--mainForegroundColor); - - span:hover { - opacity: 0.8; - } - - my-actor-avatar { - @include margin-left(7px); - display: inline-block; - vertical-align: top; - } -} - -.video-subscriptions-header { - margin-bottom: 30px; - display: flex; -} - -@media screen and (max-width: $small-view) { - .video-subscriptions-header input[type=text] { - width: 100% !important; - } - - .video-channel-info { - padding-bottom: 10px; - text-align: center; - - .video-channel-names { - flex-direction: column; - align-items: center !important; - margin: auto; - } - } - - img { - @include margin-right(0); - } -} diff --git a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.ts b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.ts deleted file mode 100644 index f676aa014..000000000 --- a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Subject } from 'rxjs' -import { Component } from '@angular/core' -import { ComponentPagination, Notifier } from '@app/core' -import { VideoChannel } from '@app/shared/shared-main' -import { UserSubscriptionService } from '@app/shared/shared-user-subscription' - -@Component({ - templateUrl: './my-subscriptions.component.html', - styleUrls: [ './my-subscriptions.component.scss' ] -}) -export class MySubscriptionsComponent { - videoChannels: VideoChannel[] = [] - - pagination: ComponentPagination = { - currentPage: 1, - itemsPerPage: 10, - totalItems: null - } - - onDataSubject = new Subject() - - search: string - - constructor ( - private userSubscriptionService: UserSubscriptionService, - private notifier: Notifier - ) {} - - onNearOfBottom () { - // Last page - if (this.pagination.totalItems <= (this.pagination.currentPage * this.pagination.itemsPerPage)) return - - this.pagination.currentPage += 1 - this.loadSubscriptions() - } - - onSearch (search: string) { - this.search = search - this.loadSubscriptions(false) - } - - private loadSubscriptions (more = true) { - this.userSubscriptionService.listSubscriptions({ pagination: this.pagination, search: this.search }) - .subscribe({ - next: res => { - this.videoChannels = more - ? this.videoChannels.concat(res.data) - : res.data - this.pagination.totalItems = res.total - - this.onDataSubject.next(res.data) - }, - - error: err => this.notifier.error(err.message) - }) - } -} -- cgit v1.2.3