]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Improve playlist add dropdown ux
authorChocobozzz <me@florianbigard.com>
Fri, 20 Nov 2020 13:32:57 +0000 (14:32 +0100)
committerChocobozzz <me@florianbigard.com>
Fri, 20 Nov 2020 13:32:57 +0000 (14:32 +0100)
client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.html
client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.scss

index 37d5017cfbc6045010787a57cc24be6f33e40694..bd5d371967e995c005b9f105ff91cfa271ceecab 100644 (file)
       *ngFor="let playlist of videoPlaylists"
       class="playlist dropdown-item" [ngClass]="{ 'has-optional-row': playlist.optionalRowDisplayed }"
     >
-      <div class="primary-row">
+      <div class="primary-row" (click)="toggleMainPlaylist($event, playlist)">
         <my-peertube-checkbox
           [disabled]="isPresentMultipleTimes(playlist) || playlist.optionalRowDisplayed" [inputName]="getPrimaryInputName(playlist)"
           [ngModel]="isPrimaryCheckboxChecked(playlist)" [onPushWorkaround]="true"
-          (click)="toggleMainPlaylist($event, playlist)"
         ></my-peertube-checkbox>
 
-        <label class="display-name" (click)="toggleMainPlaylist($event, playlist)">
+        <label class="display-name">
           {{ playlist.displayName }}
         </label>
 
-        <div class="optional-row-icon" *ngIf="isPrimaryCheckboxChecked(playlist)" (click)="toggleOptionalRow(playlist)">
+        <div class="optional-row-icon" *ngIf="isPrimaryCheckboxChecked(playlist)" (click)="$event.stopPropagation(); toggleOptionalRow(playlist)">
           <my-global-icon iconName="add" aria-hidden="true"></my-global-icon>
         </div>
       </div>
index d2c8804e3ad6f4bd461979e71ab613af27b6ab01..b84cacece486f8f4f58b6c0b6f756dad9ce4fa68 100644 (file)
@@ -37,7 +37,15 @@ $timestamp-margin-right: 10px;
 }
 
 .playlist {
-  padding: 8px 10px 8px 24px;
+  padding: 0;
+
+  > .primary-row {
+    padding: 8px 10px 8px 24px;
+  }
+
+  > .optional-rows {
+    padding-left: 24px;
+  }
 
   &.has-optional-row:hover {
     background-color: inherit;