mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-18 20:47:33 +01:00
nice numbers in tables
This commit is contained in:
@@ -211,7 +211,7 @@ function calculateDeltas(results) {
|
||||
|
||||
function increasePercent(last, now) {
|
||||
const percent = last ? (now - last) / last * 100 : 0;
|
||||
return percent.toFixed(1);
|
||||
return percent.toFixed(0);
|
||||
}
|
||||
results.yesterday -= results.today;
|
||||
results.dayIncrease = increasePercent(results.yesterday, results.today);
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<div class="card-body">
|
||||
<div id="active-users" class="stats">
|
||||
<table class="table table-sm text-sm">
|
||||
<tbody>
|
||||
<tbody class="text-tabular">
|
||||
<tr>
|
||||
<td>[[admin/dashboard:active-users.users]]</td>
|
||||
<td id="active-users-loggedin" class="text-end" style="width: 1px;"></td>
|
||||
@@ -140,7 +140,7 @@
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between">[[admin/dashboard:popular-searches]] <a href="{config.relative_path}/admin/dashboard/searches" class="text-xs">[[admin/dashboard:view-all]]</a></div>
|
||||
<div class="card-body">
|
||||
<table class="table table-sm text-sm search-list w-100">
|
||||
<table class="table table-sm text-sm text-tabular search-list w-100">
|
||||
<tbody>
|
||||
{{{ each popularSearches }}}
|
||||
<tr>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
{{{ each users }}}
|
||||
<tr class="user-row align-middle">
|
||||
<th><input component="user/select/single" data-uid="{users.uid}" type="checkbox"/></th>
|
||||
<td class="text-end">{users.uid}</td>
|
||||
<td class="text-end text-tabular">{users.uid}</td>
|
||||
<td>
|
||||
<i title="[[admin/manage/users:users.banned]]" class="ban fa fa-gavel text-danger{{{ if !users.banned }}} hidden{{{ end }}}"></i>
|
||||
<i class="administrator fa fa-shield text-success{{{ if !users.administrator }}} hidden{{{ end }}}"></i>
|
||||
@@ -172,9 +172,9 @@
|
||||
</div>
|
||||
{{{ end }}}
|
||||
</td>
|
||||
<td class="text-end">{formattedNumber(users.postcount)}</td>
|
||||
<td class="text-end" component="user/reputation" data-uid="{users.uid}">{formattedNumber(users.reputation)}</td>
|
||||
<td class="text-end">{{{ if users.flags }}}{users.flags}{{{ else }}}0{{{ end }}}</td>
|
||||
<td class="text-end text-tabular">{formattedNumber(users.postcount)}</td>
|
||||
<td class="text-end text-tabular" component="user/reputation" data-uid="{users.uid}">{formattedNumber(users.reputation)}</td>
|
||||
<td class="text-end text-tabular">{{{ if users.flags }}}{users.flags}{{{ else }}}0{{{ end }}}</td>
|
||||
<td><span class="timeago" title="{users.joindateISO}"></span></td>
|
||||
<td><span class="timeago" title="{users.lastonlineISO}"></span></td>
|
||||
</tr>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{{{ end }}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-sm">
|
||||
<tbody class="text-sm text-tabular">
|
||||
{{{ each stats }}}
|
||||
<tr>
|
||||
<td class="fw-bold text-nowrap">
|
||||
@@ -31,15 +31,15 @@
|
||||
</td>
|
||||
<td class="text-end">{formattedNumber(./yesterday)}</td>
|
||||
<td class="text-end">{formattedNumber(./today)}</td>
|
||||
<td class="{./dayTextClass}"><small>{./dayIncrease}%</small></td>
|
||||
<td class="{./dayTextClass} text-end"><small>{./dayIncrease}%</small></td>
|
||||
|
||||
<td class="text-end">{formattedNumber(./lastweek)}</td>
|
||||
<td class="text-end">{formattedNumber(./thisweek)}</td>
|
||||
<td class="{./weekTextClass}"><small>{./weekIncrease}%</small></td>
|
||||
<td class="{./weekTextClass} text-end"><small>{./weekIncrease}%</small></td>
|
||||
|
||||
<td class="text-end">{formattedNumber(./lastmonth)}</td>
|
||||
<td class="text-end">{formattedNumber(./thismonth)}</td>
|
||||
<td class="{./monthTextClass}"><small>{./monthIncrease}%</small></td>
|
||||
<td class="{./monthTextClass} text-end"><small>{./monthIncrease}%</small></td>
|
||||
{{{ if !hideAllTime}}}
|
||||
<td class="text-end">{formattedNumber(./alltime)}</td>
|
||||
{{{ end }}}
|
||||
|
||||
Reference in New Issue
Block a user