diff options
Diffstat (limited to 'client/src/app/shared/account')
-rw-r--r-- | client/src/app/shared/account/account.model.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/client/src/app/shared/account/account.model.ts b/client/src/app/shared/account/account.model.ts index bacaa208a..cc46dad77 100644 --- a/client/src/app/shared/account/account.model.ts +++ b/client/src/app/shared/account/account.model.ts | |||
@@ -1,11 +1,13 @@ | |||
1 | import { Account as ServerAccount } from '../../../../../shared/models/actors/account.model' | 1 | import { Account as ServerAccount } from '../../../../../shared/models/actors/account.model' |
2 | import { Avatar } from '../../../../../shared/models/avatars/avatar.model' | 2 | import { Avatar } from '../../../../../shared/models/avatars/avatar.model' |
3 | import { environment } from '../../../environments/environment' | 3 | import { environment } from '../../../environments/environment' |
4 | import { getAbsoluteAPIUrl } from '../misc/utils' | ||
4 | 5 | ||
5 | export class Account implements ServerAccount { | 6 | export class Account implements ServerAccount { |
6 | id: number | 7 | id: number |
7 | uuid: string | 8 | uuid: string |
8 | name: string | 9 | name: string |
10 | displayName: string | ||
9 | host: string | 11 | host: string |
10 | followingCount: number | 12 | followingCount: number |
11 | followersCount: number | 13 | followersCount: number |
@@ -13,9 +15,11 @@ export class Account implements ServerAccount { | |||
13 | updatedAt: Date | 15 | updatedAt: Date |
14 | avatar: Avatar | 16 | avatar: Avatar |
15 | 17 | ||
16 | static GET_ACCOUNT_AVATAR_PATH (account: Account) { | 18 | static GET_ACCOUNT_AVATAR_URL (account: Account) { |
17 | if (account && account.avatar) return account.avatar.path | 19 | const absoluteAPIUrl = getAbsoluteAPIUrl() |
18 | 20 | ||
19 | return '/client/assets/images/default-avatar.png' | 21 | if (account && account.avatar) return absoluteAPIUrl + account.avatar.path |
22 | |||
23 | return window.location.origin + '/client/assets/images/default-avatar.png' | ||
20 | } | 24 | } |
21 | } | 25 | } |