diff --git a/client/components/app/ConfigSideNav.vue b/client/components/app/ConfigSideNav.vue index 7ebb764d..bbadecc3 100644 --- a/client/components/app/ConfigSideNav.vue +++ b/client/components/app/ConfigSideNav.vue @@ -4,7 +4,7 @@ arrow_back - +

{{ route.title }}

diff --git a/client/components/modals/Dialog.vue b/client/components/modals/Dialog.vue new file mode 100644 index 00000000..f1c37bf4 --- /dev/null +++ b/client/components/modals/Dialog.vue @@ -0,0 +1,56 @@ + + + diff --git a/client/components/modals/ListeningSessionModal.vue b/client/components/modals/ListeningSessionModal.vue index f460cada..f9994e70 100644 --- a/client/components/modals/ListeningSessionModal.vue +++ b/client/components/modals/ListeningSessionModal.vue @@ -5,7 +5,7 @@

Session {{ _session.id }}

-
+

{{ _session.displayTitle }}

by {{ _session.displayAuthor }}

diff --git a/client/components/stats/Heatmap.vue b/client/components/stats/Heatmap.vue index b4e638e9..293589ad 100644 --- a/client/components/stats/Heatmap.vue +++ b/client/components/stats/Heatmap.vue @@ -2,7 +2,7 @@

{{ Object.values(daysListening).length }} listening sessions in the last year

-
+
{{ dayLabel.label }}
diff --git a/client/components/tables/library/LibrariesTable.vue b/client/components/tables/library/LibrariesTable.vue index d606c235..329f0a1e 100644 --- a/client/components/tables/library/LibrariesTable.vue +++ b/client/components/tables/library/LibrariesTable.vue @@ -9,7 +9,7 @@ diff --git a/client/components/tables/library/LibraryItem.vue b/client/components/tables/library/LibraryItem.vue index 48c3cbcd..b03dc819 100644 --- a/client/components/tables/library/LibraryItem.vue +++ b/client/components/tables/library/LibraryItem.vue @@ -7,19 +7,26 @@

{{ library.name }}

- Scan - Force Re-Scan + + - Match Books + - edit - delete + edit + delete + + + edit + more_vert
- reorder + reorder + + +
@@ -31,22 +38,19 @@ export default { default: () => {} }, selected: Boolean, - showEdit: Boolean, dragging: Boolean }, data() { return { mouseover: false, - isDeleting: false + isDeleting: false, + showMobileMenu: false } }, computed: { isHovering() { return this.mouseover && !this.dragging }, - isMain() { - return this.library.id === 'main' - }, libraryScan() { return this.$store.getters['scanners/getLibraryScan'](this.library.id) }, @@ -55,9 +59,50 @@ export default { }, isBookLibrary() { return this.mediaType === 'book' + }, + menuTitle() { + return this.library.name + }, + mobileMenuItems() { + const items = [ + { + text: 'Scan', + value: 'scan' + }, + { + text: 'Force Re-Scan', + value: 'force-scan' + } + ] + if (this.isBookLibrary) { + items.push({ + text: 'Match Books', + value: 'match-books' + }) + } + items.push({ + text: 'Delete', + value: 'delete' + }) + return items } }, methods: { + mobileMenuAction(action) { + this.showMobileMenu = false + if (action === 'scan') { + this.scan() + } else if (action === 'force-scan') { + this.forceScan() + } else if (action === 'match-books') { + this.matchAll() + } else if (action === 'delete') { + this.deleteClick() + } + }, + showMenu() { + this.showMobileMenu = true + }, matchAll() { this.$axios .$post(`/api/libraries/${this.library.id}/matchall`) @@ -98,7 +143,6 @@ export default { } }, deleteClick() { - if (this.isMain) return if (confirm(`Are you sure you want to permanently delete library "${this.library.name}"?`)) { this.isDeleting = true this.$axios