forked from DebaucheryLibrarian/traxxx
Using navigation for toggling album. Using album for tag photos. Fixed portrait albums.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user