diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-06 15:13:37 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-01-06 15:14:25 +0100 |
commit | 93d54cc769d88ecb2d7ead3ca293dac52653c13f (patch) | |
tree | cd1ac55a1771ddf0ae0a08d1d2602800e2df340a | |
parent | 6a07a058616b3fb70e56cd4e50b8deb02a2468d0 (diff) | |
download | PeerTube-93d54cc769d88ecb2d7ead3ca293dac52653c13f.tar.gz PeerTube-93d54cc769d88ecb2d7ead3ca293dac52653c13f.tar.zst PeerTube-93d54cc769d88ecb2d7ead3ca293dac52653c13f.zip |
Align search field with checkboxes in playlist add
3 files changed, 9 insertions, 19 deletions
diff --git a/client/src/app/shared/video-playlist/video-add-to-playlist.component.scss b/client/src/app/shared/video-playlist/video-add-to-playlist.component.scss index 5f9bb51a7..f1b6cd601 100644 --- a/client/src/app/shared/video-playlist/video-add-to-playlist.component.scss +++ b/client/src/app/shared/video-playlist/video-add-to-playlist.component.scss | |||
@@ -1,10 +1,14 @@ | |||
1 | @import '_variables'; | 1 | @import '_variables'; |
2 | @import '_mixins'; | 2 | @import '_mixins'; |
3 | 3 | ||
4 | .header { | 4 | .header, |
5 | min-width: 240px; | 5 | .dropdown-item, |
6 | .input-container { | ||
6 | padding: 6px 24px 10px 24px; | 7 | padding: 6px 24px 10px 24px; |
8 | } | ||
7 | 9 | ||
10 | .header { | ||
11 | min-width: 240px; | ||
8 | margin-bottom: 10px; | 12 | margin-bottom: 10px; |
9 | border-bottom: 1px solid $separator-border-color; | 13 | border-bottom: 1px solid $separator-border-color; |
10 | 14 | ||
@@ -44,24 +48,11 @@ | |||
44 | } | 48 | } |
45 | } | 49 | } |
46 | 50 | ||
47 | .dropdown-item { | ||
48 | padding: 6px 24px; | ||
49 | } | ||
50 | |||
51 | .playlists { | 51 | .playlists { |
52 | max-height: 180px; | 52 | max-height: 180px; |
53 | overflow-y: auto; | 53 | overflow-y: auto; |
54 | } | 54 | } |
55 | 55 | ||
56 | .input-container { | ||
57 | display: flex; | ||
58 | |||
59 | input { | ||
60 | flex-grow: 1; | ||
61 | margin: 0 15px 10px 15px; | ||
62 | } | ||
63 | } | ||
64 | |||
65 | .playlist { | 56 | .playlist { |
66 | display: flex; | 57 | display: flex; |
67 | cursor: pointer; | 58 | cursor: pointer; |
diff --git a/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts b/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts index e60a8381d..0c593a79a 100644 --- a/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts +++ b/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core' | 1 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core' |
2 | import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' | 2 | import { CachedPlaylist, VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' |
3 | import { AuthService, Notifier } from '@app/core' | 3 | import { AuthService, Notifier } from '@app/core' |
4 | import { Subject, Subscription } from 'rxjs' | 4 | import { Subject, Subscription } from 'rxjs' |
5 | import { debounceTime, filter } from 'rxjs/operators' | 5 | import { debounceTime, filter } from 'rxjs/operators' |
@@ -7,7 +7,6 @@ import { Video, VideoPlaylistCreate, VideoPlaylistElementCreate, VideoPlaylistPr | |||
7 | import { FormReactive, FormValidatorService, VideoPlaylistValidatorsService } from '@app/shared/forms' | 7 | import { FormReactive, FormValidatorService, VideoPlaylistValidatorsService } from '@app/shared/forms' |
8 | import { I18n } from '@ngx-translate/i18n-polyfill' | 8 | import { I18n } from '@ngx-translate/i18n-polyfill' |
9 | import { secondsToTime } from '../../../assets/player/utils' | 9 | import { secondsToTime } from '../../../assets/player/utils' |
10 | import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' | ||
11 | import * as debug from 'debug' | 10 | import * as debug from 'debug' |
12 | import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' | 11 | import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' |
13 | import { VideoExistInPlaylist } from '@shared/models/videos/playlist/video-exist-in-playlist.model' | 12 | import { VideoExistInPlaylist } from '@shared/models/videos/playlist/video-exist-in-playlist.model' |
@@ -50,7 +49,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit, | |||
50 | private disabled = false | 49 | private disabled = false |
51 | 50 | ||
52 | private listenToPlaylistChangeSub: Subscription | 51 | private listenToPlaylistChangeSub: Subscription |
53 | private playlistsData: VideoPlaylist[] = [] | 52 | private playlistsData: CachedPlaylist[] = [] |
54 | 53 | ||
55 | constructor ( | 54 | constructor ( |
56 | protected formValidatorService: FormValidatorService, | 55 | protected formValidatorService: FormValidatorService, |
diff --git a/client/src/app/shared/video-playlist/video-playlist.service.ts b/client/src/app/shared/video-playlist/video-playlist.service.ts index c5b87fc11..7eddf81e1 100644 --- a/client/src/app/shared/video-playlist/video-playlist.service.ts +++ b/client/src/app/shared/video-playlist/video-playlist.service.ts | |||
@@ -26,7 +26,7 @@ import * as debug from 'debug' | |||
26 | 26 | ||
27 | const logger = debug('peertube:playlists:VideoPlaylistService') | 27 | const logger = debug('peertube:playlists:VideoPlaylistService') |
28 | 28 | ||
29 | type CachedPlaylist = VideoPlaylist | { id: number, displayName: string } | 29 | export type CachedPlaylist = VideoPlaylist | { id: number, displayName: string } |
30 | 30 | ||
31 | @Injectable() | 31 | @Injectable() |
32 | export class VideoPlaylistService { | 32 | export class VideoPlaylistService { |