Skip to content

Commit

Permalink
- FIX: Fixed breadcrumb bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-raubach committed Jun 4, 2024
1 parent f9907a4 commit c34d38c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/views/AlbumView.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<template>
<v-container v-if="currentAlbum">
<v-container>
<v-breadcrumbs>
<template v-if="albumHierarchy && albumHierarchy.length > 0">
<template v-for="h in albumHierarchy" :key="`hierarchy-item-${h.id}`">
<v-breadcrumbs-item :title="h.name" :to="{ name: 'albums-for-parent', params: { parentAlbumId: h.id } }" />
<v-breadcrumbs-divider />
<v-breadcrumbs-item :title="h.name" :to="{ name: 'albums-for-parent', params: { parentAlbumId: h.id } }" />
</template>
</template>
<v-breadcrumbs-item :title="currentAlbum.name" />
</v-breadcrumbs>

<h1 class="text-h4 mb-3">
Expand All @@ -27,7 +26,7 @@
<script>
import AlbumGallery from '@/components/AlbumGallery.vue'
import ImageGallery from '@/components/ImageGallery.vue'
import { apiPostAlbums, apiPostImages, apiPostImageIds, apiGetAlbumAlbumHierarchy, apiGetAlbumById } from '@/plugins/api'
import { apiPostAlbums, apiPostImages, apiPostImageIds, apiGetAlbumAlbumHierarchy } from '@/plugins/api'
export default {
components: {
Expand All @@ -37,8 +36,7 @@ export default {
data: function () {
return {
parentAlbumId: null,
albumHierarchy: null,
currentAlbum: null
albumHierarchy: null
}
},
methods: {
Expand All @@ -59,10 +57,6 @@ export default {
if (this.$route.params && this.$route.params.parentAlbumId) {
this.parentAlbumId = parseInt(this.$route.params.parentAlbumId)
apiGetAlbumById(this.parentAlbumId, result => {
this.currentAlbum = result
})
apiGetAlbumAlbumHierarchy(this.parentAlbumId, result => {
this.albumHierarchy = result
})
Expand Down

0 comments on commit c34d38c

Please sign in to comment.