From 5ff4c35bf0c4dfa50e4061894e73cda8ed4c6e61 Mon Sep 17 00:00:00 2001 From: MishkaRogachev Date: Wed, 18 Jan 2023 20:37:36 +0400 Subject: [PATCH] feat(appMain): Add warning colors. Use warning color for story node banner --- ui/StatusQ/src/StatusQ/Core/Theme/StatusColors.qml | 2 ++ ui/StatusQ/src/StatusQ/Core/Theme/StatusDarkTheme.qml | 4 ++++ ui/StatusQ/src/StatusQ/Core/Theme/StatusLightTheme.qml | 4 ++++ ui/StatusQ/src/StatusQ/Core/Theme/ThemePalette.qml | 4 ++++ ui/app/mainui/AppMain.qml | 4 ++-- ui/imports/shared/panels/ModuleWarning.qml | 2 ++ 6 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Core/Theme/StatusColors.qml b/ui/StatusQ/src/StatusQ/Core/Theme/StatusColors.qml index f5a73a8bcf9..cf484c59857 100644 --- a/ui/StatusQ/src/StatusQ/Core/Theme/StatusColors.qml +++ b/ui/StatusQ/src/StatusQ/Core/Theme/StatusColors.qml @@ -50,6 +50,8 @@ QtObject { 'orange3': '#FFA67B', 'orange4': '#FE8F59', + 'warning_orange': '#F6793C', + 'purple': '#887AF9', 'red': '#FF2D55', diff --git a/ui/StatusQ/src/StatusQ/Core/Theme/StatusDarkTheme.qml b/ui/StatusQ/src/StatusQ/Core/Theme/StatusDarkTheme.qml index 1f74e681202..3d304afbfd0 100644 --- a/ui/StatusQ/src/StatusQ/Core/Theme/StatusDarkTheme.qml +++ b/ui/StatusQ/src/StatusQ/Core/Theme/StatusDarkTheme.qml @@ -20,6 +20,10 @@ ThemePalette { dangerColor2: getColor('red3', 0.3) dangerColor3: getColor('red3', 0.2) + warningColor1: getColor('warning_orange') + warningColor2: getColor('warning_orange', 0.2) + warningColor3: getColor('warning_orange', 0.1) + successColor1: getColor('green3') successColor2: getColor('green3', 0.2) successColor3: getColor('green3', 0.3) diff --git a/ui/StatusQ/src/StatusQ/Core/Theme/StatusLightTheme.qml b/ui/StatusQ/src/StatusQ/Core/Theme/StatusLightTheme.qml index 5d8156a66ac..f261db542fe 100644 --- a/ui/StatusQ/src/StatusQ/Core/Theme/StatusLightTheme.qml +++ b/ui/StatusQ/src/StatusQ/Core/Theme/StatusLightTheme.qml @@ -18,6 +18,10 @@ ThemePalette { dangerColor2: getColor('red', 0.2) dangerColor3: getColor('red', 0.1) + warningColor1: getColor('warning_orange') + warningColor2: getColor('warning_orange', 0.2) + warningColor3: getColor('warning_orange', 0.1) + successColor1: getColor('green') successColor2: getColor('green', 0.1) successColor3: getColor('green', 0.2) diff --git a/ui/StatusQ/src/StatusQ/Core/Theme/ThemePalette.qml b/ui/StatusQ/src/StatusQ/Core/Theme/ThemePalette.qml index 31725d16061..99f0b647cfe 100644 --- a/ui/StatusQ/src/StatusQ/Core/Theme/ThemePalette.qml +++ b/ui/StatusQ/src/StatusQ/Core/Theme/ThemePalette.qml @@ -125,6 +125,10 @@ QtObject { property color dangerColor2 property color dangerColor3 + property color warningColor1 + property color warningColor2 + property color warningColor3 + property color successColor1 property color successColor2 property color successColor3 diff --git a/ui/app/mainui/AppMain.qml b/ui/app/mainui/AppMain.qml index 9690d5c140b..db4d90795be 100644 --- a/ui/app/mainui/AppMain.qml +++ b/ui/app/mainui/AppMain.qml @@ -728,8 +728,8 @@ Item { ModuleWarning { id: mailserverConnectionBanner - type: ModuleWarning.Danger - text: qsTr("Can not connect to mailserver. Retrying automatically") + type: ModuleWarning.Warning + text: qsTr("Can not connect to store node. Retrying automatically") onCloseClicked: hide() Layout.fillWidth: true } diff --git a/ui/imports/shared/panels/ModuleWarning.qml b/ui/imports/shared/panels/ModuleWarning.qml index 37df0106842..ee26e4c8a91 100644 --- a/ui/imports/shared/panels/ModuleWarning.qml +++ b/ui/imports/shared/panels/ModuleWarning.qml @@ -13,6 +13,7 @@ Item { enum Type { Danger, + Warning, Success } @@ -123,6 +124,7 @@ Item { switch (root.type) { case ModuleWarning.Danger: return Theme.palette.dangerColor1 case ModuleWarning.Success: return Theme.palette.successColor1 + case ModuleWarning.Warning: return Theme.palette.warningColor1 default: return Theme.palette.baseColor1 } }