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>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<ng-container *ngIf="videoBlock.reason">
|
<td>
|
||||||
<td class="c-hand" [pRowToggler]="videoBlock">{{ booleanToText(videoBlock.video.nsfw) }}</td>
|
<span *ngIf="videoBlock.video.nsfw" class="badge badge-red" i18n>NSFW</span>
|
||||||
<td class="c-hand" [pRowToggler]="videoBlock">{{ booleanToText(videoBlock.unfederated) }}</td>
|
</td>
|
||||||
<td class="c-hand" [pRowToggler]="videoBlock">{{ videoBlock.createdAt | date: 'short' }}</td>
|
|
||||||
</ng-container>
|
<td>
|
||||||
<ng-container *ngIf="!videoBlock.reason">
|
<span *ngIf="videoBlock.unfederated" class="badge badge-blue" i18n>Unfederated</span>
|
||||||
<td>{{ booleanToText(videoBlock.video.nsfw) }}</td>
|
</td>
|
||||||
<td>{{ booleanToText(videoBlock.unfederated) }}</td>
|
|
||||||
<td>{{ videoBlock.createdAt | date: 'short' }}</td>
|
<td>
|
||||||
</ng-container>
|
{{ videoBlock.createdAt | date: 'short' }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
|
|
|
@ -21,3 +21,7 @@ my-global-icon {
|
||||||
flex-grow: 1;
|
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)
|
return Video.buildClientUrl(videoBlock.video.uuid)
|
||||||
}
|
}
|
||||||
|
|
||||||
booleanToText (value: boolean) {
|
|
||||||
if (value === true) return $localize`yes`
|
|
||||||
|
|
||||||
return $localize`no`
|
|
||||||
}
|
|
||||||
|
|
||||||
toHtml (text: string) {
|
toHtml (text: string) {
|
||||||
return this.markdownRenderer.textMarkdownToHTML(text)
|
return this.markdownRenderer.textMarkdownToHTML(text)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue