diff --git a/client/assets/transitions.css b/client/assets/transitions.css index 55e1f73e..17667d01 100644 --- a/client/assets/transitions.css +++ b/client/assets/transitions.css @@ -20,42 +20,67 @@ transition-timing-function: cubic-bezier(0, 1, 0.5, 1); } -.slide-enter-to, .slide-leave { +.slide-enter-to, +.slide-leave { max-height: 600px; overflow: hidden; } -.slide-enter, .slide-leave-to { +.slide-enter, +.slide-leave-to { overflow: hidden; max-height: 0; } -.menu-enter, .menu-leave-active { +.menu-enter, +.menu-leave-active { transform: translateY(-15px); } + .menu-enter-active { transition: all 0.2s; } + .menu-leave-active { transition: all 0.1s; } + .menu-enter, .menu-leave-active { opacity: 0; } -.menux-enter, .menux-leave-active { +.menux-enter, +.menux-leave-active { transform: translateX(15px); } + .menux-enter-active { transition: all 0.2s; } + .menux-leave-active { transition: all 0.1s; } + .menux-enter, .menux-leave-active { opacity: 0; +} + + +.list-complete-item { + transition: all 0.8s ease; +} + +.list-complete-enter-from, +.list-complete-leave-to { + opacity: 0; + transform: translateY(30px); +} + +.list-complete-leave-active { + position: absolute; } \ No newline at end of file diff --git a/client/components/cards/LazyPlaylistCard.vue b/client/components/cards/LazyPlaylistCard.vue index a08c7d38..ea48a2d2 100644 --- a/client/components/cards/LazyPlaylistCard.vue +++ b/client/components/cards/LazyPlaylistCard.vue @@ -2,7 +2,7 @@
- +
diff --git a/client/components/covers/PlaylistCover.vue b/client/components/covers/PlaylistCover.vue index a90478db..e19bfc39 100644 --- a/client/components/covers/PlaylistCover.vue +++ b/client/components/covers/PlaylistCover.vue @@ -2,7 +2,7 @@
- +
@@ -18,8 +18,7 @@ export default { default: () => [] }, width: Number, - height: Number, - bookCoverAspectRatio: Number + height: Number }, data() { return {} diff --git a/client/components/modals/collections/AddCreateModal.vue b/client/components/modals/collections/AddCreateModal.vue index 487251a1..09571b26 100644 --- a/client/components/modals/collections/AddCreateModal.vue +++ b/client/components/modals/collections/AddCreateModal.vue @@ -112,23 +112,21 @@ export default { }, methods: { loadCollections() { - if (!this.collections.length) { - this.processing = true - this.$axios - .$get(`/api/libraries/${this.currentLibraryId}/collections`) - .then((data) => { - if (data.results) { - this.$store.commit('libraries/setCollections', data.results || []) - } - }) - .catch((error) => { - console.error('Failed to get collections', error) - this.$toast.error('Failed to load collections') - }) - .finally(() => { - this.processing = false - }) - } + this.processing = true + this.$axios + .$get(`/api/libraries/${this.currentLibraryId}/collections`) + .then((data) => { + if (data.results) { + this.$store.commit('libraries/setCollections', data.results || []) + } + }) + .catch((error) => { + console.error('Failed to get collections', error) + this.$toast.error('Failed to load collections') + }) + .finally(() => { + this.processing = false + }) }, removeFromCollection(collection) { if (!this.selectedLibraryItemId && !this.selectedBookIds.length) return @@ -231,19 +229,3 @@ export default { mounted() {} } - - \ No newline at end of file diff --git a/client/components/modals/playlists/AddCreateModal.vue b/client/components/modals/playlists/AddCreateModal.vue index 88d257d9..e583a6ee 100644 --- a/client/components/modals/playlists/AddCreateModal.vue +++ b/client/components/modals/playlists/AddCreateModal.vue @@ -15,7 +15,7 @@
@@ -77,9 +77,6 @@ export default { playlists() { return this.$store.state.libraries.userPlaylists || [] }, - bookCoverAspectRatio() { - return this.$store.getters['libraries/getBookCoverAspectRatio'] - }, sortedPlaylists() { return this.playlists .map((playlist) => { @@ -110,21 +107,19 @@ export default { return playlist.items.some((i) => i.libraryItemId === item.libraryItem.id) }, loadPlaylists() { - if (!this.playlists.length) { - this.processing = true - this.$axios - .$get(`/api/libraries/${this.currentLibraryId}/playlists`) - .then((data) => { - this.$store.commit('libraries/setUserPlaylists', data.results || []) - }) - .catch((error) => { - console.error('Failed to get playlists', error) - this.$toast.error('Failed to load user playlists') - }) - .finally(() => { - this.processing = false - }) - } + this.processing = true + this.$axios + .$get(`/api/libraries/${this.currentLibraryId}/playlists`) + .then((data) => { + this.$store.commit('libraries/setUserPlaylists', data.results || []) + }) + .catch((error) => { + console.error('Failed to get playlists', error) + this.$toast.error('Failed to load user playlists') + }) + .finally(() => { + this.processing = false + }) }, removeFromPlaylist(playlist) { if (!this.selectedPlaylistItems.length) return @@ -194,19 +189,3 @@ export default { mounted() {} } - - \ No newline at end of file diff --git a/client/components/modals/playlists/EditModal.vue b/client/components/modals/playlists/EditModal.vue index 057dabd2..05f560b4 100644 --- a/client/components/modals/playlists/EditModal.vue +++ b/client/components/modals/playlists/EditModal.vue @@ -9,7 +9,7 @@
- +
@@ -55,9 +55,6 @@ export default { this.$store.commit('globals/setShowEditPlaylistModal', val) } }, - bookCoverAspectRatio() { - return this.$store.getters['libraries/getBookCoverAspectRatio'] - }, playlist() { return this.$store.state.globals.selectedPlaylist || {} }, diff --git a/client/components/modals/playlists/UserPlaylistItem.vue b/client/components/modals/playlists/UserPlaylistItem.vue index 8522fa91..87cf5c29 100644 --- a/client/components/modals/playlists/UserPlaylistItem.vue +++ b/client/components/modals/playlists/UserPlaylistItem.vue @@ -1,8 +1,8 @@