diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue
index 352c33b1..8888a2e2 100644
--- a/src/components/NavBar.vue
+++ b/src/components/NavBar.vue
@@ -28,6 +28,9 @@
+ -
+
+
-
@@ -96,6 +99,9 @@ export default {
shouldShowHistory(_this) {
return _this.getPreferenceBoolean("watchHistory", false);
},
+ shouldShowTrending(_this) {
+ return _this.getPreferenceString("homepage", "trending") != "trending";
+ },
},
methods: {
// focus on search bar when Ctrl+k is pressed
diff --git a/src/components/TrendingPage.vue b/src/components/TrendingPage.vue
index 62283481..d2ef385b 100644
--- a/src/components/TrendingPage.vue
+++ b/src/components/TrendingPage.vue
@@ -31,14 +31,17 @@ export default {
activated() {
document.title = this.$t("titles.trending") + " - Piped";
if (this.videos.length > 0) this.updateWatched(this.videos);
- switch (this.getPreferenceString("homepage", "trending")) {
- case "trending":
- break;
- case "feed":
- this.$router.push("/feed");
- return;
- default:
- break;
+ console.log(this.$route.path);
+ if (this.$route.path == "/") {
+ switch (this.getPreferenceString("homepage", "trending")) {
+ case "trending":
+ break;
+ case "feed":
+ this.$router.push("/feed");
+ return;
+ default:
+ break;
+ }
}
},
methods: {
diff --git a/src/router/router.js b/src/router/router.js
index 3afcabed..3895f7f7 100644
--- a/src/router/router.js
+++ b/src/router/router.js
@@ -3,6 +3,11 @@ import { createRouter, createWebHistory } from "vue-router";
const routes = [
{
path: "/",
+ name: "Home",
+ component: () => import("../components/TrendingPage.vue"),
+ },
+ {
+ path: "/trending",
name: "Trending",
component: () => import("../components/TrendingPage.vue"),
},