diff --git a/ApplicationLibrary/Views/Groups/GroupListView.swift b/ApplicationLibrary/Views/Groups/GroupListView.swift index bf4dcb0..40e3744 100644 --- a/ApplicationLibrary/Views/Groups/GroupListView.swift +++ b/ApplicationLibrary/Views/Groups/GroupListView.swift @@ -66,7 +66,7 @@ public struct GroupListView: View { let goItem = itemIterator.next()! items.append(OutboundGroupItem(tag: goItem.tag, type: goItem.type, urlTestTime: Date(timeIntervalSince1970: Double(goItem.urlTestTime)), urlTestDelay: UInt16(goItem.urlTestDelay))) } - groups.append(OutboundGroup(tag: goGroup.tag, type: goGroup.type, selected: goGroup.selected, selectable: goGroup.selectable, isExpand: goGroup.isExpand(), items: items)) + groups.append(OutboundGroup(tag: goGroup.tag, type: goGroup.type, selected: goGroup.selected, selectable: goGroup.selectable, isExpand: goGroup.isExpand, items: items)) } self.groups = groups isLoading = false diff --git a/ApplicationLibrary/Views/Groups/GroupView.swift b/ApplicationLibrary/Views/Groups/GroupView.swift index ad6e0fc..abbd520 100644 --- a/ApplicationLibrary/Views/Groups/GroupView.swift +++ b/ApplicationLibrary/Views/Groups/GroupView.swift @@ -68,12 +68,23 @@ public struct GroupView: View { ForEach(Array(itemGroups.enumerated()), id: \.offset) { items in HStack(spacing: 5) { ForEach(items.element, id: \.tag) { it in - Rectangle() - .fill(it.delayColor) + ZStack { + Rectangle() + .fill(it.delayColor) + if it.tag == group.selected { + Rectangle() + .fill(Color.white) + #if !os(tvOS) + .frame(width: 5, height: 5) + #else + .frame(width: 15, height: 15) + #endif + } + } #if !os(tvOS) - .frame(width: 10, height: 10) + .frame(width: 10, height: 10) #else - .frame(width: 30, height: 30) + .frame(width: 30, height: 30) #endif } }.frame(maxWidth: .infinity, alignment: .topLeading) diff --git a/Library/Network/CommandClient.swift b/Library/Network/CommandClient.swift index 0970996..da948c9 100644 --- a/Library/Network/CommandClient.swift +++ b/Library/Network/CommandClient.swift @@ -59,23 +59,17 @@ public class CommandClient: ObservableObject { clientOptions.command = LibboxCommandLog } clientOptions.statusInterval = Int64(2 * NSEC_PER_SEC) - let client = LibboxNewCommandClient(FilePath.sharedDirectory.relativePath, clientHandler(self), clientOptions)! + let client = LibboxNewCommandClient(clientHandler(self), clientOptions)! do { for i in 0 ..< 10 { try await Task.sleep(nanoseconds: UInt64(Double(100 + (i * 50)) * Double(NSEC_PER_MSEC))) try Task.checkCancellation() - let isConnected: Bool do { try client.connect() - isConnected = true - } catch { - isConnected = false - } - try Task.checkCancellation() - if isConnected { commandClient = client return } + try Task.checkCancellation() } } catch { try? client.disconnect() diff --git a/MacLibrary/MainView.swift b/MacLibrary/MainView.swift index 0f61036..add19b6 100644 --- a/MacLibrary/MainView.swift +++ b/MacLibrary/MainView.swift @@ -25,7 +25,7 @@ public struct MainView: View { #if !DEBUG if Variant.useSystemExtension { Task.detached { - checkApplicationPath() + await checkApplicationPath() } } #endif diff --git a/sing-box.xcodeproj/project.pbxproj b/sing-box.xcodeproj/project.pbxproj index 47a8ee9..635ee6b 100644 --- a/sing-box.xcodeproj/project.pbxproj +++ b/sing-box.xcodeproj/project.pbxproj @@ -2551,7 +2551,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = "1.4.0-beta.5"; + MARKETING_VERSION = "1.4.0-beta.6"; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.independent; PRODUCT_NAME = SFM; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2590,7 +2590,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = "1.4.0-beta.5"; + MARKETING_VERSION = "1.4.0-beta.6"; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.independent; PRODUCT_NAME = SFM; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/sing-box.xcodeproj/xcshareddata/xcschemes/SFT.xcscheme b/sing-box.xcodeproj/xcshareddata/xcschemes/SFT.xcscheme deleted file mode 100644 index 903092a..0000000 --- a/sing-box.xcodeproj/xcshareddata/xcschemes/SFT.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -