aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/shared-main/account/actor-avatar-info.component.html3
-rw-r--r--client/src/app/shared/shared-main/account/actor-avatar-info.component.ts10
2 files changed, 7 insertions, 6 deletions
diff --git a/client/src/app/shared/shared-main/account/actor-avatar-info.component.html b/client/src/app/shared/shared-main/account/actor-avatar-info.component.html
index d01b9ac7f..e63d8de2d 100644
--- a/client/src/app/shared/shared-main/account/actor-avatar-info.component.html
+++ b/client/src/app/shared/shared-main/account/actor-avatar-info.component.html
@@ -4,7 +4,8 @@
4 <img [src]="actor.avatarUrl" alt="Avatar" /> 4 <img [src]="actor.avatarUrl" alt="Avatar" />
5 5
6 <div class="actor-img-edit-container"> 6 <div class="actor-img-edit-container">
7 <div class="actor-img-edit-button" [ngbTooltip]="'(extensions: '+ avatarExtensions +', '+ maxSizeText +': '+ maxAvatarSizeInBytes +')'" placement="right" container="body"> 7 <div class="actor-img-edit-button" [ngbTooltip]="avatarFormat"
8 placement="right" container="body">
8 <my-global-icon iconName="edit"></my-global-icon> 9 <my-global-icon iconName="edit"></my-global-icon>
9 <label for="avatarfile" i18n>Change your avatar</label> 10 <label for="avatarfile" i18n>Change your avatar</label>
10 <input #avatarfileInput type="file" title=" " name="avatarfile" id="avatarfile" [accept]="avatarExtensions" (change)="onAvatarChange()"/> 11 <input #avatarfileInput type="file" title=" " name="avatarfile" id="avatarfile" [accept]="avatarExtensions" (change)="onAvatarChange()"/>
diff --git a/client/src/app/shared/shared-main/account/actor-avatar-info.component.ts b/client/src/app/shared/shared-main/account/actor-avatar-info.component.ts
index 5daa54cb5..de78a390e 100644
--- a/client/src/app/shared/shared-main/account/actor-avatar-info.component.ts
+++ b/client/src/app/shared/shared-main/account/actor-avatar-info.component.ts
@@ -17,16 +17,12 @@ export class ActorAvatarInfoComponent implements OnInit {
17 17
18 @Output() avatarChange = new EventEmitter<FormData>() 18 @Output() avatarChange = new EventEmitter<FormData>()
19 19
20 maxSizeText: string
21
22 private serverConfig: ServerConfig 20 private serverConfig: ServerConfig
23 21
24 constructor ( 22 constructor (
25 private serverService: ServerService, 23 private serverService: ServerService,
26 private notifier: Notifier 24 private notifier: Notifier
27 ) { 25 ) { }
28 this.maxSizeText = $localize`max size`
29 }
30 26
31 ngOnInit (): void { 27 ngOnInit (): void {
32 this.serverConfig = this.serverService.getTmpConfig() 28 this.serverConfig = this.serverService.getTmpConfig()
@@ -58,4 +54,8 @@ export class ActorAvatarInfoComponent implements OnInit {
58 get avatarExtensions () { 54 get avatarExtensions () {
59 return this.serverConfig.avatar.file.extensions.join(', ') 55 return this.serverConfig.avatar.file.extensions.join(', ')
60 } 56 }
57
58 get avatarFormat () {
59 return `${$localize`max size`}: 192*192px, ${this.maxAvatarSizeInBytes} ${$localize`extensions`}: ${this.avatarExtensions}`
60 }
61} 61}