diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2021-04-15 10:01:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 10:01:27 +0200 |
commit | fbdcd4ec9f549b730f8311512bcc0c0b7bc2db0a (patch) | |
tree | e4c4d3a9abdc52afb2443234a57d74f0819b7d08 /client/src/app/+my-library/my-ownership | |
parent | 266947e5efc7ff30b0020beb5a74e4d4fc696fa5 (diff) | |
download | PeerTube-fbdcd4ec9f549b730f8311512bcc0c0b7bc2db0a.tar.gz PeerTube-fbdcd4ec9f549b730f8311512bcc0c0b7bc2db0a.tar.zst PeerTube-fbdcd4ec9f549b730f8311512bcc0c0b7bc2db0a.zip |
Add AccountAvatarComponent (#3965)
* refactor(client): create account-avatar component
* continue implement account-avatar
* fix review comments
Diffstat (limited to 'client/src/app/+my-library/my-ownership')
-rw-r--r-- | client/src/app/+my-library/my-ownership/my-ownership.component.html | 7 | ||||
-rw-r--r-- | client/src/app/+my-library/my-ownership/my-ownership.component.ts | 4 |
2 files changed, 1 insertions, 10 deletions
diff --git a/client/src/app/+my-library/my-ownership/my-ownership.component.html b/client/src/app/+my-library/my-ownership/my-ownership.component.html index 6bf562986..d0eff0521 100644 --- a/client/src/app/+my-library/my-ownership/my-ownership.component.html +++ b/client/src/app/+my-library/my-ownership/my-ownership.component.html | |||
@@ -37,12 +37,7 @@ | |||
37 | <td> | 37 | <td> |
38 | <a [href]="videoChangeOwnership.initiatorAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> | 38 | <a [href]="videoChangeOwnership.initiatorAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> |
39 | <div class="chip two-lines"> | 39 | <div class="chip two-lines"> |
40 | <img | 40 | <my-account-avatar [account]="videoChangeOwnership.initiatorAccount"></my-account-avatar> |
41 | class="avatar" | ||
42 | [src]="videoChangeOwnership.initiatorAccount.avatar?.path" | ||
43 | (error)="switchToDefaultAvatar($event)" | ||
44 | alt="Avatar" | ||
45 | > | ||
46 | <div> | 41 | <div> |
47 | {{ videoChangeOwnership.initiatorAccount.displayName }} | 42 | {{ videoChangeOwnership.initiatorAccount.displayName }} |
48 | <span class="text-muted">{{ videoChangeOwnership.initiatorAccount.nameWithHost }}</span> | 43 | <span class="text-muted">{{ videoChangeOwnership.initiatorAccount.nameWithHost }}</span> |
diff --git a/client/src/app/+my-library/my-ownership/my-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-ownership.component.ts index 78c3d9192..a938023b4 100644 --- a/client/src/app/+my-library/my-ownership/my-ownership.component.ts +++ b/client/src/app/+my-library/my-ownership/my-ownership.component.ts | |||
@@ -43,10 +43,6 @@ export class MyOwnershipComponent extends RestTable implements OnInit { | |||
43 | } | 43 | } |
44 | } | 44 | } |
45 | 45 | ||
46 | switchToDefaultAvatar ($event: Event) { | ||
47 | ($event.target as HTMLImageElement).src = Account.GET_DEFAULT_AVATAR_URL() | ||
48 | } | ||
49 | |||
50 | openAcceptModal (videoChangeOwnership: VideoChangeOwnership) { | 46 | openAcceptModal (videoChangeOwnership: VideoChangeOwnership) { |
51 | this.myAccountAcceptOwnershipComponent.show(videoChangeOwnership) | 47 | this.myAccountAcceptOwnershipComponent.show(videoChangeOwnership) |
52 | } | 48 | } |