mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-11-09 21:20:07 +01:00
👌 Information density, open URL on double click (#65)
This commit is contained in:
@@ -40,8 +40,8 @@ class SiteListCell: NSTableCellView
|
||||
imageViewType.contentTintColor = NSColor.tertiaryLabelColor
|
||||
|
||||
// Show the green or red lock based on whether the site was secured
|
||||
imageViewLock.contentTintColor = site.secured ? NSColor.systemGreen
|
||||
: NSColor.red
|
||||
imageViewLock.image = NSImage(named: site.secured ? "Lock" : "LockUnlocked")
|
||||
imageViewLock.contentTintColor = site.secured ? NSColor.systemGreen : NSColor.systemRed
|
||||
|
||||
// Show the current driver
|
||||
labelDriver.stringValue = site.driver ?? "???"
|
||||
|
||||
@@ -70,6 +70,7 @@ class SiteListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource {
|
||||
// MARK: - Lifecycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
tableView.doubleAction = #selector(self.doubleClicked(sender:))
|
||||
sites = Valet.shared.sites
|
||||
setUINotBusy()
|
||||
}
|
||||
@@ -147,6 +148,14 @@ class SiteListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource {
|
||||
reloadContextMenu()
|
||||
}
|
||||
|
||||
@objc func doubleClicked(sender: Any) {
|
||||
guard self.selectedSite != nil else {
|
||||
return
|
||||
}
|
||||
|
||||
self.openInBrowser()
|
||||
}
|
||||
|
||||
// MARK: Secure & Unsecure
|
||||
|
||||
@objc public func toggleSecure() {
|
||||
|
||||
Reference in New Issue
Block a user