diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html
index c0d8c7db4..9308d5bb6 100644
--- a/client/src/app/+video-channels/video-channels.component.html
+++ b/client/src/app/+video-channels/video-channels.component.html
@@ -23,8 +23,8 @@
OWNER ACCOUNT
-
-
+
+
{{ videoChannel.ownerAccount.displayName }}
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment.component.html b/client/src/app/+videos/+video-watch/comment/video-comment.component.html
index f13b12b25..eeae55d9b 100644
--- a/client/src/app/+videos/+video-watch/comment/video-comment.component.html
+++ b/client/src/app/+videos/+video-watch/comment/video-comment.component.html
@@ -1,6 +1,6 @@
diff --git a/client/src/app/shared/shared-account-avatar/account-avatar.component.html b/client/src/app/shared/shared-account-avatar/account-avatar.component.html
index 6bec0b5f3..ca4ceb12f 100644
--- a/client/src/app/shared/shared-account-avatar/account-avatar.component.html
+++ b/client/src/app/shared/shared-account-avatar/account-avatar.component.html
@@ -1,8 +1,15 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/src/app/shared/shared-account-avatar/account-avatar.component.ts b/client/src/app/shared/shared-account-avatar/account-avatar.component.ts
index d5533d459..02a0a18bf 100644
--- a/client/src/app/shared/shared-account-avatar/account-avatar.component.ts
+++ b/client/src/app/shared/shared-account-avatar/account-avatar.component.ts
@@ -1,5 +1,4 @@
import { Component, Input } from '@angular/core'
-import { Account as AccountInterface } from '@shared/models'
import { Account } from '../shared-main/account/account.model'
@Component({
@@ -8,21 +7,23 @@ import { Account } from '../shared-main/account/account.model'
templateUrl: './account-avatar.component.html'
})
export class AccountAvatarComponent {
- _href: string
- _title: string
-
- @Input() account: { name: string, avatar?: { url?: string }, url: string }
- @Input() size = '36'
- @Input() set href (value) {
- this._href = value
+ @Input() account: {
+ name: string
+ avatar?: { url?: string, path: string }
+ url: string
}
+ @Input() size: '25' | '34' | '36' | '40' | '120' = '36'
+
+ // Use an external link
+ @Input() href: string
+ // Use routerLink
+ @Input() internalHref: string | string[]
+
@Input() set title (value) {
this._title = value
}
- get href () {
- return this._href || this.account?.url
- }
+ private _title: string
get title () {
return this._title || $localize`${this.account.name} (account page)`
@@ -33,6 +34,6 @@ export class AccountAvatarComponent {
}
get avatarUrl () {
- return this.account?.avatar ? this.account.avatar.url : Account.GET_DEFAULT_AVATAR_URL()
+ return Account.GET_ACTOR_AVATAR_URL(this.account)
}
}
diff --git a/client/src/app/shared/shared-main/account/account.model.ts b/client/src/app/shared/shared-main/account/account.model.ts
index 17fddff09..65e6798d4 100644
--- a/client/src/app/shared/shared-main/account/account.model.ts
+++ b/client/src/app/shared/shared-main/account/account.model.ts
@@ -1,4 +1,4 @@
-import { Account as ServerAccount, ActorImage } from '@shared/models'
+import { Account as ServerAccount, Actor as ServerActor, ActorImage } from '@shared/models'
import { Actor } from './actor.model'
export class Account extends Actor implements ServerAccount {
@@ -13,7 +13,7 @@ export class Account extends Actor implements ServerAccount {
userId?: number
- static GET_ACTOR_AVATAR_URL (actor: object) {
+ static GET_ACTOR_AVATAR_URL (actor: { avatar?: { url?: string, path: string } }) {
return Actor.GET_ACTOR_AVATAR_URL(actor) || this.GET_DEFAULT_AVATAR_URL()
}
diff --git a/client/src/app/shared/shared-main/account/actor.model.ts b/client/src/app/shared/shared-main/account/actor.model.ts
index 1ee0c297e..4b036341f 100644
--- a/client/src/app/shared/shared-main/account/actor.model.ts
+++ b/client/src/app/shared/shared-main/account/actor.model.ts
@@ -1,7 +1,7 @@
-import { Actor as ActorServer, ActorImage } from '@shared/models'
import { getAbsoluteAPIUrl } from '@app/helpers'
+import { Actor as ServerActor, ActorImage } from '@shared/models'
-export abstract class Actor implements ActorServer {
+export abstract class Actor implements ServerActor {
id: number
name: string
@@ -47,7 +47,7 @@ export abstract class Actor implements ActorServer {
return host.trim() === thisHost
}
- protected constructor (hash: Partial) {
+ protected constructor (hash: Partial) {
this.id = hash.id
this.url = hash.url ?? ''
this.name = hash.name ?? ''
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.html b/client/src/app/shared/shared-video-miniature/video-miniature.component.html
index 4e61c27b3..9c11e7609 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.html
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.html
@@ -13,7 +13,7 @@
-
+