Show Unknown seed/leech count on LastScrape == NULL, show scrape time
Instead of showing 0/0/0 when the torrent hasn't been scraped (which may be misleading), show "Unknown", and also show when the torrent was last scraped on the view torrent page.
Cette révision appartient à :
Parent
126ddc4fe4
révision
ccda45a452
3 fichiers modifiés avec 18 ajouts et 0 suppressions
|
@ -46,9 +46,13 @@
|
|||
</a>
|
||||
<span class="badge pull-right hidden-xs">{{ len .Comments }}</span>
|
||||
</td>
|
||||
{{if .LastScrape.IsZero}}
|
||||
<td class="hidden-xs" colspan="3" align="center">{{T "unknown"}}</td>
|
||||
{{else}}
|
||||
<td class="hidden-xs"><b class="text-success">{{.Seeders}}</b></td>
|
||||
<td class="hidden-xs"><b class="text-danger">{{.Leechers}}</b></td>
|
||||
<td class="hidden-xs">{{.Completed}}</td>
|
||||
{{end}}
|
||||
<td class="hidden-xs date date-short">{{.Date}}</td>
|
||||
<td class="hidden-xs filesize">{{.Filesize}}</td>
|
||||
<td class="hidden-xs">
|
||||
|
|
|
@ -76,9 +76,15 @@
|
|||
<div class="col-md-4">{{T "completed"}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{{if .LastScrape.IsZero}}
|
||||
<div class="col-md-12" align="center">{{T "unknown"}}</div>
|
||||
{{else}}
|
||||
<div class="col-md-4">{{.Seeders}}</div>
|
||||
<div class="col-md-4">{{.Leechers}}</div>
|
||||
<div class="col-md-4"><span class="completed" style="">{{.Completed}}</span></div>
|
||||
<div class="col-md-4">{{T "last_scraped"}}</div>
|
||||
<div class="col-md-8">{{.LastScrape.Format (Ts "date_format")}}</div>
|
||||
{{end}}
|
||||
<div class="col-md-8">
|
||||
<div class="proSeedBar">
|
||||
<div class="seeds" style="width: {{ calcWidthSeed .Seeders .Leechers }}%;"></div>
|
||||
|
|
|
@ -746,5 +746,13 @@
|
|||
{
|
||||
"id": "please_include_our_tracker",
|
||||
"translation": "Please include udp://tracker.doko.moe:6969 in your trackers."
|
||||
},
|
||||
{
|
||||
"id": "unknown",
|
||||
"translation": "Unknown"
|
||||
},
|
||||
{
|
||||
"id": "last_scraped",
|
||||
"translation": "Last scraped: "
|
||||
}
|
||||
]
|
||||
|
|
Référencer dans un nouveau ticket