mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-23 05:57:21 +00:00
Merge pull request #1230 from Bnyro/master
make trending accessible although feed is the default tab
This commit is contained in:
commit
7803732da6
@ -28,6 +28,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex-1 flex justify-end">
|
<div class="flex-1 flex justify-end">
|
||||||
<ul class="flex text-1xl children:pl-3">
|
<ul class="flex text-1xl children:pl-3">
|
||||||
|
<li v-if="shouldShowTrending">
|
||||||
|
<router-link v-t="'titles.trending'" to="/trending" />
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link v-t="'titles.preferences'" to="/preferences" />
|
<router-link v-t="'titles.preferences'" to="/preferences" />
|
||||||
</li>
|
</li>
|
||||||
@ -96,6 +99,9 @@ export default {
|
|||||||
shouldShowHistory(_this) {
|
shouldShowHistory(_this) {
|
||||||
return _this.getPreferenceBoolean("watchHistory", false);
|
return _this.getPreferenceBoolean("watchHistory", false);
|
||||||
},
|
},
|
||||||
|
shouldShowTrending(_this) {
|
||||||
|
return _this.getPreferenceString("homepage", "trending") != "trending";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// focus on search bar when Ctrl+k is pressed
|
// focus on search bar when Ctrl+k is pressed
|
||||||
|
@ -31,14 +31,16 @@ export default {
|
|||||||
activated() {
|
activated() {
|
||||||
document.title = this.$t("titles.trending") + " - Piped";
|
document.title = this.$t("titles.trending") + " - Piped";
|
||||||
if (this.videos.length > 0) this.updateWatched(this.videos);
|
if (this.videos.length > 0) this.updateWatched(this.videos);
|
||||||
switch (this.getPreferenceString("homepage", "trending")) {
|
if (this.$route.path == "/") {
|
||||||
case "trending":
|
switch (this.getPreferenceString("homepage", "trending")) {
|
||||||
break;
|
case "trending":
|
||||||
case "feed":
|
break;
|
||||||
this.$router.push("/feed");
|
case "feed":
|
||||||
return;
|
this.$router.push("/feed");
|
||||||
default:
|
return;
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -3,6 +3,11 @@ import { createRouter, createWebHistory } from "vue-router";
|
|||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: "/",
|
path: "/",
|
||||||
|
name: "Home",
|
||||||
|
component: () => import("../components/TrendingPage.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/trending",
|
||||||
name: "Trending",
|
name: "Trending",
|
||||||
component: () => import("../components/TrendingPage.vue"),
|
component: () => import("../components/TrendingPage.vue"),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user