@@ -47,7 +47,7 @@ export default {
data() {
return {
isFocused: false,
- currentSearch: null,
+ // currentSearch: null,
typingTimeout: null,
textInput: null
}
@@ -70,12 +70,13 @@ export default {
}
},
itemsToShow() {
- if (!this.currentSearch || !this.textInput || this.textInput === this.input) {
- return this.items
+ if (!this.editable) return this.items
+ if (!this.textInput || this.textInput === this.input) {
+ return []
}
return this.items.filter((i) => {
var iValue = String(i).toLowerCase()
- return iValue.includes(this.currentSearch.toLowerCase())
+ return iValue.includes(this.textInput.toLowerCase())
})
}
},
@@ -83,7 +84,7 @@ export default {
keydownInput() {
clearTimeout(this.typingTimeout)
this.typingTimeout = setTimeout(() => {
- this.currentSearch = this.textInput
+ // this.currentSearch = this.textInput
}, 100)
},
inputFocus() {
@@ -127,11 +128,11 @@ export default {
if (val && !this.items.includes(val)) {
this.$emit('newItem', val)
}
- this.currentSearch = null
+ // this.currentSearch = null
},
clickedOption(e, item) {
this.textInput = null
- this.currentSearch = null
+ // this.currentSearch = null
this.input = item
if (this.$refs.input) this.$refs.input.blur()
}
diff --git a/client/components/ui/MultiSelect.vue b/client/components/ui/MultiSelect.vue
index ed7f812c..7043f641 100644
--- a/client/components/ui/MultiSelect.vue
+++ b/client/components/ui/MultiSelect.vue
@@ -70,7 +70,7 @@ export default {
computed: {
selected: {
get() {
- return this.value
+ return this.value || []
},
set(val) {
this.$emit('input', val)
diff --git a/client/components/ui/MultiSelectQueryInput.vue b/client/components/ui/MultiSelectQueryInput.vue
index 93948038..1a448ade 100644
--- a/client/components/ui/MultiSelectQueryInput.vue
+++ b/client/components/ui/MultiSelectQueryInput.vue
@@ -82,6 +82,9 @@ export default {
this.$emit('input', val)
}
},
+ userToken() {
+ return this.$store.getters['user/getToken']
+ },
wrapperClass() {
var classes = []
if (this.disabled) classes.push('bg-black-300')
@@ -110,7 +113,7 @@ export default {
if (this.searching) return
this.currentSearch = this.textInput
this.searching = true
- var results = await this.$axios.$get(`/api/${this.endpoint}?q=${this.currentSearch}&limit=15`).catch((error) => {
+ var results = await this.$axios.$get(`/api/${this.endpoint}?q=${this.currentSearch}&limit=15&token=${this.userToken}`).catch((error) => {
console.error('Failed to get search results', error)
return []
})
diff --git a/client/components/widgets/ItemDetailsEdit.vue b/client/components/widgets/ItemDetailsEdit.vue
new file mode 100644
index 00000000..aa529972
--- /dev/null
+++ b/client/components/widgets/ItemDetailsEdit.vue
@@ -0,0 +1,334 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/client/layouts/default.vue b/client/layouts/default.vue
index 086365cd..123e5f0e 100644
--- a/client/layouts/default.vue
+++ b/client/layouts/default.vue
@@ -32,8 +32,8 @@ export default {
if (this.$store.state.showEditModal) {
this.$store.commit('setShowEditModal', false)
}
- if (this.$store.state.selectedAudiobooks) {
- this.$store.commit('setSelectedAudiobooks', [])
+ if (this.$store.state.selectedLibraryItems) {
+ this.$store.commit('setSelectedLibraryItems', [])
}
if (this.$store.state.audiobooks.keywordFilter) {
this.$store.commit('audiobooks/setKeywordFilter', '')
@@ -486,9 +486,9 @@ export default {
}
// Batch selecting
- if (this.$store.getters['getNumAudiobooksSelected'] && name === 'Escape') {
+ if (this.$store.getters['getNumLibraryItemsSelected'] && name === 'Escape') {
// ESCAPE key cancels batch selection
- this.$store.commit('setSelectedAudiobooks', [])
+ this.$store.commit('setSelectedLibraryItems', [])
this.$eventBus.$emit('bookshelf-clear-selection')
e.preventDefault()
return
diff --git a/client/mixins/bookshelfCardsHelpers.js b/client/mixins/bookshelfCardsHelpers.js
index 829d7fe7..b9b379c3 100644
--- a/client/mixins/bookshelfCardsHelpers.js
+++ b/client/mixins/bookshelfCardsHelpers.js
@@ -30,7 +30,7 @@ export default {
shelfEl.appendChild(bookComponent.$el)
if (this.isSelectionMode) {
bookComponent.setSelectionMode(true)
- if (this.selectedAudiobooks.includes(bookComponent.audiobookId) || this.isSelectAll) {
+ if (this.selectedLibraryItems.includes(bookComponent.libraryItemId) || this.isSelectAll) {
bookComponent.selected = true
} else {
bookComponent.selected = false
@@ -85,7 +85,7 @@ export default {
}
if (this.isSelectionMode) {
instance.setSelectionMode(true)
- if (instance.audiobookId && this.selectedAudiobooks.includes(instance.audiobookId) || this.isSelectAll) {
+ if (instance.libraryItemId && this.selectedLibraryItems.includes(instance.libraryItemId) || this.isSelectAll) {
instance.selected = true
}
}
diff --git a/client/pages/batch/index.vue b/client/pages/batch/index.vue
index 7a6194af..45f3e616 100644
--- a/client/pages/batch/index.vue
+++ b/client/pages/batch/index.vue
@@ -1,5 +1,5 @@
-
+
{{ openMapOptions ? 'expand_less' : 'expand_more' }}
@@ -14,8 +14,9 @@
-
-
+
+
+
@@ -23,7 +24,7 @@
-
+
@@ -34,8 +35,8 @@
-
-
+
+
@@ -45,6 +46,20 @@
+
Apply
@@ -55,71 +70,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -127,7 +80,7 @@
-