diff --git a/src/components/Channel.vue b/src/components/Channel.vue index 790053f7..1c5639b9 100644 --- a/src/components/Channel.vue +++ b/src/components/Channel.vue @@ -1,104 +1,101 @@ - - - + + + diff --git a/src/components/TrendingPage.vue b/src/components/TrendingPage.vue index a838f2bf..3cf223a2 100644 --- a/src/components/TrendingPage.vue +++ b/src/components/TrendingPage.vue @@ -51,9 +51,6 @@ export default { methods: { async fetchTrending() { return await (await fetch(Constants.BASE_URL + "/trending")).json(); - }, - timeFormat(d) { - return require("@/utils/TimeUtils.js").default.timeFormat(d); } } }; diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue index e26ae1b0..bb5fa793 100644 --- a/src/components/WatchVideo.vue +++ b/src/components/WatchVideo.vue @@ -14,13 +14,17 @@

- {{ video.likes }} + {{ video.likes }} +   - {{ video.dislikes }} + {{ video.dislikes }}

- {{ video.views }} views + {{ video.views }} views +

+

+ Uploaded on {{ video.uploadDate }}

0) str += pad(hours, 2) + ":"; + + str += pad(minutes, 2) + ":" + pad(seconds, 2); + + return str; + + } + } +} + const app = createApp(App) app.use(router) +app.mixin(mixin) app.component('font-awesome-icon', FontAwesomeIcon) app.mount('#app') diff --git a/src/utils/TimeUtils.js b/src/utils/TimeUtils.js deleted file mode 100644 index f60fe07f..00000000 --- a/src/utils/TimeUtils.js +++ /dev/null @@ -1,20 +0,0 @@ -export default { - timeFormat: function (duration) { - var pad = function (num, size) { - return ("000" + num).slice(size * -1); - }; - - var time = parseFloat(duration).toFixed(3), - hours = Math.floor(time / 60 / 60), - minutes = Math.floor(time / 60) % 60, - seconds = Math.floor(time - minutes * 60); - - var str = ""; - - if (hours > 0) str += pad(hours, 2) + ":"; - - str += pad(minutes, 2) + ":" + pad(seconds, 2); - - return str; - } -}