Added more torrent statuses and removed the ability to select the text in the torrents themselves (#22)

* Added more status options

* Removed text selection in torrent card
This commit is contained in:
Tyler 2020-08-05 16:10:57 -04:00 committed by GitHub
parent 352a288ae7
commit 7673c295a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 6 deletions

View file

@ -2,7 +2,7 @@
<v-card
ripple
flat
class="pointer torrent"
class="pointer torrent noselect"
:class="containsTorrent(torrent.hash) ? 'torrent_selected' : ''"
@click.native="selectTorrent(torrent.hash)"
@dblclick.prevent="showInfo(torrent.hash)"
@ -175,7 +175,10 @@ export default {
<style>
.project.done {
border-left: 4px solid #3cd1c2;
border-left: 4px solid #2E5EAA;
}
.project.downloading {
border-left: 4px solid #1FC176;
}
.project.busy {
border-left: 4px solid #ffaa2c;
@ -184,10 +187,13 @@ export default {
border-left: 4px solid #f83e70;
}
.project.paused {
border-left: 4px solid #cfd8dc;
border-left: 4px solid #EB8A90;
}
.v-chip.done {
background: #3cd1c2 !important;
background: #2E5EAA !important;
}
.v-chip.downloading {
background: #1FC176 !important;
}
.v-chip.busy {
background: #ffaa2c !important;
@ -196,7 +202,16 @@ export default {
background: #f83e70 !important;
}
.v-chip.paused {
background: #cfd8dc !important;
background: #EB8A90 !important;
}
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
}
.pointer {
cursor: pointer;

View file

@ -26,11 +26,12 @@ export default class Torrent {
}
formatState(state) {
switch (state) {
case 'pausedDL':
return 'paused'
case 'downloading':
return 'busy'
return 'downloading'
case 'stalledDL':
return 'fail'
case 'pausedUP':
@ -39,6 +40,8 @@ export default class Torrent {
return 'fail'
case 'stalledUP':
return 'done'
case 'queuedUP':
return 'busy'
default:
return 'fail'
}