mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
parent
ea5ae4b37f
commit
e79d26ddbc
2 changed files with 7 additions and 2 deletions
|
|
@ -14,6 +14,6 @@ public RulesController(RuleService ruleService)
|
|||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Index() => Json(new {Count = await _ruleService.GetCountAll()});
|
||||
public async Task<IActionResult> Index() => Json(await _ruleService.GetCountAll());
|
||||
}
|
||||
}
|
||||
|
|
@ -58,12 +58,17 @@ export class Home extends React.Component<RouteComponentProps<{}>, IHomeState> {
|
|||
|
||||
private static renderTagline(state: IHomeState) {
|
||||
return <p className="ml-2 mr-2">
|
||||
The independent, comprehensive directory of <strong>{state.ruleCount
|
||||
The independent, comprehensive directory of <strong>{this.insertCommasInNumber(state.ruleCount)
|
||||
}</strong> unique rules across <strong>{state.lists.length
|
||||
}</strong> filter and host lists for advertisements, trackers, malware, and annoyances.
|
||||
</p>;
|
||||
}
|
||||
|
||||
//https://stackoverflow.com/a/2901298/2343739
|
||||
private static insertCommasInNumber(num: number) {
|
||||
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
private static renderFilterListsTable(filterLists: IListDto[]) {
|
||||
return <ReactTable
|
||||
data={filterLists}
|
||||
|
|
|
|||
Loading…
Reference in a new issue