Using navigation for toggling album. Using album for tag photos. Fixed portrait albums.

This commit is contained in:
DebaucheryLibrarian
2021-02-03 19:21:47 +01:00
parent e3dc989798
commit 11ad5f8bad
8 changed files with 146 additions and 47 deletions

View File

@@ -22,14 +22,14 @@
<button
v-if="release.photos.length > 0"
class="album-toggle"
@click="showAlbum = true"
@click="$router.push({ hash: '#album' })"
><Icon icon="grid3" />View album</button>
<Album
v-if="showAlbum"
:items="release.photos"
:title="release.title"
@close="showAlbum = false"
@close="$router.go(-1)"
/>
<div class="info column">
@@ -233,6 +233,10 @@ function pageTitle() {
|| (this.release.actors.length > 0 ? `${this.release.actors.map(actor => actor.name).join(', ')} for ${this.release.entity.name}` : null));
}
function showAlbum() {
return this.release.photos?.length > 0 && this.$route.hash === '#album';
}
export default {
components: {
Actor,
@@ -247,12 +251,12 @@ export default {
data() {
return {
release: null,
showAlbum: false,
};
},
computed: {
pageTitle,
bannerBackground,
showAlbum,
},
watch: {
$route: fetchRelease,