From 4e5b251d6f24d85c8148f542941b8c5794de1a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 2 Sep 2023 20:34:44 +0800 Subject: [PATCH] Fix import remote profile --- .../NavigationDestinationCompat.swift | 18 ++++++-------- .../Views/Profile/EditProfileView.swift | 13 ++++++---- sing-box.xcodeproj/project.pbxproj | 24 +++++++++---------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/ApplicationLibrary/Views/Abstract/NavigationDestinationCompat.swift b/ApplicationLibrary/Views/Abstract/NavigationDestinationCompat.swift index e323ff5..9df4b21 100644 --- a/ApplicationLibrary/Views/Abstract/NavigationDestinationCompat.swift +++ b/ApplicationLibrary/Views/Abstract/NavigationDestinationCompat.swift @@ -1,15 +1,11 @@ import SwiftUI func NavigationDestinationCompat(isPresented: Binding, @ViewBuilder destination: () -> some View) -> some View { - if #unavailable(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0) { - return NavigationLink( - destination: destination(), - isActive: isPresented, - label: { - EmptyView() - } - ) - } else { - return EmptyView().navigationDestination(isPresented: isPresented, destination: destination) - } + NavigationLink( + destination: destination(), + isActive: isPresented, + label: { + EmptyView() + } + ) } diff --git a/ApplicationLibrary/Views/Profile/EditProfileView.swift b/ApplicationLibrary/Views/Profile/EditProfileView.swift index a0cb733..a83fd74 100644 --- a/ApplicationLibrary/Views/Profile/EditProfileView.swift +++ b/ApplicationLibrary/Views/Profile/EditProfileView.swift @@ -70,6 +70,11 @@ public struct EditProfileView: View { Text("Share") } #endif + ShareButtonCompat($alert) { + Text("Share URL") + } itemURL: { + profile.shareLink + } Button("Update") { isLoading = true Task.detached { @@ -77,10 +82,10 @@ public struct EditProfileView: View { } } .disabled(isLoading) - Button("Delete", role: .destructive) { - Task.detached { - await deleteProfile() - } + } + Button("Delete", role: .destructive) { + Task.detached { + await deleteProfile() } } } diff --git a/sing-box.xcodeproj/project.pbxproj b/sing-box.xcodeproj/project.pbxproj index 1a26595..788aaa3 100644 --- a/sing-box.xcodeproj/project.pbxproj +++ b/sing-box.xcodeproj/project.pbxproj @@ -1962,7 +1962,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.5.0; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa; PRODUCT_NAME = "sing-box"; SDKROOT = appletvos; @@ -1996,7 +1996,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.5.0; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa; PRODUCT_NAME = "sing-box"; SDKROOT = appletvos; @@ -2230,7 +2230,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.5.0; OTHER_CODE_SIGN_FLAGS = "--deep"; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa; PRODUCT_NAME = "sing-box"; @@ -2270,7 +2270,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.5.0; OTHER_CODE_SIGN_FLAGS = "--deep"; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa; PRODUCT_NAME = "sing-box"; @@ -2293,7 +2293,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 49; + CURRENT_PROJECT_VERSION = 52; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = Z56Z6NYZN2; ENABLE_HARDENED_RUNTIME = YES; @@ -2309,7 +2309,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.5.0; OTHER_CODE_SIGN_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa; PRODUCT_NAME = "sing-box"; @@ -2331,7 +2331,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 49; + CURRENT_PROJECT_VERSION = 52; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = Z56Z6NYZN2; ENABLE_HARDENED_RUNTIME = YES; @@ -2347,7 +2347,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.5.0; OTHER_CODE_SIGN_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa; PRODUCT_NAME = "sing-box"; @@ -2489,7 +2489,7 @@ "@executable_path/../../../../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.5.0-beta.2; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.system; PRODUCT_NAME = "$(inherited)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2525,7 +2525,7 @@ "@executable_path/../../../../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.5.0-beta.2; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.system; PRODUCT_NAME = "$(inherited)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2565,7 +2565,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.5.0-beta.2; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.independent; PRODUCT_NAME = SFM; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2604,7 +2604,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 1.4.1; + MARKETING_VERSION = 1.5.0-beta.2; PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.independent; PRODUCT_NAME = SFM; PROVISIONING_PROFILE_SPECIFIER = "";