]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix upload banner icon margin
authorChocobozzz <me@florianbigard.com>
Fri, 10 Jun 2022 07:44:20 +0000 (09:44 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 10 Jun 2022 07:44:20 +0000 (09:44 +0200)
client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.html
client/src/app/shared/shared-actor-image-edit/actor-banner-edit.component.scss

index 266fc26c5a7f7483d769792ee4d4182159b1b1e3..f675371d9c5679c004d812607f80e3733ec44a49 100644 (file)
@@ -5,9 +5,7 @@
     </div>
 
     <div *ngIf="!hasBanner()" class="actor-img-edit-button" [ngbTooltip]="bannerFormat" placement="right" container="body">
-      <my-global-icon iconName="upload"></my-global-icon>
-      <label for="bannerfile" i18n>Upload a new banner</label>
-      <input #bannerfileInput type="file" name="bannerfile" id="bannerfile" [accept]="bannerExtensions" (change)="onBannerChange(bannerfileInput)"/>
+      <ng-container *ngTemplateOutlet="uploadNewBanner"></ng-container>
     </div>
 
     <div
@@ -22,9 +20,7 @@
 
 <ng-template #bannerEditContent>
   <div class="dropdown-item c-hand" [ngbTooltip]="bannerFormat" placement="right" container="body">
-    <my-global-icon iconName="upload"></my-global-icon>
-    <span for="bannerfile" i18n>Upload a new banner</span>
-    <input #bannerfileInput type="file" name="bannerfile" id="bannerfile" [accept]="bannerExtensions" (change)="onBannerChange(bannerfileInput)"/>
+    <ng-container *ngTemplateOutlet="uploadNewBanner"></ng-container>
   </div>
 
   <div class="dropdown-item c-hand" (click)="deleteBanner()" (key.enter)="deleteBanner()">
@@ -32,3 +28,9 @@
     <span i18n>Remove banner</span>
   </div>
 </ng-template>
+
+<ng-template #uploadNewBanner>
+  <my-global-icon iconName="upload"></my-global-icon>
+  <span for="bannerfile" i18n>Upload a new banner</span>
+  <input #bannerfileInput type="file" name="bannerfile" id="bannerfile" [accept]="bannerExtensions" (change)="onBannerChange(bannerfileInput)"/>
+</ng-template>
index ec2de252881485f13adb3831f3d08022de7cd949..90fcd81aa894fc031fea9a8f478f3820664923c8 100644 (file)
@@ -25,3 +25,7 @@
     margin-bottom: 0;
   }
 }
+
+my-global-icon {
+  margin: 0 5px;
+}