1
0
Fork 0

Use badge in video block list

This commit is contained in:
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)
}