From 2c4ccc2a8f2e3d9d65ea232ba5f15ba1bd1f8c6c Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Sun, 22 Nov 2020 10:05:16 +0530 Subject: [PATCH] Display views in trending. --- src/components/TrendingPage.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/TrendingPage.vue b/src/components/TrendingPage.vue index 10c6582a..a838f2bf 100644 --- a/src/components/TrendingPage.vue +++ b/src/components/TrendingPage.vue @@ -3,23 +3,20 @@
-
+
-
+
-

{{ video.title }}

+

{{ video.title }}

{{ video.uploaderName }}

- - {{ video.views }} views + {{ timeFormat(video.duration) }} + + + {{ video.views }} views +
@@ -51,6 +51,9 @@ export default { methods: { async fetchTrending() { return await (await fetch(Constants.BASE_URL + "/trending")).json(); + }, + timeFormat(d) { + return require("@/utils/TimeUtils.js").default.timeFormat(d); } } };