diff --git a/komga-webui/src/components/BrowseLibraries.vue b/komga-webui/src/components/BrowseLibraries.vue
index 3f23cf8b3f..29e0686950 100644
--- a/komga-webui/src/components/BrowseLibraries.vue
+++ b/komga-webui/src/components/BrowseLibraries.vue
@@ -5,8 +5,12 @@
class="sticky-bar"
:style="barStyle"
>
+
+
+
- {{ libraryName }}
+ {{ library ? library.name : 'All libraries' }}
@@ -16,6 +20,7 @@
+
@@ -41,19 +46,6 @@
-
-
-
-
- mdi-dots-vertical
-
-
-
-
- Analyze
-
-
-
@@ -80,15 +72,16 @@
-
diff --git a/komga-webui/src/components/LibraryDeleteDialog.vue b/komga-webui/src/components/LibraryDeleteDialog.vue
index e577b2cb25..5e03a94225 100644
--- a/komga-webui/src/components/LibraryDeleteDialog.vue
+++ b/komga-webui/src/components/LibraryDeleteDialog.vue
@@ -99,6 +99,7 @@ export default Vue.extend({
async deleteLibrary () {
try {
await this.$store.dispatch('deleteLibrary', this.library)
+ this.$emit('deleted', true)
} catch (e) {
this.showSnack(e.message)
}
diff --git a/komga-webui/src/services/komga-libraries.service.ts b/komga-webui/src/services/komga-libraries.service.ts
index dcec743a31..637c74d5d8 100644
--- a/komga-webui/src/services/komga-libraries.service.ts
+++ b/komga-webui/src/services/komga-libraries.service.ts
@@ -57,11 +57,23 @@ export default class KomgaLibrariesService {
}
}
- async analyzeLibrary (libraryId: number) {
+ async scanLibrary (library: LibraryDto) {
try {
- await this.http.post(`${API_LIBRARIES}/${libraryId}/analyze`)
+ await this.http.post(`${API_LIBRARIES}/${library.id}/scan`)
} catch (e) {
- let msg = `An error occurred while trying to analyze library`
+ let msg = `An error occurred while trying to scan library '${library.name}'`
+ if (e.response.data.message) {
+ msg += `: ${e.response.data.message}`
+ }
+ throw new Error(msg)
+ }
+ }
+
+ async analyzeLibrary (library: LibraryDto) {
+ try {
+ await this.http.post(`${API_LIBRARIES}/${library.id}/analyze`)
+ } catch (e) {
+ let msg = `An error occurred while trying to analyze library '${library.name}'`
if (e.response.data.message) {
msg += `: ${e.response.data.message}`
}
diff --git a/komga-webui/src/views/Home.vue b/komga-webui/src/views/Home.vue
index 7952df6d6d..2b93c3c079 100644
--- a/komga-webui/src/views/Home.vue
+++ b/komga-webui/src/views/Home.vue
@@ -65,9 +65,7 @@
-
- mdi-delete
-
+
@@ -103,27 +101,21 @@
-
-
-