Generalize related videos rendering.

This commit is contained in:
FireMasterK 2021-06-25 00:08:04 +05:30
parent 80c4c4c0f8
commit cf6ce71339
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -85,17 +85,7 @@
v-bind:key="related.url" v-bind:key="related.url"
v-for="related in video.relatedStreams" v-for="related in video.relatedStreams"
> >
<router-link class="uk-link-muted" v-bind:to="related.url"> <VideoItem :video="related" height="94" width="168" />
<p class="uk-text-emphasis">{{ related.title }}</p>
<img style="width: 100%" v-bind:src="related.thumbnail" loading="lazy" />
</router-link>
<p>
<router-link class="uk-link-muted" v-bind:to="related.uploaderUrl || '/'">
<p>{{ related.uploaderName }}</p>
</router-link>
<font-awesome-icon icon="eye"></font-awesome-icon>
{{ numberFormat(related.views) }} views
</p>
</div> </div>
</div> </div>
</div> </div>
@ -105,6 +95,7 @@
<script> <script>
import Constants from "@/Constants.js"; import Constants from "@/Constants.js";
import Player from "@/components/Player.vue"; import Player from "@/components/Player.vue";
import VideoItem from "@/components/VideoItem.vue";
import ErrorHandler from "@/components/ErrorHandler.vue"; import ErrorHandler from "@/components/ErrorHandler.vue";
export default { export default {
@ -203,6 +194,7 @@ export default {
}, },
components: { components: {
Player, Player,
VideoItem,
ErrorHandler, ErrorHandler,
}, },
}; };