diff --git a/komga-webui/src/views/HomeView.vue b/komga-webui/src/views/HomeView.vue index 411a57fe2..4d3d44d89 100644 --- a/komga-webui/src/views/HomeView.vue +++ b/komga-webui/src/views/HomeView.vue @@ -75,6 +75,26 @@ mdi-plus + + + + + + {{ $t('server.server_management.button_scan_libraries') }} + + + {{ $t('server.server_management.button_scan_libraries_deep') }} + + + {{ $t('server.server_management.button_empty_trash') }} + + + + + + @@ -332,10 +360,11 @@ import ToasterNotification from '@/components/ToasterNotification.vue' import {MediaStatus} from '@/types/enum-books' import {LibraryDto} from '@/types/komga-libraries' import {BookSearch, SearchConditionAnyOfBook, SearchConditionMediaStatus, SearchOperatorIs} from '@/types/komga-search' +import ConfirmationDialog from '@/components/dialogs/ConfirmationDialog.vue' export default Vue.extend({ name: 'HomeView', - components: {ToasterNotification, LibraryActionsMenu, SearchBox, ReusableDialogs}, + components: {ConfirmationDialog, ToasterNotification, LibraryActionsMenu, SearchBox, ReusableDialogs}, data: function () { return { LIBRARIES_ALL, @@ -346,6 +375,7 @@ export default Vue.extend({ expandMediaManagement: false, expandImport: false, expandAccount: false, + confirmEmptyTrash: false, } }, async created() { @@ -442,6 +472,16 @@ export default Vue.extend({ addLibrary() { this.$store.dispatch('dialogAddLibrary') }, + emptyTrash() { + this.libraries.forEach(library => { + this.$komgaLibraries.emptyTrash(library) + }) + }, + scanAllLibraries(scanDeep: boolean) { + this.libraries.forEach(library => { + this.$komgaLibraries.scanLibrary(library, scanDeep) + }) + }, }, }) diff --git a/komga-webui/src/views/ServerManagement.vue b/komga-webui/src/views/ServerManagement.vue index 47dd42fda..0bc8a02fd 100644 --- a/komga-webui/src/views/ServerManagement.vue +++ b/komga-webui/src/views/ServerManagement.vue @@ -10,22 +10,6 @@ - - - {{ $t('server.server_management.button_scan_libraries') }} - - - {{ $t('server.server_management.button_scan_libraries_deep') }} - - - - - - {{ $t('server.server_management.button_empty_trash') }} - - - - ({ modalStopServer: false, - confirmEmptyTrash: false, }), computed: { libraries(): LibraryDto[] { @@ -84,16 +59,6 @@ export default Vue.extend({ }, }, methods: { - emptyTrash() { - this.libraries.forEach(library => { - this.$komgaLibraries.emptyTrash(library) - }) - }, - scanAllLibraries(scanDeep: boolean) { - this.libraries.forEach(library => { - this.$komgaLibraries.scanLibrary(library, scanDeep) - }) - }, async cancelAllTasks() { const count = await this.$komgaTasks.deleteAllTasks() this.$eventHub.$emit(NOTIFICATION, {