diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-02-26 19:59:51 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-02-26 20:01:26 +0100 |
commit | 05a9feaa48cea560abd9561434a3479ab1021643 (patch) | |
tree | c0a8705a4a05fb806d5cdad294b74b78e8985723 /client/src/app/videos/video-list | |
parent | f282639b07deee1e35403bd86c46ea521fb4845e (diff) | |
download | PeerTube-05a9feaa48cea560abd9561434a3479ab1021643.tar.gz PeerTube-05a9feaa48cea560abd9561434a3479ab1021643.tar.zst PeerTube-05a9feaa48cea560abd9561434a3479ab1021643.zip |
Client: add views information and sort
Diffstat (limited to 'client/src/app/videos/video-list')
3 files changed, 13 insertions, 3 deletions
diff --git a/client/src/app/videos/video-list/video-miniature.component.html b/client/src/app/videos/video-list/video-miniature.component.html index f2f4a53a9..b2bf35435 100644 --- a/client/src/app/videos/video-list/video-miniature.component.html +++ b/client/src/app/videos/video-list/video-miniature.component.html | |||
@@ -23,6 +23,9 @@ | |||
23 | </span> | 23 | </span> |
24 | 24 | ||
25 | <a [routerLink]="['/videos/list', { field: 'author', search: video.author, sort: currentSort }]" class="video-miniature-author">{{ video.by }}</a> | 25 | <a [routerLink]="['/videos/list', { field: 'author', search: video.author, sort: currentSort }]" class="video-miniature-author">{{ video.by }}</a> |
26 | <span class="video-miniature-created-at">{{ video.createdAt | date:'short' }}</span> | 26 | <span class="video-miniature-views-created-at"> |
27 | <span class="video-miniature-views">{{ video.views }} views</span> | ||
28 | <span class="video-miniature-created-at">{{ video.createdAt | date:'short' }}</span> | ||
29 | </span> | ||
27 | </div> | 30 | </div> |
28 | </div> | 31 | </div> |
diff --git a/client/src/app/videos/video-list/video-miniature.component.scss b/client/src/app/videos/video-list/video-miniature.component.scss index d70b1b50d..0d309062a 100644 --- a/client/src/app/videos/video-list/video-miniature.component.scss +++ b/client/src/app/videos/video-list/video-miniature.component.scss | |||
@@ -79,12 +79,17 @@ | |||
79 | } | 79 | } |
80 | } | 80 | } |
81 | 81 | ||
82 | .video-miniature-author, .video-miniature-created-at { | 82 | .video-miniature-author, .video-miniature-views-created-at { |
83 | display: block; | 83 | display: block; |
84 | margin-left: 1px; | 84 | margin-left: 1px; |
85 | font-size: 12px; | 85 | font-size: 12px; |
86 | color: #337ab7; | 86 | color: #337ab7; |
87 | opacity: 0.9; | 87 | opacity: 0.9; |
88 | |||
89 | .video-miniature-created-at::before { | ||
90 | content: '\002022'; | ||
91 | margin: 0 2px 0 1px; | ||
92 | } | ||
88 | } | 93 | } |
89 | 94 | ||
90 | .video-miniature-author { | 95 | .video-miniature-author { |
diff --git a/client/src/app/videos/video-list/video-sort.component.ts b/client/src/app/videos/video-list/video-sort.component.ts index 53951deb4..c950fa8aa 100644 --- a/client/src/app/videos/video-list/video-sort.component.ts +++ b/client/src/app/videos/video-list/video-sort.component.ts | |||
@@ -18,7 +18,9 @@ export class VideoSortComponent { | |||
18 | 'duration': 'Duration - Asc', | 18 | 'duration': 'Duration - Asc', |
19 | '-duration': 'Duration - Desc', | 19 | '-duration': 'Duration - Desc', |
20 | 'createdAt': 'Created Date - Asc', | 20 | 'createdAt': 'Created Date - Asc', |
21 | '-createdAt': 'Created Date - Desc' | 21 | '-createdAt': 'Created Date - Desc', |
22 | 'views': 'Views - Asc', | ||
23 | '-views': 'Views - Desc' | ||
22 | }; | 24 | }; |
23 | 25 | ||
24 | get choiceKeys() { | 26 | get choiceKeys() { |