mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 03:50:08 +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
|
||||
```
|
||||
|
||||
## ⚙️ 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
|
||||
|
||||
<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.
|
||||
*/
|
||||
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(
|
||||
name: service,
|
||||
service_name: service,
|
||||
@ -52,7 +52,7 @@ final class HomebrewService: Sendable, Decodable {
|
||||
loaded: enabled,
|
||||
pid: nil,
|
||||
user: nil,
|
||||
status: nil,
|
||||
status: status,
|
||||
log_path: nil,
|
||||
error_log_path: nil
|
||||
)
|
||||
|
@ -41,9 +41,14 @@ class FakeServicesManager: ServicesManager {
|
||||
|
||||
private func reapplyServices() {
|
||||
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(
|
||||
formula: $0,
|
||||
service: HomebrewService.dummy(named: $0.name, enabled: self.fixedStatus == .active)
|
||||
service: dummy
|
||||
)
|
||||
return wrapper
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ extension MainMenu {
|
||||
#endif
|
||||
|
||||
// Present first launch screen if needed
|
||||
if Stats.successfulLaunchCount == 0 && !isRunningSwiftUIPreview {
|
||||
if Stats.successfulLaunchCount == 1 && !isRunningSwiftUIPreview {
|
||||
Log.info("Should present the first launch screen!")
|
||||
Task { @MainActor in
|
||||
OnboardingWindowController.show()
|
||||
|
Reference in New Issue
Block a user