Use badge in video block list
This commit is contained in:
parent
f0048d5edd
commit
c195975c54
3 changed files with 15 additions and 16 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -21,3 +21,7 @@ my-global-icon {
|
|||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.badge {
|
||||
@include table-badge;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue