diff options
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/shared-actor-image-edit/actor-image-edit.scss | 8 | ||||
-rw-r--r-- | client/src/app/shared/shared-main/account/actor.model.ts | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/client/src/app/shared/shared-actor-image-edit/actor-image-edit.scss b/client/src/app/shared/shared-actor-image-edit/actor-image-edit.scss index c4fe5a59e..93bdaba57 100644 --- a/client/src/app/shared/shared-actor-image-edit/actor-image-edit.scss +++ b/client/src/app/shared/shared-actor-image-edit/actor-image-edit.scss | |||
@@ -16,10 +16,12 @@ | |||
16 | } | 16 | } |
17 | 17 | ||
18 | .actor-img-edit-button { | 18 | .actor-img-edit-button { |
19 | @include peertube-button-file(21px); | 19 | @include peertube-button-file(30px); |
20 | @include button-with-icon(19px); | ||
21 | @include orange-button; | 20 | @include orange-button; |
22 | 21 | ||
22 | display: flex; | ||
23 | justify-content: center; | ||
24 | padding: 0; | ||
23 | margin-top: 10px; | 25 | margin-top: 10px; |
24 | margin-bottom: 5px; | 26 | margin-bottom: 5px; |
25 | cursor: pointer; | 27 | cursor: pointer; |
@@ -30,6 +32,6 @@ | |||
30 | } | 32 | } |
31 | 33 | ||
32 | my-global-icon { | 34 | my-global-icon { |
33 | right: 7px; | 35 | width: 19px; |
34 | } | 36 | } |
35 | } | 37 | } |
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 6be6b75d0..6e45ba588 100644 --- a/client/src/app/shared/shared-main/account/actor.model.ts +++ b/client/src/app/shared/shared-main/account/actor.model.ts | |||
@@ -21,11 +21,11 @@ export abstract class Actor implements ServerActor { | |||
21 | isLocal: boolean | 21 | isLocal: boolean |
22 | 22 | ||
23 | static GET_ACTOR_AVATAR_URL (actor: { avatars: { width: number, url?: string, path: string }[] }, size?: number) { | 23 | static GET_ACTOR_AVATAR_URL (actor: { avatars: { width: number, url?: string, path: string }[] }, size?: number) { |
24 | const avatars = actor.avatars.sort((a, b) => b.width - a.width) | 24 | const avatarsAscWidth = actor.avatars.sort((a, b) => a.width - b.width) |
25 | 25 | ||
26 | const avatar = size | 26 | const avatar = size |
27 | ? avatars.find(a => a.width >= size) | 27 | ? avatarsAscWidth.find(a => a.width >= size) |
28 | : avatars[0] | 28 | : avatarsAscWidth[avatarsAscWidth.length - 1] // Bigger one |
29 | 29 | ||
30 | if (!avatar) return '' | 30 | if (!avatar) return '' |
31 | if (avatar.url) return avatar.url | 31 | if (avatar.url) return avatar.url |