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

View file

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