From bce47964f6241ae56f61089d144b29eb9b5da6d3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 14 Mar 2019 14:05:36 +0100 Subject: Add video channel view --- .../app/+my-account/my-account-routing.module.ts | 12 ++++----- ...-account-video-playlist-elements.component.html | 31 ++++++++++++++++------ ...-account-video-playlist-elements.component.scss | 11 ++++++++ ...my-account-video-playlist-elements.component.ts | 6 ++++- .../my-account-video-playlists.component.html | 3 ++- .../my-account-video-playlists.component.scss | 3 ++- .../my-account-videos.component.html | 2 +- .../my-account-videos.component.scss | 4 +-- 8 files changed, 52 insertions(+), 20 deletions(-) (limited to 'client/src/app/+my-account') diff --git a/client/src/app/+my-account/my-account-routing.module.ts b/client/src/app/+my-account/my-account-routing.module.ts index 3f921b13f..07557a029 100644 --- a/client/src/app/+my-account/my-account-routing.module.ts +++ b/client/src/app/+my-account/my-account-routing.module.ts @@ -85,20 +85,20 @@ const myAccountRoutes: Routes = [ } }, { - path: 'video-playlists/:videoPlaylistId', - component: MyAccountVideoPlaylistElementsComponent, + path: 'video-playlists/create', + component: MyAccountVideoPlaylistCreateComponent, data: { meta: { - title: 'Playlist elements' + title: 'Create new playlist' } } }, { - path: 'video-playlists/create', - component: MyAccountVideoPlaylistCreateComponent, + path: 'video-playlists/:videoPlaylistId', + component: MyAccountVideoPlaylistElementsComponent, data: { meta: { - title: 'Create new playlist' + title: 'Playlist elements' } } }, diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.html b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.html index bc26e198e..95d4519fa 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.html +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.html @@ -1,11 +1,26 @@ -
No videos in this playlist.
+
-
-
- - +
+ +
+ +
+
No videos in this playlist.
+ +
+
+ + +
+
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.scss b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.scss index b05af0490..900669827 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.scss +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.scss @@ -2,6 +2,17 @@ @import '_mixins'; @import '_miniature'; +.playlist-info { + background-color: var(--submenuColor); + margin-left: -15px; + margin-top: -$sub-menu-margin-bottom; + + padding: $sub-menu-margin-bottom 0; + + display: flex; + justify-content: center; +} + // Thanks Angular CDK <3 https://material.angular.io/cdk/drag-drop/examples .cdk-drag-preview { box-sizing: border-box; diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts index dcf470be3..25d51d2cb 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts @@ -24,7 +24,7 @@ export class MyAccountVideoPlaylistElementsComponent implements OnInit, OnDestro pagination: ComponentPagination = { currentPage: 1, - itemsPerPage: 10, + itemsPerPage: 30, totalItems: null } @@ -123,6 +123,10 @@ export class MyAccountVideoPlaylistElementsComponent implements OnInit, OnDestro this.loadElements() } + trackByFn (index: number, elem: Video) { + return elem.id + } + private loadElements () { this.videoService.getPlaylistVideos(this.videoPlaylistId, this.pagination) .subscribe(({ totalVideos, videos }) => { diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html index 7d1bed12a..322560673 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html @@ -8,7 +8,8 @@
- +
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.scss b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.scss index 88fba5b05..f648c33e4 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.scss +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.scss @@ -20,8 +20,9 @@ /deep/ .miniature { display: flex; - .miniature-bottom { + .miniature-info { margin-left: 10px; + width: auto; } } } diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html index 69748ef37..b09e845ac 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html @@ -17,7 +17,7 @@
{{ video.name }} {{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views -
{{ video.privacy.label }}{{ getStateLabel(video) }}
+
{{ video.privacy.label }}{{ getStateLabel(video) }}
Blacklisted {{ video.blacklistedReason }} diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss index 39d0cf2f7..f6b5faa45 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss @@ -64,11 +64,11 @@ } .video-info-date-views, - .video-info-private, + .video-info-privacy, .video-info-blacklisted { font-size: 13px; - &.video-info-private, + &.video-info-privacy, &.video-info-blacklisted .blacklisted-label { font-weight: $font-semibold; } -- cgit v1.2.3