diff --git a/phpmon/Domain/Menu/ServicesView.swift b/phpmon/Domain/Menu/ServicesView.swift index b2d3fb8..041b01c 100644 --- a/phpmon/Domain/Menu/ServicesView.swift +++ b/phpmon/Domain/Menu/ServicesView.swift @@ -78,13 +78,22 @@ class ServicesView: NSView, XibLoadable { } func applyServiceStyling(_ serviceName: String, _ imageView: NSImageView) { - if ServicesView.services[serviceName] != nil && ServicesView.services[serviceName]!.running { + if ServicesView.services[serviceName] == nil { + imageView.image = NSImage(named: "ServiceLoading") + imageView.contentTintColor = NSColor.black + return + } + + if ServicesView.services[serviceName]!.running { imageView.image = NSImage(named: "ServiceOn") imageView.contentTintColor = NSColor.black - } else { - imageView.image = NSImage(named: "ServiceOff") - imageView.contentTintColor = NSColor.init(red: 246/255, green: 71/255, blue: 71/255, alpha: 1.0) + return } + + imageView.image = NSImage(named: "ServiceOff") + imageView.contentTintColor = NSColor.init( + red: 246/255, green: 71/255, blue: 71/255, alpha: 1.0 + ) } deinit { diff --git a/phpmon/Info.plist b/phpmon/Info.plist index f1b191f..7918ee3 100644 --- a/phpmon/Info.plist +++ b/phpmon/Info.plist @@ -40,7 +40,7 @@ LSUIElement NSHumanReadableCopyright - Copyright © 2021 Nico Verbruggen. All rights reserved. + Copyright © 2019-2022 Nico Verbruggen. All rights reserved. NSMainStoryboardFile Main NSPrincipalClass