From 746018f6b81b40e8858303662ac9ec5ce59ac6eb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 28 Apr 2021 11:49:34 +0200 Subject: Refactor actor avatar display --- client/src/app/shared/shared-main/users/user-notification.model.ts | 4 ++-- .../app/shared/shared-main/users/user-notifications.component.scss | 7 +++++-- .../app/shared/shared-main/video-channel/video-channel.model.ts | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'client/src/app/shared/shared-main') diff --git a/client/src/app/shared/shared-main/users/user-notification.model.ts b/client/src/app/shared/shared-main/users/user-notification.model.ts index 88a4811da..ed5791794 100644 --- a/client/src/app/shared/shared-main/users/user-notification.model.ts +++ b/client/src/app/shared/shared-main/users/user-notification.model.ts @@ -258,10 +258,10 @@ export class UserNotification implements UserNotificationServer { } private setAccountAvatarUrl (actor: { avatarUrl?: string, avatar?: { url?: string, path: string } }) { - actor.avatarUrl = Account.GET_ACTOR_AVATAR_URL(actor) + actor.avatarUrl = Account.GET_ACTOR_AVATAR_URL(actor) || Account.GET_DEFAULT_AVATAR_URL() } private setVideoChannelAvatarUrl (actor: { avatarUrl?: string, avatar?: { url?: string, path: string } }) { - actor.avatarUrl = VideoChannel.GET_ACTOR_AVATAR_URL(actor) + actor.avatarUrl = VideoChannel.GET_ACTOR_AVATAR_URL(actor) || VideoChannel.GET_DEFAULT_AVATAR_URL() } } diff --git a/client/src/app/shared/shared-main/users/user-notifications.component.scss b/client/src/app/shared/shared-main/users/user-notifications.component.scss index 5166bd559..fa9c55ec9 100644 --- a/client/src/app/shared/shared-main/users/user-notifications.component.scss +++ b/client/src/app/shared/shared-main/users/user-notifications.component.scss @@ -29,8 +29,11 @@ } .avatar { - @include avatar(30px); - + width: 30px; + height: 30px; + min-width: 30px; + min-height: 30px; + border-radius: 5px; margin-right: 10px; } diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts index 1ba3fcc0e..548725e04 100644 --- a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts +++ b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts @@ -25,7 +25,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel { viewsPerDay?: ViewsPerDate[] static GET_ACTOR_AVATAR_URL (actor: object) { - return Actor.GET_ACTOR_AVATAR_URL(actor) || this.GET_DEFAULT_AVATAR_URL() + return Actor.GET_ACTOR_AVATAR_URL(actor) } static GET_ACTOR_BANNER_URL (channel: ServerVideoChannel) { -- cgit v1.2.3