diff --git a/platypush/backend/http/webapp/src/components/panels/Media/Providers/YouTube.vue b/platypush/backend/http/webapp/src/components/panels/Media/Providers/YouTube.vue index f94dccac35..cd26d4feb3 100644 --- a/platypush/backend/http/webapp/src/components/panels/Media/Providers/YouTube.vue +++ b/platypush/backend/http/webapp/src/components/panels/Media/Providers/YouTube.vue @@ -8,7 +8,10 @@
- +
@@ -40,6 +43,7 @@ export default { return { youtubeConfig: null, selectedView: null, + selectedPlaylist: null, path: [], } }, @@ -75,16 +79,27 @@ export default { selectView(view) { this.selectedView = view + if (view === 'playlists') + this.selectedPlaylist = null + if (view?.length) { this.path = [ { title: view.slice(0, 1).toUpperCase() + view.slice(1), + click: () => this.selectView(view), }, ] } else { this.path = [] } }, + + onPlaylistSelected(playlist) { + this.selectedPlaylist = playlist.id + this.path.push({ + title: playlist.name, + }) + }, }, mounted() { diff --git a/platypush/backend/http/webapp/src/components/panels/Media/Providers/YouTube/Playlists.vue b/platypush/backend/http/webapp/src/components/panels/Media/Providers/YouTube/Playlists.vue index 5363282978..96b6542236 100644 --- a/platypush/backend/http/webapp/src/components/panels/Media/Providers/YouTube/Playlists.vue +++ b/platypush/backend/http/webapp/src/components/panels/Media/Providers/YouTube/Playlists.vue @@ -10,7 +10,7 @@
+ @click="$emit('select', playlist)">
{{ playlist.name }}
@@ -31,7 +31,7 @@ import Playlist from "./Playlist"; import Utils from "@/Utils"; export default { - emits: ['play'], + emits: ['play', 'select'], mixins: [Utils], components: { Loading, @@ -40,11 +40,17 @@ export default { Playlist, }, + props: { + selectedPlaylist: { + type: String, + default: null, + }, + }, + data() { return { playlists: [], loading: false, - selectedPlaylist: null, } }, @@ -79,11 +85,20 @@ export default { height: 100%; overflow: auto; - .item { + :deep(.playlist.item) { cursor: pointer; + .title { + font-size: 1.1em; + margin-top: 0.5em; + } + &:hover { text-decoration: underline; + + img { + filter: contrast(70%); + } } } }