diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-15 11:21:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-04-15 11:21:00 +0200 |
commit | 126a6352ec2b088bb1d7f882991045a3ad0d7aea (patch) | |
tree | 824e6cf757e1b24e097037e876082e3ac96a3ab0 /client/src/app/shared/shared-main | |
parent | 5b23d4e0f87fae49fad9881f249320cf3615b47b (diff) | |
download | PeerTube-126a6352ec2b088bb1d7f882991045a3ad0d7aea.tar.gz PeerTube-126a6352ec2b088bb1d7f882991045a3ad0d7aea.tar.zst PeerTube-126a6352ec2b088bb1d7f882991045a3ad0d7aea.zip |
Don't always use a link for account avatar
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r-- | client/src/app/shared/shared-main/account/account.model.ts | 4 | ||||
-rw-r--r-- | client/src/app/shared/shared-main/account/actor.model.ts | 6 |
2 files changed, 5 insertions, 5 deletions
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 @@ | |||
1 | import { Account as ServerAccount, ActorImage } from '@shared/models' | 1 | import { Account as ServerAccount, Actor as ServerActor, ActorImage } from '@shared/models' |
2 | import { Actor } from './actor.model' | 2 | import { Actor } from './actor.model' |
3 | 3 | ||
4 | export class Account extends Actor implements ServerAccount { | 4 | export class Account extends Actor implements ServerAccount { |
@@ -13,7 +13,7 @@ export class Account extends Actor implements ServerAccount { | |||
13 | 13 | ||
14 | userId?: number | 14 | userId?: number |
15 | 15 | ||
16 | static GET_ACTOR_AVATAR_URL (actor: object) { | 16 | static GET_ACTOR_AVATAR_URL (actor: { avatar?: { url?: string, path: string } }) { |
17 | return Actor.GET_ACTOR_AVATAR_URL(actor) || this.GET_DEFAULT_AVATAR_URL() | 17 | return Actor.GET_ACTOR_AVATAR_URL(actor) || this.GET_DEFAULT_AVATAR_URL() |
18 | } | 18 | } |
19 | 19 | ||
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 @@ | |||
1 | import { Actor as ActorServer, ActorImage } from '@shared/models' | ||
2 | import { getAbsoluteAPIUrl } from '@app/helpers' | 1 | import { getAbsoluteAPIUrl } from '@app/helpers' |
2 | import { Actor as ServerActor, ActorImage } from '@shared/models' | ||
3 | 3 | ||
4 | export abstract class Actor implements ActorServer { | 4 | export abstract class Actor implements ServerActor { |
5 | id: number | 5 | id: number |
6 | name: string | 6 | name: string |
7 | 7 | ||
@@ -47,7 +47,7 @@ export abstract class Actor implements ActorServer { | |||
47 | return host.trim() === thisHost | 47 | return host.trim() === thisHost |
48 | } | 48 | } |
49 | 49 | ||
50 | protected constructor (hash: Partial<ActorServer>) { | 50 | protected constructor (hash: Partial<ServerActor>) { |
51 | this.id = hash.id | 51 | this.id = hash.id |
52 | this.url = hash.url ?? '' | 52 | this.url = hash.url ?? '' |
53 | this.name = hash.name ?? '' | 53 | this.name = hash.name ?? '' |