From fbdcd4ec9f549b730f8311512bcc0c0b7bc2db0a Mon Sep 17 00:00:00 2001 From: kontrollanten <6680299+kontrollanten@users.noreply.github.com> Date: Thu, 15 Apr 2021 10:01:27 +0200 Subject: Add AccountAvatarComponent (#3965) * refactor(client): create account-avatar component * continue implement account-avatar * fix review comments --- .../app/shared/shared-moderation/account-blocklist.component.html | 7 +------ .../app/shared/shared-moderation/account-blocklist.component.ts | 4 ---- .../src/app/shared/shared-moderation/shared-moderation.module.ts | 4 +++- 3 files changed, 4 insertions(+), 11 deletions(-) (limited to 'client/src/app/shared/shared-moderation') diff --git a/client/src/app/shared/shared-moderation/account-blocklist.component.html b/client/src/app/shared/shared-moderation/account-blocklist.component.html index fb6f69cd5..3f2f55559 100644 --- a/client/src/app/shared/shared-moderation/account-blocklist.component.html +++ b/client/src/app/shared/shared-moderation/account-blocklist.component.html @@ -38,12 +38,7 @@
- Avatar +
{{ accountBlock.blockedAccount.displayName }} {{ accountBlock.blockedAccount.nameWithHost }} diff --git a/client/src/app/shared/shared-moderation/account-blocklist.component.ts b/client/src/app/shared/shared-moderation/account-blocklist.component.ts index 3de9587b8..1bce65bf0 100644 --- a/client/src/app/shared/shared-moderation/account-blocklist.component.ts +++ b/client/src/app/shared/shared-moderation/account-blocklist.component.ts @@ -30,10 +30,6 @@ export class GenericAccountBlocklistComponent extends RestTable implements OnIni this.initialize() } - switchToDefaultAvatar ($event: Event) { - ($event.target as HTMLImageElement).src = Account.GET_DEFAULT_AVATAR_URL() - } - unblockAccount (accountBlock: AccountBlock) { const blockedAccount = accountBlock.blockedAccount const operation = this.mode === BlocklistComponentType.Account diff --git a/client/src/app/shared/shared-moderation/shared-moderation.module.ts b/client/src/app/shared/shared-moderation/shared-moderation.module.ts index b1b98f8d0..c7e201792 100644 --- a/client/src/app/shared/shared-moderation/shared-moderation.module.ts +++ b/client/src/app/shared/shared-moderation/shared-moderation.module.ts @@ -13,13 +13,15 @@ import { UserBanModalComponent } from './user-ban-modal.component' import { UserModerationDropdownComponent } from './user-moderation-dropdown.component' import { VideoBlockComponent } from './video-block.component' import { VideoBlockService } from './video-block.service' +import { SharedAccountAvatarModule } from '../shared-account-avatar/shared-account-avatar.module' @NgModule({ imports: [ SharedMainModule, SharedFormModule, SharedGlobalIconModule, - SharedVideoCommentModule + SharedVideoCommentModule, + SharedAccountAvatarModule ], declarations: [ -- cgit v1.2.3