diff --git a/PHP Monitor.xcodeproj/project.pbxproj b/PHP Monitor.xcodeproj/project.pbxproj
index 9481b8d..b80917b 100644
--- a/PHP Monitor.xcodeproj/project.pbxproj
+++ b/PHP Monitor.xcodeproj/project.pbxproj
@@ -357,10 +357,10 @@
C4B13B1D25C4915000548C3A /* Core */ = {
isa = PBXGroup;
children = (
+ C41C1B3C22B0098000E7CF16 /* Main.storyboard */,
C41C1B3622B0097F00E7CF16 /* AppDelegate.swift */,
C4B97B74275CF08C003F3378 /* AppDelegate+MenuOutlets.swift */,
C436039F275E67610028EFC6 /* AppDelegate+Notifications.swift */,
- C41C1B3C22B0098000E7CF16 /* Main.storyboard */,
C4811D2322D70A4700B5F6B3 /* App.swift */,
C4B97B77275CF1B5003F3378 /* App+ActivationPolicy.swift */,
C4B97B7A275CF20A003F3378 /* App+GlobalHotkey.swift */,
diff --git a/phpmon/Assets.xcassets/Lock.imageset/Contents.json b/phpmon/Assets.xcassets/Lock.imageset/Contents.json
index 9069859..d874efc 100644
--- a/phpmon/Assets.xcassets/Lock.imageset/Contents.json
+++ b/phpmon/Assets.xcassets/Lock.imageset/Contents.json
@@ -5,7 +5,7 @@
"scale" : "1x"
},
{
- "filename" : "lock.svg",
+ "filename" : "Locked.svg",
"idiom" : "universal",
"scale" : "2x"
},
diff --git a/phpmon/Assets.xcassets/Lock.imageset/Locked.svg b/phpmon/Assets.xcassets/Lock.imageset/Locked.svg
new file mode 100644
index 0000000..60564f5
--- /dev/null
+++ b/phpmon/Assets.xcassets/Lock.imageset/Locked.svg
@@ -0,0 +1,10 @@
+
+
+
diff --git a/phpmon/Assets.xcassets/Lock.imageset/lock.svg b/phpmon/Assets.xcassets/Lock.imageset/lock.svg
deleted file mode 100644
index 86a172a..0000000
--- a/phpmon/Assets.xcassets/Lock.imageset/lock.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/phpmon/Assets.xcassets/LockUnlocked.imageset/Contents.json b/phpmon/Assets.xcassets/LockUnlocked.imageset/Contents.json
new file mode 100644
index 0000000..956848a
--- /dev/null
+++ b/phpmon/Assets.xcassets/LockUnlocked.imageset/Contents.json
@@ -0,0 +1,24 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Unlocked.svg",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ },
+ "properties" : {
+ "template-rendering-intent" : "template"
+ }
+}
diff --git a/phpmon/Assets.xcassets/LockUnlocked.imageset/Unlocked.svg b/phpmon/Assets.xcassets/LockUnlocked.imageset/Unlocked.svg
new file mode 100644
index 0000000..69e0af7
--- /dev/null
+++ b/phpmon/Assets.xcassets/LockUnlocked.imageset/Unlocked.svg
@@ -0,0 +1,10 @@
+
+
+
diff --git a/phpmon/Domain/Core/Base.lproj/Main.storyboard b/phpmon/Domain/Core/Base.lproj/Main.storyboard
index 9696d70..3eaea91 100644
--- a/phpmon/Domain/Core/Base.lproj/Main.storyboard
+++ b/phpmon/Domain/Core/Base.lproj/Main.storyboard
@@ -614,7 +614,7 @@ Gw
-
+
@@ -647,7 +647,7 @@ Gw
-
+
@@ -655,26 +655,23 @@ Gw
-
+
-
-
+
+
-
+
-
-
+
+
-
-
-
-
+
@@ -682,9 +679,9 @@ Gw
-
+
-
+
@@ -693,7 +690,7 @@ Gw
-
+
@@ -704,18 +701,18 @@ Gw
-
+
-
+
+
-
-
+
-
+
@@ -742,7 +739,7 @@ Gw
-
+
@@ -779,7 +776,7 @@ Gw
-
+
diff --git a/phpmon/Domain/PHP/PhpInstallation.swift b/phpmon/Domain/PHP/PhpInstallation.swift
index 99f3fa6..02577e2 100644
--- a/phpmon/Domain/PHP/PhpInstallation.swift
+++ b/phpmon/Domain/PHP/PhpInstallation.swift
@@ -11,12 +11,10 @@ import Foundation
class PhpInstallation {
var longVersion: String
- var homebrewInfo: HomebrewPackage?
/**
In order to determine details about a PHP installation, we’ll simply run `php-config --version`
- in the relevant directory, and we’ll also attempt to determine information about the Homebrew
- formula for that particular installation.
+ in the relevant directory.
*/
init(_ version: String) {
let phpConfigExecutablePath = "\(Paths.optPath)/php@\(version)/bin/php-config"
@@ -27,19 +25,6 @@ class PhpInstallation {
arguments: ["--version"]
)
}
-
- let info = Shell.pipe("\(Paths.brew) info php@\(version) --json")
-
- do {
- self.homebrewInfo = try JSONDecoder().decode(
- [HomebrewPackage].self,
- from: info.data(using: .utf8)!
- ).first ?? nil
- } catch {
- // TODO: Perhaps show a modal to indicate there’s an issue with Homebrew?
- print("There was an issue parsing Homebrew info for PHP \(version)")
- self.homebrewInfo = nil
- }
}
}
diff --git a/phpmon/Domain/SiteList/SiteListCell.swift b/phpmon/Domain/SiteList/SiteListCell.swift
index 91efeb4..a2990e9 100644
--- a/phpmon/Domain/SiteList/SiteListCell.swift
+++ b/phpmon/Domain/SiteList/SiteListCell.swift
@@ -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 ?? "???"
diff --git a/phpmon/Domain/SiteList/SiteListVC.swift b/phpmon/Domain/SiteList/SiteListVC.swift
index 35ebd05..bc907dc 100644
--- a/phpmon/Domain/SiteList/SiteListVC.swift
+++ b/phpmon/Domain/SiteList/SiteListVC.swift
@@ -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() {