Added more stuff for future version of the library

This commit is contained in:
RemixDev 2020-08-16 01:34:55 +02:00
parent 94c4ca00a3
commit 5f2488846b
7 changed files with 17 additions and 7 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -122,6 +122,10 @@ socket.on('logged_out', function() {
document.getElementById('home_not_logged_in').classList.remove('hide')
})
socket.on('restoringQueue', function() {
toast(i18n.t('toasts.restoringQueue'), 'loading', false, 'restoring_queue')
})
socket.on('cancellingCurrentItem', function(uuid) {
toast(i18n.t('toasts.cancellingCurrentItem'), 'loading', false, 'cancelling_' + uuid)
})

View File

@ -96,7 +96,7 @@ export default {
}
},
initQueue(data) {
const { queue: initQueue, queueComplete: initQueueComplete, currentItem, queueList: initQueueList } = data
const { queue: initQueue, queueComplete: initQueueComplete, currentItem, queueList: initQueueList, restored } = data
if (initQueueComplete.length) {
initQueueComplete.forEach(item => {
@ -114,6 +114,8 @@ export default {
initQueueList[item].init = true
this.addToQueue(initQueueList[item])
})
if (restored) toast(this.$t('toasts.queueRestored'), 'done', true, 'restoring_queue')
},
addToQueue(queueItem, current = false) {
this.queueList[queueItem.uuid] = queueItem

View File

@ -152,6 +152,8 @@ const en = {
searchbar: 'Search anything you want (or just paste a link)',
downloads: 'downloads',
toasts: {
restoringQueue: 'Restoring download queue...',
queueRestored: 'Download queue restored!',
addedToQueue: '{0} added to queue',
alreadyInQueue: '{0} is already in queue!',
finishDownload: '{0} finished downloading.',

View File

@ -154,6 +154,8 @@ const it = {
searchbar: 'Cerca qualsiasi cosa (o incolla semplicemente un link)',
downloads: 'download',
toasts: {
restoringQueue: 'Ripristinando la coda di download...',
queueRestored: 'Coda di download ripristinata!',
addedToQueue: '{0} aggiunto alla coda',
alreadyInQueue: '{0} è già nella coda!',
finishDownload: '{0} ha finito di scaricarsi.',

View File

@ -14,8 +14,8 @@
left: 0;
bottom: 0;
background-color: var(--accent-color);
-webkit-transition: width 0.1s linear;
transition: width 0.1s linear;
-webkit-transition: width 0.3s linear;
transition: width 0.3s linear;
}
.converting {