aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-actor-image-edit
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-24 15:27:15 +0200
committerChocobozzz <me@florianbigard.com>2023-05-24 15:27:15 +0200
commitd0fbc9fd0a29c37f3ff9b99030351e90b276fe7d (patch)
treefa29fcfd704cbc56c7bc3e3e1c15d84ea0f4dc61 /client/src/app/shared/shared-actor-image-edit
parent25ea1d85e155382367d11036617848fe69a1e6a4 (diff)
downloadPeerTube-d0fbc9fd0a29c37f3ff9b99030351e90b276fe7d.tar.gz
PeerTube-d0fbc9fd0a29c37f3ff9b99030351e90b276fe7d.tar.zst
PeerTube-d0fbc9fd0a29c37f3ff9b99030351e90b276fe7d.zip
Fix lint
Diffstat (limited to 'client/src/app/shared/shared-actor-image-edit')
-rw-r--r--client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.html12
-rw-r--r--client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.scss4
-rw-r--r--client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.html12
-rw-r--r--client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.scss4
4 files changed, 20 insertions, 12 deletions
diff --git a/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.html b/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.html
index a0f65a3d9..c63b5b361 100644
--- a/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.html
+++ b/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.html
@@ -2,29 +2,29 @@
2 <div class="position-relative me-3"> 2 <div class="position-relative me-3">
3 <my-actor-avatar [actor]="actor" [actorType]="getActorType()" [previewImage]="preview" size="100"></my-actor-avatar> 3 <my-actor-avatar [actor]="actor" [actorType]="getActorType()" [previewImage]="preview" size="100"></my-actor-avatar>
4 4
5 <div *ngIf="editable && !hasAvatar()" class="actor-img-edit-button" [ngbTooltip]="avatarFormat" placement="right" container="body"> 5 <div *ngIf="editable && !hasAvatar()" class="actor-img-edit-button button-focus-within" [ngbTooltip]="avatarFormat" placement="right" container="body">
6 <my-global-icon iconName="upload"></my-global-icon> 6 <my-global-icon iconName="upload"></my-global-icon>
7 <label class="visually-hidden" for="avatarfile" i18n>Upload a new avatar</label> 7 <label class="visually-hidden" for="avatarfile" i18n>Upload a new avatar</label>
8 <input #avatarfileInput type="file" name="avatarfile" id="avatarfile" [accept]="avatarExtensions" (change)="onAvatarChange(avatarfileInput)"/> 8 <input #avatarfileInput type="file" name="avatarfile" id="avatarfile" [accept]="avatarExtensions" (change)="onAvatarChange(avatarfileInput)"/>
9 </div> 9 </div>
10 10
11 <div *ngIf="editable && hasAvatar()" ngbDropdown placement="right"> 11 <div *ngIf="editable && hasAvatar()" ngbDropdown placement="right">
12 <div class="actor-img-edit-button" ngbDropdownToggle> 12 <button type="button" class="actor-img-edit-button" ngbDropdownToggle>
13 <my-global-icon iconName="edit"></my-global-icon> 13 <my-global-icon iconName="edit"></my-global-icon>
14 <label class="visually-hidden" for="avatarMenu" i18n>Change your avatar</label> 14 <label class="visually-hidden" for="avatarMenu" i18n>Change your avatar</label>
15 </div> 15 </button>
16 16
17 <div ngbDropdownMenu> 17 <div ngbDropdownMenu>
18 <div class="dropdown-item c-hand dropdown-file" [ngbTooltip]="avatarFormat"> 18 <div class="dropdown-item dropdown-file button-focus-within" [ngbTooltip]="avatarFormat">
19 <my-global-icon iconName="upload"></my-global-icon> 19 <my-global-icon iconName="upload"></my-global-icon>
20 <span for="avatarfile" i18n>Upload a new avatar</span> 20 <span for="avatarfile" i18n>Upload a new avatar</span>
21 <input #avatarfileInput type="file" name="avatarfile" id="avatarfile" [accept]="avatarExtensions" (change)="onAvatarChange(avatarfileInput)"/> 21 <input #avatarfileInput type="file" name="avatarfile" id="avatarfile" [accept]="avatarExtensions" (change)="onAvatarChange(avatarfileInput)"/>
22 </div> 22 </div>
23 23
24 <div class="dropdown-item c-hand" (click)="deleteAvatar()" (key.enter)="deleteAvatar()"> 24 <button type="button" class="dropdown-item" (click)="deleteAvatar()" (key.enter)="deleteAvatar()">
25 <my-global-icon iconName="delete"></my-global-icon> 25 <my-global-icon iconName="delete"></my-global-icon>
26 <span i18n>Remove avatar</span> 26 <span i18n>Remove avatar</span>
27 </div> 27 </button>
28 </div> 28 </div>
29 29
30 </div> 30 </div>
diff --git a/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.scss b/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.scss
index 01e2131ba..689c5873c 100644
--- a/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.scss
+++ b/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.scss
@@ -39,6 +39,10 @@
39 right: 5px; 39 right: 5px;
40} 40}
41 41
42.button-focus-within:focus-within {
43 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
44}
45
42.dropdown-item { 46.dropdown-item {
43 @include dropdown-with-icon-item; 47 @include dropdown-with-icon-item;
44} 48}
diff --git a/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.html b/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.html
index d6fe37094..d4ddb2deb 100644
--- a/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.html
+++ b/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.html
@@ -4,25 +4,25 @@
4 <img *ngIf="hasBanner()" [src]="preview || actor.bannerUrl" alt="Banner" /> 4 <img *ngIf="hasBanner()" [src]="preview || actor.bannerUrl" alt="Banner" />
5 </div> 5 </div>
6 6
7 <div *ngIf="!hasBanner()" class="actor-img-edit-button" [ngbTooltip]="bannerFormat" placement="right" container="body"> 7 <div *ngIf="!hasBanner()" class="actor-img-edit-button button-focus-within" [ngbTooltip]="bannerFormat" placement="right" container="body">
8 <ng-container *ngTemplateOutlet="uploadNewBanner"></ng-container> 8 <ng-container *ngTemplateOutlet="uploadNewBanner"></ng-container>
9 </div> 9 </div>
10 10
11 <div *ngIf="hasBanner()" ngbDropdown placement="right"> 11 <div *ngIf="hasBanner()" ngbDropdown placement="right">
12 <div class="actor-img-edit-button" ngbDropdownToggle> 12 <button type="button" class="actor-img-edit-button" ngbDropdownToggle>
13 <my-global-icon iconName="edit"></my-global-icon> 13 <my-global-icon iconName="edit"></my-global-icon>
14 <label for="bannerMenu" i18n>Change your banner</label> 14 <label for="bannerMenu" i18n>Change your banner</label>
15 </div> 15 </button>
16 16
17 <div ngbDropdownMenu> 17 <div ngbDropdownMenu>
18 <div class="dropdown-item c-hand dropdown-file" [ngbTooltip]="bannerFormat"> 18 <div class="dropdown-item dropdown-file button-focus-within" [ngbTooltip]="bannerFormat">
19 <ng-container *ngTemplateOutlet="uploadNewBanner"></ng-container> 19 <ng-container *ngTemplateOutlet="uploadNewBanner"></ng-container>
20 </div> 20 </div>
21 21
22 <div class="dropdown-item c-hand" (click)="deleteBanner()" (key.enter)="deleteBanner()"> 22 <button type="button" class="dropdown-item" (click)="deleteBanner()">
23 <my-global-icon iconName="delete"></my-global-icon> 23 <my-global-icon iconName="delete"></my-global-icon>
24 <span i18n>Remove banner</span> 24 <span i18n>Remove banner</span>
25 </div> 25 </button>
26 </div> 26 </div>
27 </div> 27 </div>
28 </div> 28 </div>
diff --git a/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.scss b/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.scss
index b2c64fff7..8e5a05603 100644
--- a/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.scss
+++ b/client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.scss
@@ -34,6 +34,10 @@
34 } 34 }
35} 35}
36 36
37.button-focus-within:focus-within {
38 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
39}
40
37.dropdown-item { 41.dropdown-item {
38 @include dropdown-with-icon-item; 42 @include dropdown-with-icon-item;
39} 43}