From 4278710d5b48546709720fac46657b84bba52a18 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 Jul 2018 11:40:04 +0200 Subject: Add ability to click on category/licence/language/tags in watch page --- .../videos/+video-watch/video-watch.component.html | 58 ++++++++++------------ .../videos/+video-watch/video-watch.component.scss | 17 +++++++ .../videos/+video-watch/video-watch.component.ts | 2 +- 3 files changed, 44 insertions(+), 33 deletions(-) (limited to 'client/src/app/videos/+video-watch') diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index e7e9f367c..8764d38c7 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html @@ -135,49 +135,43 @@
- - Privacy - - - {{ video.privacy.label }} - + Privacy + {{ video.privacy.label }}
- - Category - - - {{ video.category.label }} - + Category + {{ video.category.label }} + {{ video.category.label }}
- - Licence - - - {{ video.licence.label }} - + Licence + {{ video.licence.label }} + {{ video.licence.label }}
- - Language - - - {{ video.language.label }} - + Language + {{ video.language.label }} + {{ video.language.label }}
-
- - Tags - - - - {{ getVideoTags() }} - +
+ Tags + {{ tag }}
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index a2d56bd39..7bc2cae02 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss @@ -306,6 +306,23 @@ color: #585858; font-weight: $font-bold; } + + a.video-attribute-value { + @include disable-default-a-behaviour; + color: #000; + + &:hover { + opacity: 0.9; + } + } + + &.video-attribute-tags { + .video-attribute-value:not(:nth-child(2)) { + &::before { + content: ', ' + } + } + } } } diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index ff8baaeb3..afbb0c596 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -252,7 +252,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { getVideoTags () { if (!this.video || Array.isArray(this.video.tags) === false) return [] - return this.video.tags.join(', ') + return this.video.tags } isVideoRemovable () { -- cgit v1.2.3