From 403a8535e9ada72c430615ca32a34af4ab1ee7ea Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 24 Mar 2022 02:07:03 +1300 Subject: [PATCH] refactor: better searching using the innertube API --- .../VideoRenderers/compactVideoRenderer.vue | 105 +++++++++++--- ...mmended.vue => horizontalListRenderer.vue} | 7 + NUXT/pages/home.vue | 4 +- NUXT/pages/search.vue | 24 +-- NUXT/pages/watch.vue | 4 +- NUXT/plugins/innertube.js | 137 +++++++++++++----- NUXT/plugins/youtube.js | 68 ++++----- 7 files changed, 236 insertions(+), 113 deletions(-) rename NUXT/components/{recommended.vue => horizontalListRenderer.vue} (81%) diff --git a/NUXT/components/VideoRenderers/compactVideoRenderer.vue b/NUXT/components/VideoRenderers/compactVideoRenderer.vue index dd32c02..1091e91 100644 --- a/NUXT/components/VideoRenderers/compactVideoRenderer.vue +++ b/NUXT/components/VideoRenderers/compactVideoRenderer.vue @@ -1,17 +1,53 @@ @@ -23,23 +59,54 @@ position: absolute; bottom: 10px; right: 10px; - background: rgba(0, 0, 0, 0.5); border-radius: 5px; padding: 0px 4px 0px 4px; } + +.videoRuntimeFloat.style-DEFAULT { + background: rgba(0, 0, 0, 0.5); +} + +.videoRuntimeFloat.style-LIVE { + background: rgba(255, 0, 0, 0.5); +} + +.vid-title { + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + text-overflow: ellipsis; + overflow: hidden; +} + +.avatar-thumbnail { + margin-top: 0.5rem; + margin-left: 0.5rem; + border-radius: 50%; + width: 35px; + height: 35px; +} + +#details { + display: flex; + flex-direction: row; + flex-basis: auto; +} diff --git a/NUXT/pages/home.vue b/NUXT/pages/home.vue index 6e83a5d..983b4ec 100644 --- a/NUXT/pages/home.vue +++ b/NUXT/pages/home.vue @@ -4,11 +4,13 @@ * This is to allow use of "recommended" videos on other pages such as /watch * -Front * --> - +