<div class="actor-display-name">{{ videoChannel.displayName }}</div>
</div>
<div class="actor-followers">{{ videoChannel.followersCount }} subscribers</div>
+
+ <a [routerLink]="[ '/accounts', videoChannel.ownerAccount.id ]" title="Go the owner account page" class="actor-owner">
+ <span>Created by {{ videoChannel.ownerBy }}</span>
+ <img [src]="videoChannel.ownerAvatarUrl" alt="Owner account avatar" />
+ </a>
</div>
</div>
import { VideoChannel as ServerVideoChannel } from '../../../../../shared/models/videos/video-channel.model'
import { Actor } from '../actor/actor.model'
+import { Account } from '../../../../../shared/models/actors'
export class VideoChannel extends Actor implements ServerVideoChannel {
displayName: string
description: string
support: string
isLocal: boolean
- ownerAccount?: {
- id: number
- uuid: string
- }
+ ownerAccount?: Account
+ ownerBy?: string
+ ownerAvatarUrl?: string
constructor (hash: ServerVideoChannel) {
super(hash)
this.description = hash.description
this.support = hash.support
this.isLocal = hash.isLocal
- this.ownerAccount = hash.ownerAccount
+
+ if (hash.ownerAccount) {
+ this.ownerAccount = hash.ownerAccount
+ this.ownerBy = Actor.CREATE_BY_STRING(hash.ownerAccount.name, hash.ownerAccount.host)
+ this.ownerAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.ownerAccount)
+ }
}
}
position: absolute;
pointer-events: none;
border: 5px solid rgba(0, 0, 0, 0);
- border-top-color: #000000;
+ border-top-color: #000;
margin-top: -2px;
z-index: 100;
}
@mixin avatar ($size) {
object-fit: cover;
- border-radius:50%;
+ border-radius: 50%;
width: $size;
height: $size;
}
.actor-followers {
font-size: 15px;
}
+
+ .actor-owner {
+ @include disable-default-a-behaviour;
+
+ display: block;
+ font-size: 13px;
+ margin-top: 4px;
+ color: #000;
+
+ span:hover {
+ opacity: 0.8;
+ }
+
+ img {
+ @include avatar(18px);
+
+ margin-left: 7px;
+ position: relative;
+ top: -2px;
+ }
+ }
}
}
margin-right: 3px;
background-image: url('/assets/images/admin/add.svg');
}
-}
\ No newline at end of file
+}
[ScopeNames.WITH_ACCOUNT]: {
include: [
{
- model: () => AccountModel,
+ model: () => AccountModel.unscoped(),
required: true,
include: [
{
- model: () => ActorModel,
+ model: () => ActorModel.unscoped(),
required: true
}
]
videos: undefined
}
- if (this.Account) {
- videoChannel.ownerAccount = {
- id: this.Account.id,
- uuid: this.Account.Actor.uuid
- }
- }
+ if (this.Account) videoChannel.ownerAccount = this.Account.toFormattedJSON()
return Object.assign(actor, videoChannel)
}
import { Actor } from '../actors/actor.model'
import { Video } from './video.model'
+import { Account } from '../actors'
export interface VideoChannel extends Actor {
displayName: string
description: string
support: string
isLocal: boolean
- ownerAccount?: {
- id: number
- uuid: string
- }
+ ownerAccount?: Account
}