Add move to the item page

This commit is contained in:
Tiberiu Ichim 2026-02-06 14:16:28 +02:00
parent 37626b8d60
commit 4cfafeb174
2 changed files with 8 additions and 0 deletions

View file

@ -50,6 +50,7 @@ POST /api/items/:id/move
| `client/components/modals/item/MoveToLibraryModal.vue` | **NEW** - Modal component |
| `client/store/globals.js` | State: `showMoveToLibraryModal`, Mutation: `setShowMoveToLibraryModal` |
| `client/components/cards/LazyBookCard.vue` | Menu item `openMoveToLibraryModal` in `moreMenuItems` |
| `client/pages/item/_id/index.vue` | Added "Move to library" to context menu |
| `client/layouts/default.vue` | Added `<modals-item-move-to-library-modal />` |
| `client/strings/en-us.json` | Localization strings |

View file

@ -424,6 +424,10 @@ export default {
}
if (this.userCanDelete) {
items.push({
text: this.$strings.ButtonMoveToLibrary,
action: 'move'
})
items.push({
text: this.$strings.ButtonDelete,
action: 'delete'
@ -771,6 +775,9 @@ export default {
this.downloadLibraryItem()
} else if (action === 'delete') {
this.deleteLibraryItem()
} else if (action === 'move') {
this.$store.commit('setSelectedLibraryItem', this.libraryItem)
this.$store.commit('globals/setShowMoveToLibraryModal', true)
} else if (action === 'sendToDevice') {
this.sendToDevice(data)
} else if (action === 'share') {