mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 12:00:09 +02:00
🐛 Show question mark if service not found
This commit is contained in:
@ -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 {
|
||||
|
@ -40,7 +40,7 @@
|
||||
<key>LSUIElement</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2021 Nico Verbruggen. All rights reserved.</string>
|
||||
<string>Copyright © 2019-2022 Nico Verbruggen. All rights reserved.</string>
|
||||
<key>NSMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
Reference in New Issue
Block a user