Align search field with checkboxes in playlist add
authorChocobozzz <me@florianbigard.com>
Mon, 6 Jan 2020 14:13:37 +0000 (15:13 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 6 Jan 2020 14:14:25 +0000 (15:14 +0100)
client/src/app/shared/video-playlist/video-add-to-playlist.component.scss
client/src/app/shared/video-playlist/video-add-to-playlist.component.ts
client/src/app/shared/video-playlist/video-playlist.service.ts

index 5f9bb51a7624e68e7153ee58a475f3554a1f46db..f1b6cd6011ff243575e456db9adf64b912143ce5 100644 (file)
@@ -1,10 +1,14 @@
 @import '_variables';
 @import '_mixins';
 
-.header {
-  min-width: 240px;
+.header,
+.dropdown-item,
+.input-container {
   padding: 6px 24px 10px 24px;
+}
 
+.header {
+  min-width: 240px;
   margin-bottom: 10px;
   border-bottom: 1px solid $separator-border-color;
 
   }
 }
 
-.dropdown-item {
-  padding: 6px 24px;
-}
-
 .playlists {
   max-height: 180px;
   overflow-y: auto;
 }
 
-.input-container {
-  display: flex;
-
-  input {
-    flex-grow: 1;
-    margin: 0 15px 10px 15px;
-  }
-}
-
 .playlist {
   display: flex;
   cursor: pointer;
index e60a8381d5e98bda0169d72a377d4f2ce703990b..0c593a79a127f1092479c208e356a3decb7086f6 100644 (file)
@@ -1,5 +1,5 @@
 import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'
-import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service'
+import { CachedPlaylist, VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service'
 import { AuthService, Notifier } from '@app/core'
 import { Subject, Subscription } from 'rxjs'
 import { debounceTime, filter } from 'rxjs/operators'
@@ -7,7 +7,6 @@ import { Video, VideoPlaylistCreate, VideoPlaylistElementCreate, VideoPlaylistPr
 import { FormReactive, FormValidatorService, VideoPlaylistValidatorsService } from '@app/shared/forms'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 import { secondsToTime } from '../../../assets/player/utils'
-import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model'
 import * as debug from 'debug'
 import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook'
 import { VideoExistInPlaylist } from '@shared/models/videos/playlist/video-exist-in-playlist.model'
@@ -50,7 +49,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit,
   private disabled = false
 
   private listenToPlaylistChangeSub: Subscription
-  private playlistsData: VideoPlaylist[] = []
+  private playlistsData: CachedPlaylist[] = []
 
   constructor (
     protected formValidatorService: FormValidatorService,
index c5b87fc1165681ddf13192d67a1b86042af34227..7eddf81e186bfa81366c8c209086c87d9b14bdb7 100644 (file)
@@ -26,7 +26,7 @@ import * as debug from 'debug'
 
 const logger = debug('peertube:playlists:VideoPlaylistService')
 
-type CachedPlaylist = VideoPlaylist | { id: number, displayName: string }
+export type CachedPlaylist = VideoPlaylist | { id: number, displayName: string }
 
 @Injectable()
 export class VideoPlaylistService {