From d4833c4bc3696dde1245d2be197a603d0b164026 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 1 Mar 2019 21:03:57 -0600 Subject: [PATCH] Remove array from usage statistics (preferences) fix word wrap --- assets/css/default.css | 4 ++++ src/invidious.cr | 10 ++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/assets/css/default.css b/assets/css/default.css index 85a8911f..e721cbc7 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -339,3 +339,7 @@ img.thumbnail { margin-top: 0.5em; margin-bottom: 0.5em; } + +.pure-control-group label { + width: 10.6em; /* Enlarged width for long words, is needed for RU translation. */ +} diff --git a/src/invidious.cr b/src/invidious.cr index 70c62dbc..20bb703b 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -136,12 +136,10 @@ if config.statistics_enabled }, "openRegistrations" => config.registration_enabled, "usage" => { - { - "users" => { - "total" => PG_DB.query_one("SELECT count(*) FROM users", as: Int64), - "activeHalfyear" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '6 months'", as: Int64), - "activeMonth" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '1 month'", as: Int64), - }, + "users" => { + "total" => PG_DB.query_one("SELECT count(*) FROM users", as: Int64), + "activeHalfyear" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '6 months'", as: Int64), + "activeMonth" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '1 month'", as: Int64), }, }, "metadata" => {