mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-08 04:20:07 +02:00
👌 Fixed onboarding for initial launch
This commit is contained in:
10
DEVELOPER.md
10
DEVELOPER.md
@@ -14,6 +14,16 @@ It also automatically runs when you try to build the project. You'll get a warni
|
|||||||
swiftlint --fix
|
swiftlint --fix
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## ⚙️ Preferences
|
||||||
|
|
||||||
|
You can find the persisted configuration file in `~/Library/Preferences/com.nicoverbruggen.phpmon.plist`
|
||||||
|
|
||||||
|
These values are cached by the OS. You can clear this cache by running:
|
||||||
|
|
||||||
|
```
|
||||||
|
defaults delete com.nicoverbruggen.phpmon && killall cfprefsd
|
||||||
|
```
|
||||||
|
|
||||||
## 🔧 Build instructions
|
## 🔧 Build instructions
|
||||||
|
|
||||||
<img src="./docs/build.png" width="404px" alt="build button in Xcode"/>
|
<img src="./docs/build.png" width="404px" alt="build button in Xcode"/>
|
||||||
|
@@ -44,7 +44,7 @@ final class HomebrewService: Sendable, Decodable {
|
|||||||
/**
|
/**
|
||||||
Dummy data for preview purposes.
|
Dummy data for preview purposes.
|
||||||
*/
|
*/
|
||||||
public static func dummy(named service: String, enabled: Bool) -> HomebrewService {
|
public static func dummy(named service: String, enabled: Bool, status: String? = nil) -> HomebrewService {
|
||||||
return HomebrewService(
|
return HomebrewService(
|
||||||
name: service,
|
name: service,
|
||||||
service_name: service,
|
service_name: service,
|
||||||
@@ -52,7 +52,7 @@ final class HomebrewService: Sendable, Decodable {
|
|||||||
loaded: enabled,
|
loaded: enabled,
|
||||||
pid: nil,
|
pid: nil,
|
||||||
user: nil,
|
user: nil,
|
||||||
status: nil,
|
status: status,
|
||||||
log_path: nil,
|
log_path: nil,
|
||||||
error_log_path: nil
|
error_log_path: nil
|
||||||
)
|
)
|
||||||
|
@@ -41,9 +41,14 @@ class FakeServicesManager: ServicesManager {
|
|||||||
|
|
||||||
private func reapplyServices() {
|
private func reapplyServices() {
|
||||||
let services = self.formulae.map {
|
let services = self.formulae.map {
|
||||||
|
let dummy = HomebrewService.dummy(
|
||||||
|
named: $0.name,
|
||||||
|
enabled: self.fixedStatus == .active,
|
||||||
|
status: self.fixedStatus == .error ? "error" : nil
|
||||||
|
)
|
||||||
let wrapper = Service(
|
let wrapper = Service(
|
||||||
formula: $0,
|
formula: $0,
|
||||||
service: HomebrewService.dummy(named: $0.name, enabled: self.fixedStatus == .active)
|
service: dummy
|
||||||
)
|
)
|
||||||
return wrapper
|
return wrapper
|
||||||
}
|
}
|
||||||
|
@@ -111,7 +111,7 @@ extension MainMenu {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Present first launch screen if needed
|
// Present first launch screen if needed
|
||||||
if Stats.successfulLaunchCount == 0 && !isRunningSwiftUIPreview {
|
if Stats.successfulLaunchCount == 1 && !isRunningSwiftUIPreview {
|
||||||
Log.info("Should present the first launch screen!")
|
Log.info("Should present the first launch screen!")
|
||||||
Task { @MainActor in
|
Task { @MainActor in
|
||||||
OnboardingWindowController.show()
|
OnboardingWindowController.show()
|
||||||
|
Reference in New Issue
Block a user