From 9e354a09d18c5fa57f28f396399859878969af8f Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 13 Feb 2017 15:28:26 -0500 Subject: [PATCH] prettier stats on dashboard --- public/less/admin/general/dashboard.less | 13 +++++++++++++ public/src/admin/general/dashboard.js | 16 ++++++++-------- src/views/admin/general/dashboard.tpl | 11 +++++------ 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/public/less/admin/general/dashboard.less b/public/less/admin/general/dashboard.less index c8b704707b..12477d9142 100644 --- a/public/less/admin/general/dashboard.less +++ b/public/less/admin/general/dashboard.less @@ -136,4 +136,17 @@ .motd textarea { width: 100%; } + + .stats { + .formatted-number { + font-size: 22px; + } + + .stat { + text-transform: uppercase; + font-weight: 600; + font-size: 10px; + color: #999; + } + } } \ No newline at end of file diff --git a/public/src/admin/general/dashboard.js b/public/src/admin/general/dashboard.js index 9a5faede09..07e566ca68 100644 --- a/public/src/admin/general/dashboard.js +++ b/public/src/admin/general/dashboard.js @@ -94,20 +94,20 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator'], function (s graphData.rooms = data; var html = '
' + - '
' + data.onlineRegisteredCount + '
' + - '
[[admin/general/dashboard:active-users.users]]
' + + '' + data.onlineRegisteredCount + '' + + '
[[admin/general/dashboard:active-users.users]]
' + '
' + '
' + - '
' + data.onlineGuestCount + '
' + - '
[[admin/general/dashboard:active-users.guests]]
' + + '' + data.onlineGuestCount + '' + + '
[[admin/general/dashboard:active-users.guests]]
' + '
' + '
' + - '
' + (data.onlineRegisteredCount + data.onlineGuestCount) + '
' + - '
[[admin/general/dashboard:active-users.total]]
' + + '' + (data.onlineRegisteredCount + data.onlineGuestCount) + '' + + '
[[admin/general/dashboard:active-users.total]]
' + '
' + '
' + - '
' + data.socketCount + '
' + - '
[[admin/general/dashboard:active-users.connections]]
' + + '' + data.socketCount + '' + + '
[[admin/general/dashboard:active-users.connections]]
' + '
'; updateRegisteredGraph(data.onlineRegisteredCount, data.onlineGuestCount); diff --git a/src/views/admin/general/dashboard.tpl b/src/views/admin/general/dashboard.tpl index cc1d8d97ce..62502ea005 100644 --- a/src/views/admin/general/dashboard.tpl +++ b/src/views/admin/general/dashboard.tpl @@ -29,25 +29,25 @@
-
+
{stats.name}
{stats.day} -
[[admin/general/dashboard:stats.day]]
+
[[admin/general/dashboard:stats.day]]
{stats.week} -
[[admin/general/dashboard:stats.week]]
+
[[admin/general/dashboard:stats.week]]
{stats.month} -
[[admin/general/dashboard:stats.month]]
+
[[admin/general/dashboard:stats.month]]
{stats.alltime} -
[[admin/general/dashboard:stats.all]]
+
[[admin/general/dashboard:stats.all]]
@@ -115,7 +115,6 @@
[[admin/general/dashboard:active-users]]
-