From 6afe3e42f3601f4be65724c6c06951f1a4726fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 6 Jun 2018 12:20:44 +0200 Subject: [PATCH] Add visual indicator for setup checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- settings/css/settings.scss | 28 ++++++++++++++++--- settings/js/admin.js | 9 ++++-- .../templates/settings/admin/overview.php | 21 +++++++++----- 3 files changed, 44 insertions(+), 14 deletions(-) diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 6adac7704c..3062b9f51f 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -1038,10 +1038,29 @@ table.grid td.date { margin-top: 20px; } -#security-warning-state span { - padding-left: 25px; - background-position: 5px center; - margin-left: -5px; +#security-warning-state-ok, +#security-warning-state-failure, +#security-warning-state-loading { + span { + vertical-align: middle; + + &.message { + padding: 12px; + } + &.icon { + width: 32px; + height: 32px; + background-position: center center; + display: inline-block; + border-radius: 50%; + } + &.icon-checkmark-white { + background-color: $color-success; + } + &.icon-close-white { + background-color: $color-error; + } + } } #shareAPI { @@ -1204,6 +1223,7 @@ doesnotexist:-o-prefocus, .strengthify-wrapper { list-style: circle; } } + .loading { height: 50px; background-position: left center; diff --git a/settings/js/admin.js b/settings/js/admin.js index 650bc84930..0ebe1ebb23 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -256,7 +256,7 @@ $(document).ready(function(){ ).then(function(check1, check2, check3, check4, check5, check6) { var messages = [].concat(check1, check2, check3, check4, check5, check6); var $el = $('#postsetupchecks'); - $el.find('.loading').addClass('hidden'); + $('#security-warning-state-loading').addClass('hidden'); var hasMessages = false; var $errorsEl = $el.find('.errors'); @@ -291,11 +291,14 @@ $(document).ready(function(){ } if (hasMessages) { - $el.find('.hint').removeClass('hidden'); + $('#postsetupchecks-hint').removeClass('hidden'); + $('#security-warning-state-failure').removeClass('hidden'); } else { var securityWarning = $('#security-warning'); if (securityWarning.children('ul').children().length === 0) { - $('#security-warning-state').find('span').removeClass('hidden'); + $('#security-warning-state-ok').removeClass('hidden'); + } else { + $('#security-warning-state-failure').removeClass('hidden'); } } }); diff --git a/settings/templates/settings/admin/overview.php b/settings/templates/settings/admin/overview.php index 2bddd1f9c3..dd253b8264 100644 --- a/settings/templates/settings/admin/overview.php +++ b/settings/templates/settings/admin/overview.php @@ -151,18 +151,25 @@ + + +
+ t('Checking for system and security issues.'));?> +
+
-
- -
-
-
+ +