feat:(webui): Add scan all libraries button in server settings

* Add scan all libraries button

* refactor: remove error color, adjust spacing for RTL

Co-authored-by: Gauthier Roebroeck <gauthier.roebroeck@gmail.com>
This commit is contained in:
Ben Kuskopf 2021-09-10 18:11:54 +10:00 committed by GitHub
parent 1eb16b4c2a
commit 62a885417c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -632,6 +632,7 @@
},
"server": {
"server_management": {
"button_scan_libraries": "Scan all libraries",
"button_empty_trash": "Empty trash for all libraries",
"button_shutdown": "Shut down",
"section_title": "Server Management"

View file

@ -5,9 +5,12 @@
</v-row>
<v-row>
<v-col>
<v-btn @click="scanAllLibraries"
:class="$vuetify.rtl ? 'ml-4' : 'mr-4'"
>{{ $t('server.server_management.button_scan_libraries') }}
</v-btn>
<v-btn @click="confirmEmptyTrash = true"
style="margin-right: 15px"
color="error"
:class="$vuetify.rtl ? 'ml-4' : 'mr-4'"
>{{ $t('server.server_management.button_empty_trash') }}
</v-btn>
<v-btn @click="modalStopServer = true"
@ -61,6 +64,11 @@ export default Vue.extend({
this.$komgaLibraries.emptyTrash(library)
})
},
scanAllLibraries() {
this.libraries.forEach(library => {
this.$komgaLibraries.scanLibrary(library)
})
},
async stopServer() {
try {
await this.$actuator.shutdown()