diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-03 16:17:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-03 16:17:41 +0200 |
commit | e2409062dedf8856c56ef1bdc98ca623e21c4f3b (patch) | |
tree | c86f7fcbffdaa610bbadb5a4f9abf28d2acd0cdc /client/src/app/+admin | |
parent | 8fc02e476869276d35759d19248ddfe7f84ec09c (diff) | |
download | PeerTube-e2409062dedf8856c56ef1bdc98ca623e21c4f3b.tar.gz PeerTube-e2409062dedf8856c56ef1bdc98ca623e21c4f3b.tar.zst PeerTube-e2409062dedf8856c56ef1bdc98ca623e21c4f3b.zip |
Refactor video miniatures
Diffstat (limited to 'client/src/app/+admin')
3 files changed, 26 insertions, 51 deletions
diff --git a/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.html b/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.html index c4e5be0d6..5ef497fa7 100644 --- a/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.html +++ b/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.html | |||
@@ -6,15 +6,7 @@ | |||
6 | <my-peertube-checkbox [inputName]="'video-check-' + video.id" [(ngModel)]="checkedVideos[video.id]"></my-peertube-checkbox> | 6 | <my-peertube-checkbox [inputName]="'video-check-' + video.id" [(ngModel)]="checkedVideos[video.id]"></my-peertube-checkbox> |
7 | </div> | 7 | </div> |
8 | 8 | ||
9 | <my-video-thumbnail [video]="video"></my-video-thumbnail> | 9 | <my-video-miniature [video]="video" [displayAsRow]="true" [displayOptions]="miniatureDisplayOptions"></my-video-miniature> |
10 | |||
11 | <div class="video-info"> | ||
12 | <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a> | ||
13 | <div>{{ video.account.displayName }}</div> | ||
14 | <div>{{ video.publishedAt | myFromNow }}</div> | ||
15 | <div><span i18n>Privacy: </span><span>{{ video.privacy.label }}</span></div> | ||
16 | <div><span i18n>Sensitive: </span><span> {{ video.nsfw }}</span></div> | ||
17 | </div> | ||
18 | 10 | ||
19 | <!-- Display only once --> | 11 | <!-- Display only once --> |
20 | <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0"> | 12 | <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0"> |
@@ -30,13 +22,12 @@ | |||
30 | </div> | 22 | </div> |
31 | </div> | 23 | </div> |
32 | 24 | ||
33 | <div class="video-buttons" *ngIf="isInSelectionMode() === false"> | 25 | <my-button |
34 | <my-button | 26 | *ngIf="isInSelectionMode() === false" |
35 | i18n-label | 27 | i18n-label |
36 | label="Unblacklist" | 28 | label="Unblacklist" |
37 | icon="tick" | 29 | icon="tick" |
38 | (click)="removeVideoFromBlacklist(video)" | 30 | (click)="removeVideoFromBlacklist(video)" |
39 | ></my-button> | 31 | ></my-button> |
40 | </div> | ||
41 | </div> | 32 | </div> |
42 | </div> | 33 | </div> |
diff --git a/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.scss b/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.scss index a73c17eb9..e43a2aa7b 100644 --- a/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.scss +++ b/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.scss | |||
@@ -46,26 +46,8 @@ | |||
46 | margin-left: 12px; | 46 | margin-left: 12px; |
47 | } | 47 | } |
48 | 48 | ||
49 | my-video-thumbnail { | 49 | my-video-miniature { |
50 | margin-right: 10px; | ||
51 | } | ||
52 | |||
53 | .video-info { | ||
54 | flex-grow: 1; | 50 | flex-grow: 1; |
55 | |||
56 | .video-info-name { | ||
57 | @include disable-default-a-behaviour; | ||
58 | |||
59 | color: var(--mainForegroundColor); | ||
60 | display: block; | ||
61 | width: fit-content; | ||
62 | font-size: 16px; | ||
63 | font-weight: $font-semibold; | ||
64 | } | ||
65 | } | ||
66 | |||
67 | .video-buttons { | ||
68 | min-width: 190px; | ||
69 | } | 51 | } |
70 | } | 52 | } |
71 | 53 | ||
@@ -73,21 +55,12 @@ | |||
73 | .video { | 55 | .video { |
74 | flex-direction: column; | 56 | flex-direction: column; |
75 | height: auto; | 57 | height: auto; |
76 | text-align: center; | ||
77 | |||
78 | .video-info-name { | ||
79 | margin: auto; | ||
80 | } | ||
81 | 58 | ||
82 | input[type=checkbox] { | 59 | .checkbox-container { |
83 | display: none; | 60 | display: none; |
84 | } | 61 | } |
85 | 62 | ||
86 | my-video-thumbnail { | 63 | my-button { |
87 | margin-right: 0; | ||
88 | } | ||
89 | |||
90 | .video-buttons { | ||
91 | margin-top: 10px; | 64 | margin-top: 10px; |
92 | } | 65 | } |
93 | } | 66 | } |
diff --git a/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.ts b/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.ts index af68d7e2e..d66a6dcae 100644 --- a/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.ts +++ b/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.ts | |||
@@ -1,14 +1,14 @@ | |||
1 | import { Component, OnInit, OnDestroy } from '@angular/core' | 1 | import { Component, OnDestroy, OnInit } from '@angular/core' |
2 | import { Location } from '@angular/common' | ||
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | 2 | import { I18n } from '@ngx-translate/i18n-polyfill' |
4 | import { Router, ActivatedRoute } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
5 | import { AbstractVideoList } from '@app/shared/video/abstract-video-list' | 4 | import { AbstractVideoList } from '@app/shared/video/abstract-video-list' |
6 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' | 5 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' |
7 | import { Notifier, AuthService, ServerService } from '@app/core' | 6 | import { AuthService, Notifier, ServerService } from '@app/core' |
8 | import { Video } from '@shared/models' | 7 | import { Video } from '@shared/models' |
9 | import { VideoBlacklistService } from '@app/shared' | 8 | import { VideoBlacklistService } from '@app/shared' |
10 | import { immutableAssign } from '@app/shared/misc/utils' | 9 | import { immutableAssign } from '@app/shared/misc/utils' |
11 | import { ScreenService } from '@app/shared/misc/screen.service' | 10 | import { ScreenService } from '@app/shared/misc/screen.service' |
11 | import { MiniatureDisplayOptions } from '@app/shared/video/video-miniature.component' | ||
12 | 12 | ||
13 | @Component({ | 13 | @Component({ |
14 | selector: 'my-video-auto-blacklist-list', | 14 | selector: 'my-video-auto-blacklist-list', |
@@ -24,6 +24,17 @@ export class VideoAutoBlacklistListComponent extends AbstractVideoList implement | |||
24 | totalItems: null | 24 | totalItems: null |
25 | } | 25 | } |
26 | 26 | ||
27 | miniatureDisplayOptions: MiniatureDisplayOptions = { | ||
28 | date: true, | ||
29 | views: false, | ||
30 | by: true, | ||
31 | privacyLabel: false, | ||
32 | privacyText: true, | ||
33 | state: false, | ||
34 | blacklistInfo: false, | ||
35 | nsfw: true | ||
36 | } | ||
37 | |||
27 | constructor ( | 38 | constructor ( |
28 | protected router: Router, | 39 | protected router: Router, |
29 | protected route: ActivatedRoute, | 40 | protected route: ActivatedRoute, |