From f66e9b734087c666a434487db8ba4b738ee0a9f0 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Tue, 19 Mar 2024 14:10:08 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20`UnavailableContentView`=20to?= =?UTF-8?q?=20domains?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PHP Monitor.xcodeproj/project.pbxproj | 4 ++ phpmon/Common/Core/Constants.swift | 21 ++++-- phpmon/Domain/App/Base.lproj/Main.storyboard | 60 ++++++++++------- .../Common/UnavailableContentView.swift | 65 +++++++++++++++++++ .../Modules/Domain List/UI/DomainListVC.swift | 26 ++++++++ 5 files changed, 146 insertions(+), 30 deletions(-) create mode 100644 phpmon/Domain/SwiftUI/Common/UnavailableContentView.swift diff --git a/PHP Monitor.xcodeproj/project.pbxproj b/PHP Monitor.xcodeproj/project.pbxproj index 8d8b8ce..1741ef7 100644 --- a/PHP Monitor.xcodeproj/project.pbxproj +++ b/PHP Monitor.xcodeproj/project.pbxproj @@ -176,6 +176,7 @@ C43A8A1A25D9CD1000591B77 /* Utility.swift in Sources */ = {isa = PBXBuildFile; fileRef = C43A8A1925D9CD1000591B77 /* Utility.swift */; }; C43A8A2025D9D1D700591B77 /* brew-formula.json in Resources */ = {isa = PBXBuildFile; fileRef = C43A8A1F25D9D1D700591B77 /* brew-formula.json */; }; C43A8A2425D9D20D00591B77 /* HomebrewPackageTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C43A8A2325D9D20D00591B77 /* HomebrewPackageTest.swift */; }; + C43B8FD52BA9BAD3000C02BE /* UnavailableContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C43B8FD42BA9BAD3000C02BE /* UnavailableContentView.swift */; }; C43BCD4429FBEF40001547BC /* ModifyPhpVersionCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = C43BCD4329FBEF40001547BC /* ModifyPhpVersionCommand.swift */; }; C43BCD4529FBEF40001547BC /* ModifyPhpVersionCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = C43BCD4329FBEF40001547BC /* ModifyPhpVersionCommand.swift */; }; C43BCD4629FBEF40001547BC /* ModifyPhpVersionCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = C43BCD4329FBEF40001547BC /* ModifyPhpVersionCommand.swift */; }; @@ -1002,6 +1003,7 @@ C43A8A1925D9CD1000591B77 /* Utility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utility.swift; sourceTree = ""; }; C43A8A1F25D9D1D700591B77 /* brew-formula.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "brew-formula.json"; sourceTree = ""; }; C43A8A2325D9D20D00591B77 /* HomebrewPackageTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomebrewPackageTest.swift; sourceTree = ""; }; + C43B8FD42BA9BAD3000C02BE /* UnavailableContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnavailableContentView.swift; sourceTree = ""; }; C43BCD4329FBEF40001547BC /* ModifyPhpVersionCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModifyPhpVersionCommand.swift; sourceTree = ""; }; C43FDBE829A932B0003D85EC /* PhpConfigChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhpConfigChecker.swift; sourceTree = ""; }; C44067F427E2582B0045BD4E /* DomainListNameCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DomainListNameCell.swift; sourceTree = ""; }; @@ -1969,6 +1971,7 @@ C451AFF52969E40F0078E617 /* HelpButton.swift */, C4EA3C462BA4F947007B0BA7 /* CustomButtonStyles.swift */, C48DDD0C29C75C9E00D032D9 /* BlockingOverlayView.swift */, + C43B8FD42BA9BAD3000C02BE /* UnavailableContentView.swift */, ); path = Common; sourceTree = ""; @@ -2549,6 +2552,7 @@ C4205A7E27F4D21800191A39 /* ValetProxy.swift in Sources */, C4C8E818276F54D8003AC782 /* App+ConfigWatch.swift in Sources */, C4E49DE728F764050026AC4E /* ActiveCommand.swift in Sources */, + C43B8FD52BA9BAD3000C02BE /* UnavailableContentView.swift in Sources */, 54FCFD30276C8DA4004CE748 /* HotkeyPreferenceView.swift in Sources */, C450C8C628C919EC002A2B4B /* PreferenceName.swift in Sources */, C4E4404627C56F4700D225E1 /* ValetSite.swift in Sources */, diff --git a/phpmon/Common/Core/Constants.swift b/phpmon/Common/Core/Constants.swift index f19c768..0b71386 100644 --- a/phpmon/Common/Core/Constants.swift +++ b/phpmon/Common/Core/Constants.swift @@ -30,7 +30,7 @@ struct Constants { will be displayed to let them know that certain operations will not work correctly and that they need to update their app. */ - static let PhpFormulaeCutoffDate = "2024-11-01" + static let PhpFormulaeCutoffDate = "2024-11-01" // YYYY-MM-DD /** * The PHP versions that are considered pre-release versions. @@ -54,6 +54,17 @@ struct Constants { }) } + /** + The Homebrew services that should be automatically + detected and show up in the list of managed services. + */ + static let DetectedHomebrewServices: Set = [ + "mailhog", + "mysql@", + "postgresql@", + "redis" + ] + /** * The PHP versions supported by this application. * Any other PHP versions are considered invalid. @@ -78,14 +89,14 @@ struct Constants { 3: // Valet v3 dropped support for v5.6 [ "7.0", "7.1", "7.2", "7.3", "7.4", - "8.0", "8.1", "8.2", - "8.3", "8.4" // dev + "8.0", "8.1", "8.2", "8.3", + "8.4" // dev ], 4: // Valet v4 dropped support for v7.0 [ "7.1", "7.2", "7.3", "7.4", - "8.0", "8.1", "8.2", - "8.3", "8.4" // dev + "8.0", "8.1", "8.2", "8.3", + "8.4" // dev ] ] diff --git a/phpmon/Domain/App/Base.lproj/Main.storyboard b/phpmon/Domain/App/Base.lproj/Main.storyboard index 9d0adbe..e9b845b 100644 --- a/phpmon/Domain/App/Base.lproj/Main.storyboard +++ b/phpmon/Domain/App/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + @@ -429,7 +429,7 @@ - + @@ -575,7 +575,7 @@ Gw - + @@ -586,7 +586,7 @@ Gw - + @@ -610,7 +610,7 @@ Gw - + @@ -699,7 +699,7 @@ Gw - + @@ -710,7 +710,7 @@ Gw - + @@ -728,7 +728,7 @@ Gw - + @@ -743,7 +743,7 @@ Gw - + @@ -751,7 +751,7 @@ Gw -