mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
make trending accessible although feed is the default tab
This commit is contained in:
parent
58ce63eca4
commit
e8979d0fce
3 changed files with 22 additions and 8 deletions
|
@ -28,6 +28,9 @@
|
|||
</div>
|
||||
<div class="flex-1 flex justify-end">
|
||||
<ul class="flex text-1xl children:pl-3">
|
||||
<li v-if="shouldShowTrending">
|
||||
<router-link v-t="'titles.trending'" to="/trending" />
|
||||
</li>
|
||||
<li>
|
||||
<router-link v-t="'titles.preferences'" to="/preferences" />
|
||||
</li>
|
||||
|
@ -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
|
||||
|
|
|
@ -31,6 +31,8 @@ export default {
|
|||
activated() {
|
||||
document.title = this.$t("titles.trending") + " - Piped";
|
||||
if (this.videos.length > 0) this.updateWatched(this.videos);
|
||||
console.log(this.$route.path);
|
||||
if (this.$route.path == "/") {
|
||||
switch (this.getPreferenceString("homepage", "trending")) {
|
||||
case "trending":
|
||||
break;
|
||||
|
@ -40,6 +42,7 @@ export default {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async fetchTrending(region) {
|
||||
|
|
|
@ -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"),
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue