2022-03-23 11:21:06 +00:00
|
|
|
<template>
|
2022-05-14 05:10:38 +00:00
|
|
|
<v-card
|
|
|
|
flat
|
|
|
|
to="/channel"
|
|
|
|
class="entry gridVideoRenderer background"
|
2022-05-18 03:19:22 +00:00
|
|
|
:class="
|
|
|
|
roundThumb && roundTweak > 0
|
|
|
|
? $vuetify.theme.dark
|
2022-05-18 03:53:03 +00:00
|
|
|
? 'lighten-1'
|
|
|
|
: 'darken-1'
|
2022-05-18 03:19:22 +00:00
|
|
|
: ''
|
|
|
|
"
|
|
|
|
:style="{
|
|
|
|
borderRadius: roundThumb ? `${roundTweak / 2}rem` : '0',
|
|
|
|
margin:
|
|
|
|
roundThumb && roundTweak > 0 ? '0 1rem 1rem 1rem' : '0 0 0.25rem 0',
|
|
|
|
}"
|
2022-05-14 05:10:38 +00:00
|
|
|
@click="$store.dispatch('channel/fetchChannel', video.channelId)"
|
|
|
|
>
|
2022-05-18 04:22:14 +00:00
|
|
|
<div id="details" class="pa-4">
|
2022-03-23 13:07:03 +00:00
|
|
|
<a
|
2022-03-28 02:07:03 +00:00
|
|
|
:href="
|
|
|
|
this.$rendererUtils.getNavigationEndpoints(video.navigationEndpoint)
|
|
|
|
"
|
2022-05-18 04:22:14 +00:00
|
|
|
class="avatar-link"
|
2022-03-23 13:07:03 +00:00
|
|
|
>
|
|
|
|
<v-img
|
|
|
|
class="avatar-thumbnail"
|
2022-03-24 11:47:13 +00:00
|
|
|
:src="
|
|
|
|
video.thumbnail.thumbnails[video.thumbnail.thumbnails.length - 1]
|
|
|
|
.url
|
|
|
|
"
|
2022-03-23 11:21:06 +00:00
|
|
|
/>
|
2022-03-23 13:07:03 +00:00
|
|
|
</a>
|
2022-05-18 04:22:14 +00:00
|
|
|
<v-card-text class="video-info py-0" v-emoji>
|
2022-03-23 13:07:03 +00:00
|
|
|
<div
|
|
|
|
v-for="title in video.title.runs"
|
|
|
|
:key="title.text"
|
2022-05-18 23:36:27 +00:00
|
|
|
class="vid-title mt-1"
|
2022-03-23 13:07:03 +00:00
|
|
|
>
|
|
|
|
{{ title.text }}
|
|
|
|
</div>
|
|
|
|
|
2022-03-31 06:01:29 +00:00
|
|
|
<div
|
|
|
|
class="caption background--text"
|
|
|
|
:class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
|
|
|
|
v-text="parseBottom(video)"
|
|
|
|
/>
|
2022-03-23 13:07:03 +00:00
|
|
|
</v-card-text>
|
2022-05-19 17:55:13 +00:00
|
|
|
<v-btn
|
|
|
|
fab
|
|
|
|
text
|
|
|
|
elevation="0"
|
|
|
|
style="width: 50px !important; height: 50px !important"
|
|
|
|
@click.prevent=""
|
|
|
|
>
|
|
|
|
<v-icon>mdi-share-outline</v-icon>
|
|
|
|
</v-btn>
|
2022-03-23 13:07:03 +00:00
|
|
|
</div>
|
2022-03-23 11:21:06 +00:00
|
|
|
</v-card>
|
|
|
|
</template>
|
|
|
|
|
2022-05-14 05:10:38 +00:00
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: ["video"],
|
2022-05-18 03:19:22 +00:00
|
|
|
computed: {
|
|
|
|
roundTweak() {
|
|
|
|
return this.$store.state.tweaks.roundTweak;
|
|
|
|
},
|
|
|
|
roundThumb() {
|
|
|
|
return this.$store.state.tweaks.roundThumb;
|
|
|
|
},
|
|
|
|
},
|
2022-05-14 05:10:38 +00:00
|
|
|
methods: {
|
|
|
|
parseBottom(video) {
|
|
|
|
const bottomText = [
|
|
|
|
video.subscriberCountText?.runs[0].text,
|
|
|
|
video.videoCountText?.runs.map((run) => run.text).join(" "),
|
|
|
|
];
|
|
|
|
return bottomText.join(" · ");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2022-03-23 11:21:06 +00:00
|
|
|
<style scoped>
|
|
|
|
.entry {
|
|
|
|
width: 100%; /* Prevent Loading Weirdness */
|
|
|
|
}
|
2022-03-23 13:07:03 +00:00
|
|
|
|
|
|
|
.vid-title {
|
|
|
|
display: -webkit-box;
|
|
|
|
-webkit-line-clamp: 2;
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-thumbnail {
|
|
|
|
border-radius: 50%;
|
2022-03-24 11:47:13 +00:00
|
|
|
width: 50px;
|
|
|
|
height: 50px;
|
2022-03-23 13:07:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#details {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-basis: auto;
|
|
|
|
}
|
2022-03-23 16:13:43 +00:00
|
|
|
|
|
|
|
@media screen and (orientation: landscape) {
|
|
|
|
.entry {
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
|
|
|
#details {
|
|
|
|
flex-direction: column-reverse;
|
|
|
|
}
|
|
|
|
}
|
2022-03-23 11:21:06 +00:00
|
|
|
</style>
|