Removed screen toast spam when adding more albums / tracks in one go
This commit is contained in:
parent
ede8f7a6e1
commit
40c7ba9a0c
File diff suppressed because one or more lines are too long
@ -119,10 +119,6 @@ i /deep/ svg {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.bitcoin /deep/ svg {
|
||||
fill: #ff9900;
|
||||
}
|
||||
|
||||
.ethereum /deep/ svg {
|
||||
fill: var(--foreground);
|
||||
}
|
||||
@ -196,14 +192,12 @@ ul {
|
||||
</style>
|
||||
<script>
|
||||
import paypal from '@/assets/paypal.svg'
|
||||
import bitcoin from '@/assets/bitcoin.svg'
|
||||
import ethereum from '@/assets/ethereum.svg'
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
paypal,
|
||||
ethereum,
|
||||
bitcoin
|
||||
ethereum
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
@ -100,18 +100,18 @@ export default {
|
||||
|
||||
if (initQueueComplete.length) {
|
||||
initQueueComplete.forEach(item => {
|
||||
initQueueList[item].init = true
|
||||
initQueueList[item].silent = true
|
||||
this.addToQueue(initQueueList[item])
|
||||
})
|
||||
}
|
||||
|
||||
if (currentItem) {
|
||||
initQueueList[currentItem].init = true
|
||||
initQueueList[currentItem].silent = true
|
||||
this.addToQueue(initQueueList[currentItem], true)
|
||||
}
|
||||
|
||||
initQueue.forEach(item => {
|
||||
initQueueList[item].init = true
|
||||
initQueueList[item].silent = true
|
||||
this.addToQueue(initQueueList[item])
|
||||
})
|
||||
|
||||
@ -121,6 +121,18 @@ export default {
|
||||
}
|
||||
},
|
||||
addToQueue(queueItem, current = false) {
|
||||
if (Array.isArray(queueItem)){
|
||||
if (queueItem.length > 1){
|
||||
queueItem.forEach((item, i) => {
|
||||
item.silent = true
|
||||
this.addToQueue(item)
|
||||
});
|
||||
toast(this.$t('toasts.addedMoreToQueue', [queueItem.length]), 'playlist_add_check')
|
||||
return
|
||||
}else{
|
||||
queueItem = queueItem[0]
|
||||
}
|
||||
}
|
||||
this.queueList[queueItem.uuid] = queueItem
|
||||
|
||||
if (queueItem.downloaded + queueItem.failed == queueItem.size) {
|
||||
@ -192,7 +204,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
if (!queueItem.init) {
|
||||
if (!queueItem.silent) {
|
||||
toast(this.$t('toasts.addedToQueue', [queueItem.title]), 'playlist_add_check')
|
||||
}
|
||||
},
|
||||
|
@ -155,6 +155,7 @@ const en = {
|
||||
restoringQueue: 'Restoring download queue...',
|
||||
queueRestored: 'Download queue restored!',
|
||||
addedToQueue: '{0} added to queue',
|
||||
addedMoreToQueue: '{0} items added to queue',
|
||||
alreadyInQueue: '{0} is already in queue!',
|
||||
finishDownload: '{0} finished downloading.',
|
||||
allDownloaded: 'All downloads completed!',
|
||||
|
@ -157,6 +157,7 @@ const it = {
|
||||
restoringQueue: 'Ripristinando la coda di download...',
|
||||
queueRestored: 'Coda di download ripristinata!',
|
||||
addedToQueue: '{0} aggiunto alla coda',
|
||||
addedMoreToQueue: '{0} oggetti aggiunti alla coda',
|
||||
alreadyInQueue: '{0} è già nella coda!',
|
||||
finishDownload: '{0} ha finito di scaricarsi.',
|
||||
allDownloaded: 'Tutti i download completati!',
|
||||
|
Loading…
Reference in New Issue
Block a user