Skip to content

Commit

Permalink
feat(appMain): Add warning colors. Use warning color for story node b…
Browse files Browse the repository at this point in the history
…anner
  • Loading branch information
MishkaRogachev committed Jan 30, 2023
1 parent b474ef0 commit 5ff4c35
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ui/StatusQ/src/StatusQ/Core/Theme/StatusColors.qml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ QtObject {
'orange3': '#FFA67B',
'orange4': '#FE8F59',

'warning_orange': '#F6793C',

'purple': '#887AF9',

'red': '#FF2D55',
Expand Down
4 changes: 4 additions & 0 deletions ui/StatusQ/src/StatusQ/Core/Theme/StatusDarkTheme.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions ui/StatusQ/src/StatusQ/Core/Theme/StatusLightTheme.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions ui/StatusQ/src/StatusQ/Core/Theme/ThemePalette.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ui/app/mainui/AppMain.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 2 additions & 0 deletions ui/imports/shared/panels/ModuleWarning.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Item {

enum Type {
Danger,
Warning,
Success
}

Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit 5ff4c35

Please sign in to comment.