1
0
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:
2021-12-07 19:16:47 +01:00
parent afbfc55088
commit 63aa8c2f44
10 changed files with 77 additions and 43 deletions

View File

@@ -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 ?? "???"

View File

@@ -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() {