mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-25 02:45:48 +03:00
Support more torrent states [#32]
This commit is contained in:
parent
ca1a36f4a4
commit
4bda13ab8a
2 changed files with 29 additions and 8 deletions
|
@ -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 */
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue