WIP: improve search #1
|
@ -28,8 +28,8 @@ const DEFAULT_SIZE: usize = 25;
|
|||
enum SortKey {
|
||||
Name,
|
||||
Size,
|
||||
Seeders,
|
||||
Leechers,
|
||||
Seeds,
|
||||
Leeches,
|
||||
Scraped,
|
||||
}
|
||||
|
||||
|
@ -163,8 +163,8 @@ fn build_order_clause(type_: &str, sort_key: SortKey, sort_dir: SortDirection) -
|
|||
}
|
||||
},
|
||||
SortKey::Size => "size_bytes",
|
||||
SortKey::Seeders => "seeders",
|
||||
SortKey::Leechers => "leechers",
|
||||
SortKey::Seeds => "seeders",
|
||||
SortKey::Leeches => "leechers",
|
||||
SortKey::Scraped => "scraped_date",
|
||||
};
|
||||
|
||||
|
|
|
@ -161,8 +161,8 @@ export class Search extends Component<any, State> {
|
|||
<tr>
|
||||
<th class="search-name-col">{this.sortLink("Name")}</th>
|
||||
<th class="text-right">{this.sortLink("Size")}</th>
|
||||
<th class="text-right">{this.sortLink("Seeders")}</th>
|
||||
<th class="text-right d-none d-md-table-cell">{this.sortLink("Leechers")}</th>
|
||||
<th class="text-right">{this.sortLink("Seeds")}</th>
|
||||
<th class="text-right d-none d-md-table-cell">{this.sortLink("Leeches")}</th>
|
||||
<th class="text-right d-none d-md-table-cell">{this.sortLink("Scraped")}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue