2020-09-16 16:59:25 +00:00
|
|
|
<template>
|
2020-09-16 20:22:55 +00:00
|
|
|
<div id="playlist_search" class="search_tabcontent">
|
|
|
|
<BaseLoadingPlaceholder v-if="!results.playlistTab.loaded" />
|
|
|
|
<div v-else-if="results.playlistTab.data.length == 0">
|
|
|
|
<h1>{{ $t('search.noResultsPlaylist') }}</h1>
|
|
|
|
</div>
|
|
|
|
<div class="release_grid" v-if="results.playlistTab.data.length > 0">
|
2020-09-26 19:10:40 +00:00
|
|
|
<router-link
|
|
|
|
tag="div"
|
2020-09-16 20:22:55 +00:00
|
|
|
v-for="release in results.playlistTab.data"
|
|
|
|
class="release clickable"
|
2020-09-26 19:10:40 +00:00
|
|
|
:key="release.id"
|
|
|
|
:to="{ name: 'Playlist', params: { id: release.id } }"
|
2020-09-16 20:22:55 +00:00
|
|
|
>
|
|
|
|
<div class="cover_container">
|
|
|
|
<img aria-hidden="true" class="rounded coverart" :src="release.picture_medium" />
|
2020-09-23 16:00:52 +00:00
|
|
|
<button
|
2020-09-16 20:22:55 +00:00
|
|
|
role="button"
|
|
|
|
aria-label="download"
|
|
|
|
@click.stop="$emit('add-to-queue', $event)"
|
|
|
|
:data-link="release.link"
|
|
|
|
class="download_overlay"
|
2020-09-23 16:00:52 +00:00
|
|
|
tabindex="0"
|
2020-09-16 20:22:55 +00:00
|
|
|
>
|
|
|
|
<i class="material-icons" :title="$t('globals.download_hint')">get_app</i>
|
2020-09-23 16:00:52 +00:00
|
|
|
</button>
|
2020-09-16 20:22:55 +00:00
|
|
|
</div>
|
|
|
|
<p class="primary-text">{{ release.title }}</p>
|
|
|
|
<p class="secondary-text">
|
|
|
|
{{
|
|
|
|
`${$t('globals.by', { artist: release.user.name })} - ${$tc('globals.listTabs.trackN', release.nb_tracks)}`
|
|
|
|
}}
|
|
|
|
</p>
|
2020-09-26 19:10:40 +00:00
|
|
|
</router-link>
|
2020-09-16 20:22:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-09-26 19:10:40 +00:00
|
|
|
import BaseLoadingPlaceholder from '@components/globals/BaseLoadingPlaceholder.vue'
|
2020-09-16 20:22:55 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
props: ['results'],
|
|
|
|
components: {
|
|
|
|
BaseLoadingPlaceholder
|
|
|
|
}
|
|
|
|
}
|
2020-09-23 16:00:52 +00:00
|
|
|
</script>
|