Merge remote-tracking branch 'origin/master' into auth_passportjs

This commit is contained in:
lukeIam 2023-09-20 17:34:29 +01:00
commit 51b0750a3f
24 changed files with 118 additions and 105 deletions

View file

@ -231,8 +231,12 @@ export default {
scanComplete(data) {
console.log('Scan complete received', data)
var message = `${data.type === 'match' ? 'Match' : 'Scan'} "${data.name}" complete!`
if (data.results) {
let message = `${data.type === 'match' ? 'Match' : 'Scan'} "${data.name}" complete!`
let toastType = 'success'
if (data.error) {
message = `${data.type === 'match' ? 'Match' : 'Scan'} "${data.name}" finished with error:\n${data.error}`
toastType = 'error'
} else if (data.results) {
var scanResultMsgs = []
var results = data.results
if (results.added) scanResultMsgs.push(`${results.added} added`)
@ -247,9 +251,9 @@ export default {
var existingScan = this.$store.getters['scanners/getLibraryScan'](data.id)
if (existingScan && !isNaN(existingScan.toastId)) {
this.$toast.update(existingScan.toastId, { content: message, options: { timeout: 5000, type: 'success', closeButton: false, onClose: () => null } }, true)
this.$toast.update(existingScan.toastId, { content: message, options: { timeout: 5000, type: toastType, closeButton: false, onClose: () => null } }, true)
} else {
this.$toast.success(message, { timeout: 5000 })
this.$toast[toastType](message, { timeout: 5000 })
}
this.$store.commit('scanners/remove', data)

View file

@ -1,12 +1,12 @@
{
"name": "audiobookshelf-client",
"version": "2.4.2",
"version": "2.4.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "audiobookshelf-client",
"version": "2.4.2",
"version": "2.4.3",
"license": "ISC",
"dependencies": {
"@nuxtjs/axios": "^5.13.6",

View file

@ -1,6 +1,6 @@
{
"name": "audiobookshelf-client",
"version": "2.4.2",
"version": "2.4.3",
"description": "Self-hosted audiobook and podcast client",
"main": "index.js",
"scripts": {