diff --git a/NUXT/components/topNavigation.vue b/NUXT/components/topNavigation.vue index fb68dbe..ceaa8bb 100644 --- a/NUXT/components/topNavigation.vue +++ b/NUXT/components/topNavigation.vue @@ -29,6 +29,15 @@ + mdi-refresh ({ text: "", }), + methods: { + refreshRecommendations() { + this.$emit("scroll-to-top"); + this.$store.commit("updateRecommendedVideos", []); + this.$youtube + .recommend() + .then((result) => { + if (result) this.$store.commit("updateRecommendedVideos", result[0]); + }) + .catch((error) => this.$logger("Home Page (Nav Refresh)", error, true)); + }, + }, }; diff --git a/NUXT/layouts/default.vue b/NUXT/layouts/default.vue index fa842ed..2f84176 100644 --- a/NUXT/layouts/default.vue +++ b/NUXT/layouts/default.vue @@ -6,6 +6,7 @@ @close-search="search = !search" @search-btn="searchBtn" @text-changed="textChanged" + @scroll-to-top="$refs.pgscroll.scrollTop = 0" />