mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-11-09 04:55:07 +00:00
56 lines
1.2 KiB
Vue
56 lines
1.2 KiB
Vue
|
<template>
|
||
|
<div>
|
||
|
<div
|
||
|
v-for="(video, index) in render.contents"
|
||
|
:key="index"
|
||
|
class="pa-0 fill-screen"
|
||
|
>
|
||
|
<component
|
||
|
v-if="getComponents()[Object.keys(video)[0]]"
|
||
|
:is="Object.keys(video)[0]"
|
||
|
:key="video[Object.keys(video)[0]].videoId"
|
||
|
:video="video[Object.keys(video)[0]]"
|
||
|
></component>
|
||
|
</div>
|
||
|
<div
|
||
|
v-if="
|
||
|
render.separatorDetails && render.separatorDetails.hasBottomSeparator
|
||
|
"
|
||
|
class="separator-bottom grey"
|
||
|
:style="{ height: render.separatorDetails.height + 'px' }"
|
||
|
></div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<style scoped>
|
||
|
.shelf-header {
|
||
|
width: 100%; /* Prevent Loading Weirdness */
|
||
|
padding: 10px;
|
||
|
}
|
||
|
|
||
|
.fill-screen {
|
||
|
widows: 100 vw; /* Very Hacky */
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
<script>
|
||
|
import compactVideoRenderer from "../CompactRenderers/compactVideoRenderer.vue";
|
||
|
import compactChannelRenderer from "../CompactRenderers/compactChannelRenderer.vue";
|
||
|
import gridVideoRenderer from "../GridRenderers/gridVideoRenderer.vue";
|
||
|
|
||
|
export default {
|
||
|
components: {
|
||
|
gridVideoRenderer,
|
||
|
compactVideoRenderer,
|
||
|
compactChannelRenderer,
|
||
|
},
|
||
|
props: ["render"],
|
||
|
|
||
|
methods: {
|
||
|
getComponents() {
|
||
|
return this.$options.components;
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
</script>
|