diff --git a/.DS_Store b/.DS_Store index e3c8ec9235e22eb49210b5f02f431db9061c2cfc..780243976dafc481ca536767947f210001a22c2f 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/MacLibrary/MenuLabel.swift b/MacLibrary/MenuLabel.swift deleted file mode 100644 index 6275f5b66a9e8b416ecefee92c0b1417b8d68c14..0000000000000000000000000000000000000000 --- a/MacLibrary/MenuLabel.swift +++ /dev/null @@ -1,40 +0,0 @@ -import Libbox -import Library -import SwiftUI - -public struct MenuLabel: View { - @EnvironmentObject private var environments: ExtensionEnvirnments - - public init() {} - public var body: some View { -// if let profile = environments.extensionProfile { -// MenuLabel0().environmentObject(profile) -// } else { -// } - } - - private struct MenuLabel0: View { - @EnvironmentObject private var environments: ExtensionEnvirnments - @EnvironmentObject private var extensionProfile: ExtensionProfile - @StateObject private var commandClient = CommandClient(.status) - - var body: some View { - HStack { - if extensionProfile.status.isConnectedStrict, let message = commandClient.status { - Image("MenuIcon") - Text(" ↑ \(LibboxFormatBytes(message.uplink))/s ↓ \(LibboxFormatBytes(message.downlink))/s") - } else { - Image("MenuIcon") - } - } - .onAppear { - commandClient.connect() - } - .onChangeCompat(of: extensionProfile.status) { newValue in - if newValue.isConnectedStrict { - commandClient.connect() - } - } - } - } -} diff --git a/SFT/ContentView.swift b/SFT/ContentView.swift deleted file mode 100644 index 750338aef322c779d2f162c9e49ad3ccef84a7c1..0000000000000000000000000000000000000000 --- a/SFT/ContentView.swift +++ /dev/null @@ -1,61 +0,0 @@ -import ApplicationLibrary -import Library -import SwiftUI - -struct ContentView: View { - @Environment(\.selection) private var selection - @Environment(\.extensionProfile) private var extensionProfile - - var body: some View { - viewBuilder { - if let profile = extensionProfile.wrappedValue { - ContentView0().environmentObject(profile) - } else { - ContentView1() - } - } - } - - struct ContentView0: View { - @Environment(\.selection) private var selection - @EnvironmentObject private var extensionProfile: ExtensionProfile - - var body: some View { - TabView(selection: selection) { - ForEach(NavigationPage.allCases.filter { it in - it.visible(extensionProfile) - }, id: \.self) { page in - NavigationStackCompat { - page.contentView - .focusSection() - } - .tag(page) - .tabItem { page.label } - } - }.onChangeCompat(of: extensionProfile.status) { - if !selection.wrappedValue.visible(extensionProfile) { - selection.wrappedValue = NavigationPage.dashboard - } - } - } - } - - struct ContentView1: View { - @Environment(\.selection) private var selection - - var body: some View { - TabView(selection: selection) { - ForEach(NavigationPage.allCases.filter { it in - it.visible(nil) - }, id: \.self) { page in - NavigationStackCompat { - page.contentView - .focusSection() - } - .tag(page) - .tabItem { page.label } - } - } - } - } -} diff --git a/sing-box.xcodeproj/project.pbxproj b/sing-box.xcodeproj/project.pbxproj index c8a29d855f71d7e34c7f5949f285cb0c2c02863f..1c66181487ada0597709218cad39bacf843ccf4d 100644 --- a/sing-box.xcodeproj/project.pbxproj +++ b/sing-box.xcodeproj/project.pbxproj @@ -713,7 +713,6 @@ packageReferences = ( 3A7E90362A46778E00D53052 /* XCRemoteSwiftPackageReference "BinaryCodable" */, 3A017F902A4AB2E4009149FA /* XCRemoteSwiftPackageReference "GRDB" */, - 3A57DF3A2A4D705000690BC5 /* XCRemoteSwiftPackageReference "MacControlCenterUI" */, 3A4A020B2B53E3DC004EFB87 /* XCRemoteSwiftPackageReference "qrcode" */, ); productRefGroup = 3AEC20C72A45991900A63465 /* Products */; @@ -1434,14 +1433,6 @@ minimumVersion = 17.0.0; }; }; - 3A57DF3A2A4D705000690BC5 /* XCRemoteSwiftPackageReference "MacControlCenterUI" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/orchetect/MacControlCenterUI"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.0.1; - }; - }; 3A7E90362A46778E00D53052 /* XCRemoteSwiftPackageReference "BinaryCodable" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/christophhagen/BinaryCodable"; diff --git a/sing-box.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/sing-box.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6c91f1ef670e170865442214a63641d84db41ede..fc99870812f91ca5aeb19f1dee98526ebb06f521 100644 --- a/sing-box.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/sing-box.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,13 +1,13 @@ { - "originHash" : "82fb479ec8c73c3348b93e33a9102fc692bb5a0a0d6f14beb4c5f31445c36e81", + "originHash" : "49135d87ff46d5891246ab1dcab59fd60de75d6d414255ee3c7ba63e63bd4e6d", "pins" : [ { "identity" : "binarycodable", "kind" : "remoteSourceControl", "location" : "https://github.com/christophhagen/BinaryCodable", "state" : { - "revision" : "295ca6399b2b01d1aa4fa84d666416f3bf99ffde", - "version" : "2.0.0" + "revision" : "33643e2343f591368647935d14a94e35dc2d3bf0", + "version" : "2.0.3" } }, { @@ -15,26 +15,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/groue/GRDB.swift", "state" : { - "revision" : "284a4ee1acf9bf6c8b3d045494d0a7e3046ebf92", - "version" : "6.15.1" - } - }, - { - "identity" : "maccontrolcenterui", - "kind" : "remoteSourceControl", - "location" : "https://github.com/orchetect/MacControlCenterUI", - "state" : { - "revision" : "e7f7e0834a146b59a9d86b5751b711eb3a57be69", - "version" : "2.0.1" - } - }, - { - "identity" : "menubarextraaccess", - "kind" : "remoteSourceControl", - "location" : "https://github.com/orchetect/MenuBarExtraAccess", - "state" : { - "revision" : "8757eb7c2cd708320df92e6ad6572efe90e58f16", - "version" : "1.0.4" + "revision" : "1cd6c7cbffa7ecac14a8a7c0f27d5c3e7c35c87e", + "version" : "6.29.0" } }, { @@ -42,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/dagronf/qrcode.git", "state" : { - "revision" : "13c605cfa866e257ac9d4ac8a47320a0e11fb6e0", - "version" : "17.0.0" + "revision" : "6e32d9e56b25ab50af62a902d29d119d407d05e1", + "version" : "17.1.0" } }, { @@ -60,8 +42,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/dagronf/SwiftImageReadWrite", "state" : { - "revision" : "02c141026a0c5d74635a457d2d0964c4cb8935b3", - "version" : "1.4.1" + "revision" : "96361ba7f9dce5184d95aba8ea90d9faa4acabb2", + "version" : "1.6.1" } } ], diff --git a/sing-box.xcodeproj/project.xcworkspace/xcuserdata/g.makhoul.xcuserdatad/UserInterfaceState.xcuserstate b/sing-box.xcodeproj/project.xcworkspace/xcuserdata/g.makhoul.xcuserdatad/UserInterfaceState.xcuserstate index 25989602c32c70bae385f62ea55e06b46826c31d..a4a4f7872acaae0db252db0ea53fbb322eb35936 100644 Binary files a/sing-box.xcodeproj/project.xcworkspace/xcuserdata/g.makhoul.xcuserdatad/UserInterfaceState.xcuserstate and b/sing-box.xcodeproj/project.xcworkspace/xcuserdata/g.makhoul.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/sing-box.xcodeproj/xcuserdata/g.makhoul.xcuserdatad/xcschemes/xcschememanagement.plist b/sing-box.xcodeproj/xcuserdata/g.makhoul.xcuserdatad/xcschemes/xcschememanagement.plist index 69a7131dc8304e88d3bd39340990c4aff566cc01..aceea219cf14bfcd83c813f4ca1659bd726a6763 100644 --- a/sing-box.xcodeproj/xcuserdata/g.makhoul.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/sing-box.xcodeproj/xcuserdata/g.makhoul.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,7 @@ <key>ApplicationLibrary.xcscheme_^#shared#^_</key> <dict> <key>orderHint</key> - <integer>5</integer> + <integer>6</integer> </dict> <key>Associations (Playground) 1.xcscheme</key> <dict> @@ -33,7 +33,7 @@ <key>Extension.xcscheme_^#shared#^_</key> <dict> <key>orderHint</key> - <integer>4</integer> + <integer>5</integer> </dict> <key>IntentsExtension.xcscheme_^#shared#^_</key> <dict> @@ -43,7 +43,7 @@ <key>Library.xcscheme_^#shared#^_</key> <dict> <key>orderHint</key> - <integer>9</integer> + <integer>4</integer> </dict> <key>MyPlayground (Playground) 1.xcscheme</key> <dict>