mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-12-21 11:10:08 +01:00
📦 Upgrade packages to v2.0
This commit is contained in:
@@ -11,6 +11,9 @@
|
|||||||
0310B17A2EB8F3FF00A8B140 /* CrashReporter in Frameworks */ = {isa = PBXBuildFile; productRef = 0310B1792EB8F3FF00A8B140 /* CrashReporter */; };
|
0310B17A2EB8F3FF00A8B140 /* CrashReporter in Frameworks */ = {isa = PBXBuildFile; productRef = 0310B1792EB8F3FF00A8B140 /* CrashReporter */; };
|
||||||
0310B17C2EB8F40100A8B140 /* CrashReporter in Frameworks */ = {isa = PBXBuildFile; productRef = 0310B17B2EB8F40100A8B140 /* CrashReporter */; };
|
0310B17C2EB8F40100A8B140 /* CrashReporter in Frameworks */ = {isa = PBXBuildFile; productRef = 0310B17B2EB8F40100A8B140 /* CrashReporter */; };
|
||||||
0310B17E2EB8F40400A8B140 /* CrashReporter in Frameworks */ = {isa = PBXBuildFile; productRef = 0310B17D2EB8F40400A8B140 /* CrashReporter */; };
|
0310B17E2EB8F40400A8B140 /* CrashReporter in Frameworks */ = {isa = PBXBuildFile; productRef = 0310B17D2EB8F40400A8B140 /* CrashReporter */; };
|
||||||
|
0317C17E2ED87CAB005479D2 /* NVAppUpdater in Frameworks */ = {isa = PBXBuildFile; productRef = 0317C17D2ED87CAB005479D2 /* NVAppUpdater */; };
|
||||||
|
0317C1812ED87CE1005479D2 /* NVAppUpdater in Frameworks */ = {isa = PBXBuildFile; productRef = 0317C1802ED87CE1005479D2 /* NVAppUpdater */; };
|
||||||
|
0317C1832ED87CEA005479D2 /* NVAppUpdater in Frameworks */ = {isa = PBXBuildFile; productRef = 0317C1822ED87CEA005479D2 /* NVAppUpdater */; };
|
||||||
031E2B692B1525A7007C29E1 /* BrewPhpExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031E2B682B1525A7007C29E1 /* BrewPhpExtension.swift */; };
|
031E2B692B1525A7007C29E1 /* BrewPhpExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031E2B682B1525A7007C29E1 /* BrewPhpExtension.swift */; };
|
||||||
031E2B6A2B1525A7007C29E1 /* BrewPhpExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031E2B682B1525A7007C29E1 /* BrewPhpExtension.swift */; };
|
031E2B6A2B1525A7007C29E1 /* BrewPhpExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031E2B682B1525A7007C29E1 /* BrewPhpExtension.swift */; };
|
||||||
031E2B6B2B1525A7007C29E1 /* BrewPhpExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031E2B682B1525A7007C29E1 /* BrewPhpExtension.swift */; };
|
031E2B6B2B1525A7007C29E1 /* BrewPhpExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031E2B682B1525A7007C29E1 /* BrewPhpExtension.swift */; };
|
||||||
@@ -427,7 +430,6 @@
|
|||||||
C46FA9882822EFDC00D78807 /* PhpConfigurationFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C46FA9872822EFDC00D78807 /* PhpConfigurationFile.swift */; };
|
C46FA9882822EFDC00D78807 /* PhpConfigurationFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C46FA9872822EFDC00D78807 /* PhpConfigurationFile.swift */; };
|
||||||
C46FA9892822EFDC00D78807 /* PhpConfigurationFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C46FA9872822EFDC00D78807 /* PhpConfigurationFile.swift */; };
|
C46FA9892822EFDC00D78807 /* PhpConfigurationFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C46FA9872822EFDC00D78807 /* PhpConfigurationFile.swift */; };
|
||||||
C46FA98C2822F08F00D78807 /* PhpConfigurationFileTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C46FA98A2822F08F00D78807 /* PhpConfigurationFileTest.swift */; };
|
C46FA98C2822F08F00D78807 /* PhpConfigurationFileTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C46FA98A2822F08F00D78807 /* PhpConfigurationFileTest.swift */; };
|
||||||
C47014FC2C46D31B0069AAE7 /* NVAppUpdater in Frameworks */ = {isa = PBXBuildFile; productRef = C47014FB2C46D31B0069AAE7 /* NVAppUpdater */; };
|
|
||||||
C47014FF2C46D57C0069AAE7 /* NVAlert in Frameworks */ = {isa = PBXBuildFile; productRef = C47014FE2C46D57C0069AAE7 /* NVAlert */; };
|
C47014FF2C46D57C0069AAE7 /* NVAlert in Frameworks */ = {isa = PBXBuildFile; productRef = C47014FE2C46D57C0069AAE7 /* NVAlert */; };
|
||||||
C47015022C46D6910069AAE7 /* NVAlertExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C47015012C46D6910069AAE7 /* NVAlertExtension.swift */; };
|
C47015022C46D6910069AAE7 /* NVAlertExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C47015012C46D6910069AAE7 /* NVAlertExtension.swift */; };
|
||||||
C47015032C46D7F00069AAE7 /* NVAlertExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C47015012C46D6910069AAE7 /* NVAlertExtension.swift */; };
|
C47015032C46D7F00069AAE7 /* NVAlertExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C47015012C46D6910069AAE7 /* NVAlertExtension.swift */; };
|
||||||
@@ -1345,7 +1347,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
C47014FC2C46D31B0069AAE7 /* NVAppUpdater in Frameworks */,
|
0317C1832ED87CEA005479D2 /* NVAppUpdater in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -1354,6 +1356,8 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
C47014FF2C46D57C0069AAE7 /* NVAlert in Frameworks */,
|
C47014FF2C46D57C0069AAE7 /* NVAlert in Frameworks */,
|
||||||
|
0317C17E2ED87CAB005479D2 /* NVAppUpdater in Frameworks */,
|
||||||
|
0317C1812ED87CE1005479D2 /* NVAppUpdater in Frameworks */,
|
||||||
03D8462B2EB6418F006EFE3C /* CrashReporter in Frameworks */,
|
03D8462B2EB6418F006EFE3C /* CrashReporter in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@@ -2489,7 +2493,7 @@
|
|||||||
);
|
);
|
||||||
name = "PHP Monitor Self-Updater";
|
name = "PHP Monitor Self-Updater";
|
||||||
packageProductDependencies = (
|
packageProductDependencies = (
|
||||||
C47014FB2C46D31B0069AAE7 /* NVAppUpdater */,
|
0317C1822ED87CEA005479D2 /* NVAppUpdater */,
|
||||||
);
|
);
|
||||||
productName = "PHP Monitor Updater";
|
productName = "PHP Monitor Updater";
|
||||||
productReference = C406A5F0298AD2CE00B5B85A /* PHP Monitor Self-Updater.app */;
|
productReference = C406A5F0298AD2CE00B5B85A /* PHP Monitor Self-Updater.app */;
|
||||||
@@ -2513,6 +2517,8 @@
|
|||||||
packageProductDependencies = (
|
packageProductDependencies = (
|
||||||
C47014FE2C46D57C0069AAE7 /* NVAlert */,
|
C47014FE2C46D57C0069AAE7 /* NVAlert */,
|
||||||
03D8462A2EB6418F006EFE3C /* CrashReporter */,
|
03D8462A2EB6418F006EFE3C /* CrashReporter */,
|
||||||
|
0317C17D2ED87CAB005479D2 /* NVAppUpdater */,
|
||||||
|
0317C1802ED87CE1005479D2 /* NVAppUpdater */,
|
||||||
);
|
);
|
||||||
productName = phpmon;
|
productName = phpmon;
|
||||||
productReference = C41C1B3322B0097F00E7CF16 /* PHP Monitor.app */;
|
productReference = C41C1B3322B0097F00E7CF16 /* PHP Monitor.app */;
|
||||||
@@ -2637,9 +2643,9 @@
|
|||||||
);
|
);
|
||||||
mainGroup = C41C1B2A22B0097F00E7CF16;
|
mainGroup = C41C1B2A22B0097F00E7CF16;
|
||||||
packageReferences = (
|
packageReferences = (
|
||||||
C47014FA2C46D31B0069AAE7 /* XCRemoteSwiftPackageReference "NVAppUpdater" */,
|
|
||||||
C47014FD2C46D57C0069AAE7 /* XCRemoteSwiftPackageReference "NVAlert" */,
|
C47014FD2C46D57C0069AAE7 /* XCRemoteSwiftPackageReference "NVAlert" */,
|
||||||
03D846292EB6418F006EFE3C /* XCRemoteSwiftPackageReference "plcrashreporter" */,
|
03D846292EB6418F006EFE3C /* XCRemoteSwiftPackageReference "plcrashreporter" */,
|
||||||
|
0317C17F2ED87CE1005479D2 /* XCRemoteSwiftPackageReference "NVAppUpdater" */,
|
||||||
);
|
);
|
||||||
productRefGroup = C41C1B3422B0097F00E7CF16 /* Products */;
|
productRefGroup = C41C1B3422B0097F00E7CF16 /* Products */;
|
||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
@@ -4639,6 +4645,14 @@
|
|||||||
/* End XCConfigurationList section */
|
/* End XCConfigurationList section */
|
||||||
|
|
||||||
/* Begin XCRemoteSwiftPackageReference section */
|
/* Begin XCRemoteSwiftPackageReference section */
|
||||||
|
0317C17F2ED87CE1005479D2 /* XCRemoteSwiftPackageReference "NVAppUpdater" */ = {
|
||||||
|
isa = XCRemoteSwiftPackageReference;
|
||||||
|
repositoryURL = "https://github.com/nicoverbruggen/NVAppUpdater";
|
||||||
|
requirement = {
|
||||||
|
kind = upToNextMajorVersion;
|
||||||
|
minimumVersion = 2.0.0;
|
||||||
|
};
|
||||||
|
};
|
||||||
03D846292EB6418F006EFE3C /* XCRemoteSwiftPackageReference "plcrashreporter" */ = {
|
03D846292EB6418F006EFE3C /* XCRemoteSwiftPackageReference "plcrashreporter" */ = {
|
||||||
isa = XCRemoteSwiftPackageReference;
|
isa = XCRemoteSwiftPackageReference;
|
||||||
repositoryURL = "https://github.com/microsoft/plcrashreporter.git";
|
repositoryURL = "https://github.com/microsoft/plcrashreporter.git";
|
||||||
@@ -4647,20 +4661,12 @@
|
|||||||
minimumVersion = 1.12.0;
|
minimumVersion = 1.12.0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
C47014FA2C46D31B0069AAE7 /* XCRemoteSwiftPackageReference "NVAppUpdater" */ = {
|
|
||||||
isa = XCRemoteSwiftPackageReference;
|
|
||||||
repositoryURL = "https://github.com/nicoverbruggen/NVAppUpdater";
|
|
||||||
requirement = {
|
|
||||||
branch = main;
|
|
||||||
kind = branch;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
C47014FD2C46D57C0069AAE7 /* XCRemoteSwiftPackageReference "NVAlert" */ = {
|
C47014FD2C46D57C0069AAE7 /* XCRemoteSwiftPackageReference "NVAlert" */ = {
|
||||||
isa = XCRemoteSwiftPackageReference;
|
isa = XCRemoteSwiftPackageReference;
|
||||||
repositoryURL = "https://github.com/nicoverbruggen/NVAlert";
|
repositoryURL = "https://github.com/nicoverbruggen/NVAlert";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = upToNextMajorVersion;
|
||||||
version = 1.1.0;
|
minimumVersion = 2.0.0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/* End XCRemoteSwiftPackageReference section */
|
/* End XCRemoteSwiftPackageReference section */
|
||||||
@@ -4681,16 +4687,25 @@
|
|||||||
package = 03D846292EB6418F006EFE3C /* XCRemoteSwiftPackageReference "plcrashreporter" */;
|
package = 03D846292EB6418F006EFE3C /* XCRemoteSwiftPackageReference "plcrashreporter" */;
|
||||||
productName = CrashReporter;
|
productName = CrashReporter;
|
||||||
};
|
};
|
||||||
|
0317C17D2ED87CAB005479D2 /* NVAppUpdater */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
productName = NVAppUpdater;
|
||||||
|
};
|
||||||
|
0317C1802ED87CE1005479D2 /* NVAppUpdater */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
package = 0317C17F2ED87CE1005479D2 /* XCRemoteSwiftPackageReference "NVAppUpdater" */;
|
||||||
|
productName = NVAppUpdater;
|
||||||
|
};
|
||||||
|
0317C1822ED87CEA005479D2 /* NVAppUpdater */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
package = 0317C17F2ED87CE1005479D2 /* XCRemoteSwiftPackageReference "NVAppUpdater" */;
|
||||||
|
productName = NVAppUpdater;
|
||||||
|
};
|
||||||
03D8462A2EB6418F006EFE3C /* CrashReporter */ = {
|
03D8462A2EB6418F006EFE3C /* CrashReporter */ = {
|
||||||
isa = XCSwiftPackageProductDependency;
|
isa = XCSwiftPackageProductDependency;
|
||||||
package = 03D846292EB6418F006EFE3C /* XCRemoteSwiftPackageReference "plcrashreporter" */;
|
package = 03D846292EB6418F006EFE3C /* XCRemoteSwiftPackageReference "plcrashreporter" */;
|
||||||
productName = CrashReporter;
|
productName = CrashReporter;
|
||||||
};
|
};
|
||||||
C47014FB2C46D31B0069AAE7 /* NVAppUpdater */ = {
|
|
||||||
isa = XCSwiftPackageProductDependency;
|
|
||||||
package = C47014FA2C46D31B0069AAE7 /* XCRemoteSwiftPackageReference "NVAppUpdater" */;
|
|
||||||
productName = NVAppUpdater;
|
|
||||||
};
|
|
||||||
C47014FE2C46D57C0069AAE7 /* NVAlert */ = {
|
C47014FE2C46D57C0069AAE7 /* NVAlert */ = {
|
||||||
isa = XCSwiftPackageProductDependency;
|
isa = XCSwiftPackageProductDependency;
|
||||||
package = C47014FD2C46D57C0069AAE7 /* XCRemoteSwiftPackageReference "NVAlert" */;
|
package = C47014FD2C46D57C0069AAE7 /* XCRemoteSwiftPackageReference "NVAlert" */;
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ extension NVAlert {
|
|||||||
return NVAlert().withInformation(
|
return NVAlert().withInformation(
|
||||||
title: "\(key).title".localized,
|
title: "\(key).title".localized,
|
||||||
subtitle: "\(key).description".localized
|
subtitle: "\(key).description".localized
|
||||||
).withPrimary(text: "generic.ok".localized).show()
|
).withPrimary(text: "generic.ok".localized).show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,19 @@ import Foundation
|
|||||||
import Cocoa
|
import Cocoa
|
||||||
import NVAlert
|
import NVAlert
|
||||||
|
|
||||||
|
/**
|
||||||
|
The potential different outcomes of a check for updates.
|
||||||
|
*/
|
||||||
enum UpdateCheckResult {
|
enum UpdateCheckResult {
|
||||||
case success
|
case success
|
||||||
case networkError
|
case networkError
|
||||||
case parseError
|
case parseError
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Instead of using `UpdateCheck` which is a more simplified update checking process
|
||||||
|
included in `NVAppUpdater`, we have a slightly more complex setup here.
|
||||||
|
*/
|
||||||
class AppUpdater {
|
class AppUpdater {
|
||||||
var caskFile: CaskFile!
|
var caskFile: CaskFile!
|
||||||
var latestVersionOnline: AppVersion!
|
var latestVersionOnline: AppVersion!
|
||||||
@@ -100,7 +107,7 @@ class AppUpdater {
|
|||||||
.withTertiary(text: "updater.alerts.buttons.dismiss".localized, action: { vc in
|
.withTertiary(text: "updater.alerts.buttons.dismiss".localized, action: { vc in
|
||||||
vc.close(with: .OK)
|
vc.close(with: .OK)
|
||||||
})
|
})
|
||||||
.show()
|
.show(urgency: interactive ? .bringToFront : .urgentRequestAttention)
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor public func presentNoNewerVersionAvailableAlert() {
|
@MainActor public func presentNoNewerVersionAvailableAlert() {
|
||||||
@@ -110,7 +117,7 @@ class AppUpdater {
|
|||||||
description: ""
|
description: ""
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: interactive ? .bringToFront : .none)
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor public func presentCouldNotRetrieveUpdate() {
|
@MainActor public func presentCouldNotRetrieveUpdate() {
|
||||||
@@ -128,7 +135,7 @@ class AppUpdater {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: interactive ? .bringToFront : .normalRequestAttention)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Preparing for Self-Updater
|
// MARK: - Preparing for Self-Updater
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class CrashReporter {
|
|||||||
})
|
})
|
||||||
.withPrimary(text: "crash_reporter.send_report".localized, action: { alert in
|
.withPrimary(text: "crash_reporter.send_report".localized, action: { alert in
|
||||||
alert.close(with: .OK)
|
alert.close(with: .OK)
|
||||||
}).runModal()
|
}).runModal(urgency: .urgentRequestAttention)
|
||||||
|
|
||||||
// Check the outcome of what the user chose
|
// Check the outcome of what the user chose
|
||||||
if response == .abort {
|
if response == .abort {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class ValetServicesManager: ServicesManager {
|
|||||||
description: "alert.service_error.extra".localized
|
description: "alert.service_error.extra".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "alert.service_error.button.close".localized)
|
.withPrimary(text: "alert.service_error.button.close".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we do have a path to a log file, show a more complex alert w/ Show Log button
|
// If we do have a path to a log file, show a more complex alert w/ Show Log button
|
||||||
@@ -112,6 +112,6 @@ class ValetServicesManager: ServicesManager {
|
|||||||
|
|
||||||
alert.close(with: .OK)
|
alert.close(with: .OK)
|
||||||
})
|
})
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ extension Startup {
|
|||||||
vc.close(with: .alertSecondButtonReturn)
|
vc.close(with: .alertSecondButtonReturn)
|
||||||
exit(1)
|
exit(1)
|
||||||
})
|
})
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
|
|
||||||
await self.check()
|
await self.check()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,6 @@ extension Startup {
|
|||||||
.withTertiary(text: "", action: { _ in
|
.withTertiary(text: "", action: { _ in
|
||||||
NSWorkspace.shared.open(URL(string: "https://github.com/nicoverbruggen/phpmon/issues/294")!)
|
NSWorkspace.shared.open(URL(string: "https://github.com/nicoverbruggen/phpmon/issues/294")!)
|
||||||
})
|
})
|
||||||
.show()
|
.show(urgency: .urgentRequestAttention)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class Startup {
|
|||||||
)
|
)
|
||||||
.withPrimary(text: check.buttonText, action: { _ in
|
.withPrimary(text: check.buttonText, action: { _ in
|
||||||
exit(1)
|
exit(1)
|
||||||
}).show()
|
}).show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
|
|
||||||
NVAlert()
|
NVAlert()
|
||||||
@@ -84,7 +84,7 @@ class Startup {
|
|||||||
description: check.descriptionText
|
description: check.descriptionText
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Check (List)
|
// MARK: - Check (List)
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ import NVAlert
|
|||||||
description: "alert.composer_missing.desc".localized
|
description: "alert.composer_missing.desc".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
|
|
||||||
deinit {
|
deinit {
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class ValetUpgrader {
|
|||||||
.withPrimary(text: "generic.ok".localized, action: { vc in
|
.withPrimary(text: "generic.ok".localized, action: { vc in
|
||||||
vc.close(with: .OK)
|
vc.close(with: .OK)
|
||||||
})
|
})
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor private static func notifyAboutUpgrade(latest: String, constraint: String, passing: Bool) {
|
@MainActor private static func notifyAboutUpgrade(latest: String, constraint: String, passing: Bool) {
|
||||||
@@ -104,6 +104,6 @@ class ValetUpgrader {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
alert.show()
|
alert.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ extension Valet {
|
|||||||
Preferences.update(.warnAboutNonStandardTLD, value: false)
|
Preferences.update(.warnAboutNonStandardTLD, value: false)
|
||||||
alert.close(with: .alertThirdButtonReturn)
|
alert.close(with: .alertThirdButtonReturn)
|
||||||
})
|
})
|
||||||
.show()
|
.show(urgency: .urgentRequestAttention)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@ extension Valet {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .urgentRequestAttention)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ extension Valet {
|
|||||||
description: "alert.php_fpm_broken.description".localized
|
description: "alert.php_fpm_broken.description".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .urgentRequestAttention)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ extension MainMenu {
|
|||||||
description: "phpman.unlinked.detail".localized
|
description: "phpman.unlinked.detail".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ extension MainMenu {
|
|||||||
)
|
)
|
||||||
.withPrimary(text: "alert.fix_homebrew_permissions.ok".localized)
|
.withPrimary(text: "alert.fix_homebrew_permissions.ok".localized)
|
||||||
.withSecondary(text: "alert.fix_homebrew_permissions.cancel".localized)
|
.withSecondary(text: "alert.fix_homebrew_permissions.cancel".localized)
|
||||||
.didSelectPrimary() {
|
.didSelectPrimary(urgency: .bringToFront) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ extension MainMenu {
|
|||||||
description: "alert.fix_homebrew_permissions_done.desc".localized
|
description: "alert.fix_homebrew_permissions_done.desc".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .urgentRequestAttention)
|
||||||
} failure: { error in
|
} failure: { error in
|
||||||
NVAlert.show(for: error as! HomebrewPermissionError)
|
NVAlert.show(for: error as! HomebrewPermissionError)
|
||||||
}
|
}
|
||||||
@@ -186,7 +186,7 @@ extension MainMenu {
|
|||||||
self.performRollback()
|
self.performRollback()
|
||||||
})
|
})
|
||||||
.withSecondary(text: "alert.revert_description.cancel".localized)
|
.withSecondary(text: "alert.revert_description.cancel".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func togglePreset(sender: PresetMenuItem) {
|
@objc func togglePreset(sender: PresetMenuItem) {
|
||||||
@@ -206,7 +206,7 @@ extension MainMenu {
|
|||||||
NSWorkspace.shared.open(Constants.Urls.FrequentlyAskedQuestions)
|
NSWorkspace.shared.open(Constants.Urls.FrequentlyAskedQuestions)
|
||||||
alert.close(with: .OK)
|
alert.close(with: .OK)
|
||||||
})
|
})
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func openPhpInfo() {
|
@objc func openPhpInfo() {
|
||||||
@@ -262,13 +262,13 @@ extension MainMenu {
|
|||||||
if container.phpEnvs.availablePhpVersions.contains(version) {
|
if container.phpEnvs.availablePhpVersions.contains(version) {
|
||||||
Task { MainMenu.shared.switchToPhpVersion(version) }
|
Task { MainMenu.shared.switchToPhpVersion(version) }
|
||||||
} else {
|
} else {
|
||||||
Task {
|
Task { @MainActor in
|
||||||
NVAlert().withInformation(
|
NVAlert().withInformation(
|
||||||
title: "alert.php_switch_unavailable.title".localized,
|
title: "alert.php_switch_unavailable.title".localized,
|
||||||
subtitle: "alert.php_switch_unavailable.subtitle".localized(version)
|
subtitle: "alert.php_switch_unavailable.subtitle".localized(version)
|
||||||
).withPrimary(
|
).withPrimary(
|
||||||
text: "alert.php_switch_unavailable.ok".localized
|
text: "alert.php_switch_unavailable.ok".localized
|
||||||
).show()
|
).show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ extension MainMenu {
|
|||||||
)
|
)
|
||||||
.withPrimary(text: "alert.fix_my_valet.ok".localized)
|
.withPrimary(text: "alert.fix_my_valet.ok".localized)
|
||||||
.withSecondary(text: "alert.fix_my_valet.cancel".localized)
|
.withSecondary(text: "alert.fix_my_valet.cancel".localized)
|
||||||
.didSelectPrimary() {
|
.didSelectPrimary(urgency: .bringToFront) {
|
||||||
Log.info("The user has chosen to abort Fix My Valet")
|
Log.info("The user has chosen to abort Fix My Valet")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -54,7 +54,7 @@ extension MainMenu {
|
|||||||
subtitle: "alert.php_formula_missing.info".localized
|
subtitle: "alert.php_formula_missing.info".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor private func presentAlertForSameVersion() {
|
@MainActor private func presentAlertForSameVersion() {
|
||||||
@@ -65,7 +65,7 @@ extension MainMenu {
|
|||||||
description: "alert.fix_my_valet_done.desc".localized
|
description: "alert.fix_my_valet_done.desc".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .normalRequestAttention)
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor private func presentAlertForDifferentVersion(version: String) {
|
@MainActor private func presentAlertForDifferentVersion(version: String) {
|
||||||
@@ -87,7 +87,7 @@ extension MainMenu {
|
|||||||
.withTertiary(text: "", action: { _ in
|
.withTertiary(text: "", action: { _ in
|
||||||
NSWorkspace.shared.open(Constants.Urls.FrequentlyAskedQuestions)
|
NSWorkspace.shared.open(Constants.Urls.FrequentlyAskedQuestions)
|
||||||
})
|
})
|
||||||
.show()
|
.show(urgency: .urgentRequestAttention)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ extension MainMenu {
|
|||||||
)
|
)
|
||||||
.withPrimary(text: "alert.php_switch_failed.confirm".localized)
|
.withPrimary(text: "alert.php_switch_failed.confirm".localized)
|
||||||
.withSecondary(text: "alert.php_switch_failed.cancel".localized)
|
.withSecondary(text: "alert.php_switch_failed.cancel".localized)
|
||||||
.didSelectPrimary()
|
.didSelectPrimary(urgency: .bringToFront)
|
||||||
if outcome {
|
if outcome {
|
||||||
MainMenu.shared.fixMyValet()
|
MainMenu.shared.fixMyValet()
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ extension MainMenu {
|
|||||||
alert.close(with: .OK)
|
alert.close(with: .OK)
|
||||||
self.terminateApp()
|
self.terminateApp()
|
||||||
})
|
})
|
||||||
.show()
|
.show(urgency: .urgentRequestAttention)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func reloadDomainListData() async {
|
private func reloadDomainListData() async {
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ class MainMenu: NSObject, NSWindowDelegate, NSMenuDelegate, PhpSwitcherDelegate
|
|||||||
description: "startup.unsupported_versions_explanation.desc".localized
|
description: "startup.unsupported_versions_explanation.desc".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ class MainMenu: NSObject, NSWindowDelegate, NSMenuDelegate, PhpSwitcherDelegate
|
|||||||
description: "lite_mode_explanation.description".localized
|
description: "lite_mode_explanation.description".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class PhpGuard {
|
|||||||
Stats.persistCurrentGlobalPhpVersion(version: currentVersion)
|
Stats.persistCurrentGlobalPhpVersion(version: currentVersion)
|
||||||
alert.close(with: .OK)
|
alert.close(with: .OK)
|
||||||
})
|
})
|
||||||
.show()
|
.show(urgency: .normalRequestAttention)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ class Stats {
|
|||||||
.withTertiary(text: "", action: { vc in
|
.withTertiary(text: "", action: { vc in
|
||||||
vc.close(with: .alertThirdButtonReturn)
|
vc.close(with: .alertThirdButtonReturn)
|
||||||
NSWorkspace.shared.open(Constants.Urls.DonationPage)
|
NSWorkspace.shared.open(Constants.Urls.DonationPage)
|
||||||
}).didSelectPrimary()
|
}).didSelectPrimary(urgency: .normalRequestAttention)
|
||||||
|
|
||||||
if donate {
|
if donate {
|
||||||
Log.info("The user is an absolute badass for choosing this option. Thank you.")
|
Log.info("The user is an absolute badass for choosing this option. Thank you.")
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ struct Preset: Codable, Equatable {
|
|||||||
)
|
)
|
||||||
).withPrimary(
|
).withPrimary(
|
||||||
text: "alert.php_switch_unavailable.ok".localized
|
text: "alert.php_switch_unavailable.ok".localized
|
||||||
).show()
|
).show(urgency: .urgentRequestAttention)
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ struct ServicesView: View {
|
|||||||
description: "alert.\(type).desc".localized
|
description: "alert.\(type).desc".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -131,7 +131,7 @@ struct ServiceView: View {
|
|||||||
description: "alert.warnings.service_missing.description".localized
|
description: "alert.warnings.service_missing.description".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
Text("?")
|
Text("?")
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ extension DomainListVC {
|
|||||||
subtitle: "domain_list.alert.invalid_folder_name_desc".localized
|
subtitle: "domain_list.alert.invalid_folder_name_desc".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ extension DomainListVC {
|
|||||||
description: "domain_list.alerts_isolated_php_terminal.desc".localized
|
description: "domain_list.alerts_isolated_php_terminal.desc".localized
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func notifyAboutFailedSecureStatus(command: String) {
|
private func notifyAboutFailedSecureStatus(command: String) {
|
||||||
@@ -302,7 +302,7 @@ extension DomainListVC {
|
|||||||
subtitle: "domain_list.alerts_status_not_changed.desc".localized(command)
|
subtitle: "domain_list.alerts_status_not_changed.desc".localized(command)
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func notifyAboutFailedSiteIsolation(command: String) {
|
private func notifyAboutFailedSiteIsolation(command: String) {
|
||||||
@@ -313,6 +313,6 @@ extension DomainListVC {
|
|||||||
description: "domain_list.alerts_isolation_failed.desc".localized(command)
|
description: "domain_list.alerts_isolation_failed.desc".localized(command)
|
||||||
)
|
)
|
||||||
.withPrimary(text: "generic.ok".localized)
|
.withPrimary(text: "generic.ok".localized)
|
||||||
.show()
|
.show(urgency: .bringToFront)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user