From 6947133899ea30d839a8721751e0fd7a47c786a3 Mon Sep 17 00:00:00 2001 From: Ariella Vu <20778143+digiwand@users.noreply.github.com> Date: Thu, 3 Aug 2023 00:23:00 +0200 Subject: [PATCH] Update critical error styles (#20350) --- shared/lib/error-utils.js | 42 ++++++++-------- ui/css/errors.scss | 84 ++++++++++++++----------------- ui/css/itcss/tools/utilities.scss | 6 --- 3 files changed, 60 insertions(+), 72 deletions(-) diff --git a/shared/lib/error-utils.js b/shared/lib/error-utils.js index 731fe93b4..560f2e8cc 100644 --- a/shared/lib/error-utils.js +++ b/shared/lib/error-utils.js @@ -86,32 +86,32 @@ export async function getErrorHtml( * see the string and will not be able to check if the locale key exists. */ return ` -
-
- - - -
-
-
-

+

+
+
+ + + +
+
+

${errorKey === 'troubleStarting' ? t('troubleStarting') : ''} ${errorKey === 'somethingIsWrong' ? t('somethingIsWrong') : ''}

- + +
-

- ${t('stillGettingMessage')} - - ${t('sendBugReport')} - -

`; diff --git a/ui/css/errors.scss b/ui/css/errors.scss index c1f516f31..6c44384f5 100644 --- a/ui/css/errors.scss +++ b/ui/css/errors.scss @@ -1,58 +1,52 @@ .critical-error { - padding: 1em; max-width: 600px; - margin: 0 auto; border-radius: 4px; - border-left: #f66a0a 4px solid; - background-color: rgba(255, 211, 61, 0.1); + border-left: var(--color-warning-default) 4px solid; + background-color: var(--color-warning-muted); + color: var(--color-text-default); display: flex; - padding: 0 4px 0 4px; - gap: 12px; + padding: 12px 12px 12px 8px; + gap: 8px; + line-height: 24px; + + &__container { + padding: 20px; + margin: 0 auto; + } + + &__footer { + display: inline-flex; + flex-wrap: wrap; + + > span { + flex: 0 0 auto; + max-width: 100%; + padding-inline-end: 8px; + } + } &__icon { - color: var(--color-error-default); - height: 100px; - padding: 4px 4px 0 4px; + padding-top: 4px; + + svg { + fill: var(--color-warning-default); + } } - &__description { - flex-grow: 1; + &__link { + cursor: pointer; + text-decoration: none; + color: var(--color-primary-default); + + &:hover { + color: var(--color-primary-alternative); + } } - &__alert { + &__link-restart { + align-items: center; display: flex; - flex-direction: column; - margin-bottom: 16px; - font-style: normal; - font-weight: 400; - font-size: 16px; - line-height: 24px; - - &__message { - margin-bottom: 16px; - text-align: left; - color: var(--color-text-default); - } - - &__action-link { - text-align: left; - height: 40px; - color: var(--color-primary-default); - text-decoration: none; - cursor: pointer; - } - } - - &__paragraph { - text-align: left; - color: var(--color-text-default); - - &__link { - color: var(--color-primary-default); - - &:hover { - color: var(--color-primary-alternative); - } - } + margin: 8px 0 24px; + padding: 8px 0; } } diff --git a/ui/css/itcss/tools/utilities.scss b/ui/css/itcss/tools/utilities.scss index 758de34e2..0b2d8f5ef 100644 --- a/ui/css/itcss/tools/utilities.scss +++ b/ui/css/itcss/tools/utilities.scss @@ -35,9 +35,3 @@ display: flex; align-items: center; } - -.critical-error { - text-align: center; - margin-top: 20px; - color: var(--color-error-default); -}