Changed next page determination to ensure --after is followed even if there are no unique releases.

This commit is contained in:
DebaucheryLibrarian
2020-09-10 23:49:24 +02:00
parent a833476437
commit 0e8024adf1
8 changed files with 31 additions and 28 deletions

View File

@@ -13,7 +13,6 @@
<Header :toggle-sidebar="toggleSidebar" />
<div class="content">
<!-- key forces rerender when new and old path use same component -->
<router-view />
</div>
</div>

View File

@@ -218,7 +218,7 @@ export default {
}
.logo-child {
height: 2.5rem;
height: 2rem;
}
.logo-parent {

View File

@@ -79,7 +79,7 @@
<router-link
v-for="movie in release.movies"
:key="`movie-${movie.id}`"
:to="{ name: 'movie', params: { movieId: movie.id, movieSlug: movie.slug } }"
:to="{ name: 'movie', params: { releaseId: movie.id, releaseSlug: movie.slug } }"
class="movie"
>
<span class="movie-title">{{ movie.title }}</span>
@@ -209,13 +209,7 @@ import Releases from './releases.vue';
import Scroll from '../scroll/scroll.vue';
import Expand from '../expand/expand.vue';
function pageTitle() {
return this.release
&& (this.release.title
|| (this.release.actors.length > 0 ? `${this.release.actors.map(actor => actor.name).join(', ')} for ${this.release.entity.name}` : null));
}
async function mounted() {
async function fetchRelease() {
if (this.$route.name === 'scene') {
this.release = await this.$store.dispatch('fetchReleaseById', this.$route.params.releaseId);
}
@@ -225,6 +219,12 @@ async function mounted() {
}
}
function pageTitle() {
return this.release
&& (this.release.title
|| (this.release.actors.length > 0 ? `${this.release.actors.map(actor => actor.name).join(', ')} for ${this.release.entity.name}` : null));
}
export default {
components: {
Actor,
@@ -245,7 +245,13 @@ export default {
computed: {
pageTitle,
},
mounted,
watch: {
$route: fetchRelease,
},
mounted: fetchRelease,
methods: {
fetchRelease,
},
};
</script>