2022-05-19 19:14:17 +00:00
|
|
|
<template>
|
2023-04-17 22:17:23 +00:00
|
|
|
<v-btn
|
2022-05-19 19:14:17 +00:00
|
|
|
v-ripple
|
2023-04-17 22:17:23 +00:00
|
|
|
text
|
|
|
|
class="background d-flex flex-row overflow-hidden mb-4 mx-7 mainCard px-0"
|
|
|
|
to="/playlist"
|
2022-05-21 02:01:39 +00:00
|
|
|
style="height: 6rem !important"
|
2022-05-19 19:14:17 +00:00
|
|
|
:class="
|
|
|
|
$store.state.tweaks.roundThumb && $store.state.tweaks.roundTweak > 0
|
|
|
|
? $vuetify.theme.dark
|
|
|
|
? 'lighten-1'
|
|
|
|
: 'darken-1'
|
|
|
|
: ''
|
|
|
|
"
|
|
|
|
:style="{
|
|
|
|
borderRadius: $store.state.tweaks.roundThumb
|
2022-07-28 21:27:14 +00:00
|
|
|
? `${$store.state.tweaks.roundTweak / 3}rem`
|
2022-05-19 19:14:17 +00:00
|
|
|
: '0',
|
|
|
|
}"
|
2023-04-17 22:17:23 +00:00
|
|
|
@click.native="clickHandler"
|
2022-05-19 19:14:17 +00:00
|
|
|
>
|
|
|
|
<v-img
|
|
|
|
contain
|
2023-04-17 22:17:23 +00:00
|
|
|
:src="thumbnail"
|
2022-05-19 19:14:17 +00:00
|
|
|
class="background"
|
|
|
|
style="position: relative; max-width: 8rem !important"
|
2022-05-21 02:01:39 +00:00
|
|
|
:class="$vuetify.theme.dark ? 'lighten-3' : 'darken-3'"
|
2022-05-19 19:14:17 +00:00
|
|
|
:style="{
|
|
|
|
borderRadius: $store.state.tweaks.roundThumb
|
2022-07-28 21:27:14 +00:00
|
|
|
? `${$store.state.tweaks.roundTweak / 3}rem`
|
2022-05-19 19:14:17 +00:00
|
|
|
: '0',
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<div
|
2022-07-06 04:07:12 +00:00
|
|
|
class="d-flex flex-column justify-center align-center background-opaque"
|
|
|
|
style="position: absolute; top: 0; right: 0; width: 50%; height: 100%"
|
2022-05-19 19:14:17 +00:00
|
|
|
>
|
2023-04-17 22:17:23 +00:00
|
|
|
<div>{{ playlist.videos.length }}</div>
|
2022-05-19 19:14:17 +00:00
|
|
|
<v-icon>mdi-playlist-play</v-icon>
|
|
|
|
</div>
|
|
|
|
</v-img>
|
2023-04-17 22:17:23 +00:00
|
|
|
<div v-emoji class="pa-4 text-left" style="font-size: 0.75rem !important">
|
|
|
|
<b>{{ playlist.name }}</b>
|
2022-05-19 19:14:17 +00:00
|
|
|
|
|
|
|
<div
|
2022-05-21 02:01:39 +00:00
|
|
|
class="background--text caption mt-2"
|
2022-05-19 19:14:17 +00:00
|
|
|
:class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
|
|
|
|
>
|
|
|
|
Bottom Text <br />
|
2023-04-17 22:17:23 +00:00
|
|
|
{{ playlist.videos.length }} videos
|
2022-05-19 19:14:17 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<v-spacer></v-spacer>
|
|
|
|
<div class="d-flex flex-column">
|
2023-04-17 22:17:23 +00:00
|
|
|
<!-- <v-btn
|
2022-05-19 19:14:17 +00:00
|
|
|
text
|
|
|
|
tile
|
|
|
|
elevation="0"
|
2022-05-21 02:01:39 +00:00
|
|
|
class="flex-grow-1"
|
|
|
|
style="width: 2rem !important"
|
2022-05-19 19:14:17 +00:00
|
|
|
>
|
2022-05-23 20:03:03 +00:00
|
|
|
<v-icon>mdi-share-outline</v-icon>
|
2022-05-19 19:14:17 +00:00
|
|
|
</v-btn>
|
|
|
|
<v-btn
|
|
|
|
text
|
|
|
|
tile
|
|
|
|
elevation="0"
|
2022-05-21 02:01:39 +00:00
|
|
|
class="flex-grow-1"
|
|
|
|
style="width: 2rem !important"
|
2022-05-19 19:14:17 +00:00
|
|
|
>
|
2022-05-23 20:03:03 +00:00
|
|
|
<v-icon>mdi-playlist-plus</v-icon>
|
2023-04-17 22:17:23 +00:00
|
|
|
</v-btn> -->
|
2022-05-19 19:14:17 +00:00
|
|
|
</div>
|
2023-04-17 22:17:23 +00:00
|
|
|
</v-btn>
|
2022-05-19 19:14:17 +00:00
|
|
|
</template>
|
2023-04-17 22:17:23 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
playlist: { type: Object, required: true },
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
thumbnail() {
|
|
|
|
try {
|
|
|
|
const videoId =
|
|
|
|
this.playlist.videos.length === 0 ? "" : this.playlist.videos[0].id;
|
2023-05-26 15:44:28 +00:00
|
|
|
return `https://img.youtube.com/vi/${videoId}/hqdefault.jpg`;
|
2023-04-17 22:17:23 +00:00
|
|
|
} catch (e) {
|
|
|
|
alert(e.message);
|
2023-05-26 15:44:28 +00:00
|
|
|
return `https://img.youtube.com/vi//hqdefault.jpg`;
|
2023-04-17 22:17:23 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
clickHandler() {
|
|
|
|
this.$emit("click");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.mainCard {
|
|
|
|
text-transform: none !important;
|
|
|
|
letter-spacing: normal !important;
|
|
|
|
}
|
|
|
|
</style>
|