Fix item edit modal show next/prev arrows when opening from Files or Match context menu item #4718

This commit is contained in:
advplyr 2025-10-08 14:52:14 -05:00
parent 3e876e3383
commit cafd92e206
5 changed files with 10 additions and 10 deletions

View File

@ -93,10 +93,10 @@ export default {
editAuthor(author) { editAuthor(author) {
this.$store.commit('globals/showEditAuthorModal', author) this.$store.commit('globals/showEditAuthorModal', author)
}, },
editItem(libraryItem) { editItem(libraryItem, tab = 'details') {
var itemIds = this.shelf.entities.map((e) => e.id) var itemIds = this.shelf.entities.map((e) => e.id)
this.$store.commit('setBookshelfBookIds', itemIds) this.$store.commit('setBookshelfBookIds', itemIds)
this.$store.commit('showEditModal', libraryItem) this.$store.commit('showEditModalOnTab', { libraryItem, tab: tab || 'details' })
}, },
editEpisode({ libraryItem, episode }) { editEpisode({ libraryItem, episode }) {
this.$store.commit('setEpisodeTableEpisodeIds', [episode.id]) this.$store.commit('setEpisodeTableEpisodeIds', [episode.id])

View File

@ -232,11 +232,11 @@ export default {
clearFilter() { clearFilter() {
this.$store.dispatch('user/updateUserSettings', { filterBy: 'all' }) this.$store.dispatch('user/updateUserSettings', { filterBy: 'all' })
}, },
editEntity(entity) { editEntity(entity, tab = 'details') {
if (this.entityName === 'items' || this.entityName === 'series-books') { if (this.entityName === 'items' || this.entityName === 'series-books') {
const bookIds = this.entities.map((e) => e.id) const bookIds = this.entities.map((e) => e.id)
this.$store.commit('setBookshelfBookIds', bookIds) this.$store.commit('setBookshelfBookIds', bookIds)
this.$store.commit('showEditModal', entity) this.$store.commit('showEditModalOnTab', { libraryItem: entity, tab: tab || 'details' })
} else if (this.entityName === 'collections') { } else if (this.entityName === 'collections') {
this.$store.commit('globals/setEditCollection', entity) this.$store.commit('globals/setEditCollection', entity)
} else if (this.entityName === 'playlists') { } else if (this.entityName === 'playlists') {

View File

@ -788,11 +788,11 @@ export default {
}, },
showEditModalFiles() { showEditModalFiles() {
// More menu func // More menu func
this.store.commit('showEditModalOnTab', { libraryItem: this.libraryItem, tab: 'files' }) this.$emit('edit', this.libraryItem, 'files')
}, },
showEditModalMatch() { showEditModalMatch() {
// More menu func // More menu func
this.store.commit('showEditModalOnTab', { libraryItem: this.libraryItem, tab: 'match' }) this.$emit('edit', this.libraryItem, 'match')
}, },
sendToDevice(deviceName) { sendToDevice(deviceName) {
// More menu func // More menu func

View File

@ -132,10 +132,10 @@ export default {
editAuthor(author) { editAuthor(author) {
this.$store.commit('globals/showEditAuthorModal', author) this.$store.commit('globals/showEditAuthorModal', author)
}, },
editItem(libraryItem) { editItem(libraryItem, tab = 'details') {
var itemIds = this.items.map((e) => e.id) var itemIds = this.items.map((e) => e.id)
this.$store.commit('setBookshelfBookIds', itemIds) this.$store.commit('setBookshelfBookIds', itemIds)
this.$store.commit('showEditModal', libraryItem) this.$store.commit('showEditModalOnTab', { libraryItem, tab: tab || 'details' })
}, },
selectItem(payload) { selectItem(payload) {
this.$emit('selectEntity', payload) this.$emit('selectEntity', payload)

View File

@ -118,8 +118,8 @@ export default {
propsData: props, propsData: props,
parent: this, parent: this,
created() { created() {
this.$on('edit', (entity) => { this.$on('edit', (entity, tab) => {
if (_this.editEntity) _this.editEntity(entity) if (_this.editEntity) _this.editEntity(entity, tab)
}) })
this.$on('select', ({ entity, shiftKey }) => { this.$on('select', ({ entity, shiftKey }) => {
if (_this.selectEntity) _this.selectEntity(entity, shiftKey) if (_this.selectEntity) _this.selectEntity(entity, shiftKey)