diff --git a/src/FilterLists.Api/V1/Controllers/RulesController.cs b/src/FilterLists.Api/V1/Controllers/RulesController.cs index 714bb13ab..b1037c0cc 100644 --- a/src/FilterLists.Api/V1/Controllers/RulesController.cs +++ b/src/FilterLists.Api/V1/Controllers/RulesController.cs @@ -14,6 +14,6 @@ public RulesController(RuleService ruleService) } [HttpGet] - public async Task Index() => Json(new {Count = await _ruleService.GetCountAll()}); + public async Task Index() => Json(await _ruleService.GetCountAll()); } } \ No newline at end of file diff --git a/src/FilterLists.Web/ClientApp/components/Home.tsx b/src/FilterLists.Web/ClientApp/components/Home.tsx index 10b12ef87..adf13e0e7 100644 --- a/src/FilterLists.Web/ClientApp/components/Home.tsx +++ b/src/FilterLists.Web/ClientApp/components/Home.tsx @@ -58,12 +58,17 @@ export class Home extends React.Component, IHomeState> { private static renderTagline(state: IHomeState) { return

- The independent, comprehensive directory of {state.ruleCount + The independent, comprehensive directory of {this.insertCommasInNumber(state.ruleCount) } unique rules across {state.lists.length } filter and host lists for advertisements, trackers, malware, and annoyances.

; } + //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