Support more torrent states [#32]

This commit is contained in:
Daan 2020-09-14 14:55:09 +02:00
parent ca1a36f4a4
commit 4bda13ab8a
2 changed files with 29 additions and 8 deletions

View file

@ -32,6 +32,12 @@
.project.queued { .project.queued {
border-left: 4px solid #2e5eaa; border-left: 4px solid #2e5eaa;
} }
.project.seeding {
border-left: 4px solid #00897B;
}
.project.checking {
border-left: 4px solid #FF7043;
}
.v-chip.done { .v-chip.done {
background: #3cd1c2 !important; background: #3cd1c2 !important;
} }
@ -47,6 +53,12 @@
.v-chip.queued { .v-chip.queued {
background: #2e5eaa !important; background: #2e5eaa !important;
} }
.v-chip.seeding {
background: #00897B!important;
}
.v-chip.checking {
background: #FF7043!important;
}
.noselect { .noselect {
-webkit-touch-callout: none; /* iOS Safari */ -webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */ -webkit-user-select: none; /* Safari */

View file

@ -26,20 +26,29 @@ export default class Torrent {
formatState(state) { formatState(state) {
switch (state) { switch (state) {
case 'pausedDL': case 'forcedDL':
return 'paused' case 'metaDL':
case 'downloading': case 'downloading':
return 'busy' return 'busy'
case 'stalledDL': case 'forcedUP':
return 'fail' return 'seeding'
case 'pausedDL':
return 'paused'
case 'pausedUP': case 'pausedUP':
return 'done' return 'done'
case 'missingFiles': case 'queuedDL':
return 'fail'
case 'stalledUP':
return 'done'
case 'queuedUP': case 'queuedUP':
return 'queued' return 'queued'
case 'allocating':
case 'checkingDL':
case 'checkingUP':
case 'queuedForChecking':
case 'checkingResumeData':
case 'moving':
return 'checking'
case 'unknown':
case 'missingFiles':
return 'fail'
default: default:
return 'fail' return 'fail'
} }