Changed range toggles to links for home and actor pages.

This commit is contained in:
2020-05-07 03:20:51 +02:00
parent 2b2fb9e3e7
commit 525995615a
10 changed files with 116 additions and 104 deletions

View File

@@ -15,11 +15,7 @@ import Releases from '../releases/releases.vue';
async function fetchReleases() {
this.releases = await this.$store.dispatch('fetchReleases', {
limit: (this.$route.query && this.$route.query.limit && Number(this.$route.query.limit)) || 30,
});
this.$store.commit('setCache', {
target: 'home',
releases: this.releases,
range: this.$route.params.range,
});
}
@@ -29,13 +25,6 @@ async function mounted() {
await this.fetchReleases();
}
function updated() {
if (this.from.name === 'scene' && this.from.hash === '#home') {
const releaseTile = document.querySelector(`#scene-${this.from.params.releaseId}`);
if (releaseTile) releaseTile.scrollIntoView();
}
}
export default {
components: {
FilterBar,
@@ -43,7 +32,6 @@ export default {
},
data() {
return {
// releases: this.$store.state.releases.cache.home || [], // slows down apparent page load
releases: [],
networks: [],
pageTitle: null,
@@ -53,7 +41,6 @@ export default {
beforeRouteEnter(to, from, next) {
next(vm => vm.$set(vm, 'from', from));
},
updated,
mounted,
methods: {
fetchReleases,