diff --git a/phpmon/Assets.xcassets/StatusColorGreen.colorset/Contents.json b/phpmon/Assets.xcassets/StatusColorGreen.colorset/Contents.json new file mode 100644 index 0000000..fdb176a --- /dev/null +++ b/phpmon/Assets.xcassets/StatusColorGreen.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.501", + "green" : "0.697", + "red" : "0.247" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.501", + "green" : "0.765", + "red" : "0.247" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/phpmon/Assets.xcassets/StatusColorRed.colorset/Contents.json b/phpmon/Assets.xcassets/StatusColorRed.colorset/Contents.json new file mode 100644 index 0000000..7274621 --- /dev/null +++ b/phpmon/Assets.xcassets/StatusColorRed.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.180", + "green" : "0.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.426", + "green" : "0.363", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/phpmon/Assets.xcassets/StatusColorYellow.colorset/Contents.json b/phpmon/Assets.xcassets/StatusColorYellow.colorset/Contents.json new file mode 100644 index 0000000..2705f6e --- /dev/null +++ b/phpmon/Assets.xcassets/StatusColorYellow.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.180", + "green" : "0.841", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.426", + "green" : "0.809", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/phpmon/Domain/App/Services/ServicesManager.swift b/phpmon/Domain/App/Services/ServicesManager.swift index 579b78d..e0b3a54 100644 --- a/phpmon/Domain/App/Services/ServicesManager.swift +++ b/phpmon/Domain/App/Services/ServicesManager.swift @@ -66,7 +66,7 @@ class ServicesManager: ObservableObject { public var statusColor: Color { if self.services.isEmpty || !self.firstRunComplete { - return .yellow + return Color("StatusColorYellow") } let statuses = self.services[0...2].map { $0.status } @@ -74,10 +74,10 @@ class ServicesManager: ObservableObject { if statuses.contains(.missing) || statuses.contains(.inactive) || statuses.contains(.error) { - return .red + return Color("StatusColorRed") } - return .green + return Color("StatusColorGreen") } /** diff --git a/phpmon/Domain/SwiftUI/Menu/ServicesView.swift b/phpmon/Domain/SwiftUI/Menu/ServicesView.swift index 99371cd..b08fc6c 100644 --- a/phpmon/Domain/SwiftUI/Menu/ServicesView.swift +++ b/phpmon/Domain/SwiftUI/Menu/ServicesView.swift @@ -143,7 +143,7 @@ struct ServiceView: View { } label: { Text("E") .frame(width: 12.0, height: 12.0) - .foregroundColor(Color("IconColorRed")) + .foregroundColor(Color("StatusColorRed")) } .focusable(false) .frame(width: 25, height: 25) @@ -163,8 +163,8 @@ struct ServiceView: View { .frame(width: 12.0, height: 12.0) .foregroundColor( service.status == .active - ? Color("IconColorGreen") - : Color("IconColorRed") + ? Color("StatusColorGreen") + : Color("StatusColorRed") ) } .focusable(false)