Use badge in video block list

pull/3318/head
Chocobozzz 2020-11-16 15:41:15 +01:00
parent f0048d5edd
commit c195975c54
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 15 additions and 16 deletions

View File

@ -80,16 +80,17 @@
</a>
</td>
<ng-container *ngIf="videoBlock.reason">
<td class="c-hand" [pRowToggler]="videoBlock">{{ booleanToText(videoBlock.video.nsfw) }}</td>
<td class="c-hand" [pRowToggler]="videoBlock">{{ booleanToText(videoBlock.unfederated) }}</td>
<td class="c-hand" [pRowToggler]="videoBlock">{{ videoBlock.createdAt | date: 'short' }}</td>
</ng-container>
<ng-container *ngIf="!videoBlock.reason">
<td>{{ booleanToText(videoBlock.video.nsfw) }}</td>
<td>{{ booleanToText(videoBlock.unfederated) }}</td>
<td>{{ videoBlock.createdAt | date: 'short' }}</td>
</ng-container>
<td>
<span *ngIf="videoBlock.video.nsfw" class="badge badge-red" i18n>NSFW</span>
</td>
<td>
<span *ngIf="videoBlock.unfederated" class="badge badge-blue" i18n>Unfederated</span>
</td>
<td>
{{ videoBlock.createdAt | date: 'short' }}
</td>
</tr>
</ng-template>

View File

@ -21,3 +21,7 @@ my-global-icon {
flex-grow: 1;
}
}
.badge {
@include table-badge;
}

View File

@ -138,12 +138,6 @@ export class VideoBlockListComponent extends RestTable implements OnInit, AfterV
return Video.buildClientUrl(videoBlock.video.uuid)
}
booleanToText (value: boolean) {
if (value === true) return $localize`yes`
return $localize`no`
}
toHtml (text: string) {
return this.markdownRenderer.textMarkdownToHTML(text)
}