Merge branch 'stable'
This commit is contained in:
@@ -14,7 +14,6 @@ struct ContactConnectionInfo: View {
|
|||||||
@Environment(\.dismiss) var dismiss: DismissAction
|
@Environment(\.dismiss) var dismiss: DismissAction
|
||||||
@State var contactConnection: PendingContactConnection
|
@State var contactConnection: PendingContactConnection
|
||||||
@State private var alert: CCInfoAlert?
|
@State private var alert: CCInfoAlert?
|
||||||
@State private var showQRCodeView = false
|
|
||||||
@State private var localAlias = ""
|
@State private var localAlias = ""
|
||||||
@FocusState private var aliasTextFieldFocused: Bool
|
@FocusState private var aliasTextFieldFocused: Bool
|
||||||
|
|
||||||
@@ -60,9 +59,11 @@ struct ContactConnectionInfo: View {
|
|||||||
.onSubmit(setConnectionAlias)
|
.onSubmit(setConnectionAlias)
|
||||||
}
|
}
|
||||||
|
|
||||||
if contactConnection.initiated && contactConnection.connReqInv != nil {
|
if contactConnection.initiated,
|
||||||
Button {
|
let connReqInv = contactConnection.connReqInv {
|
||||||
showQRCodeView = true
|
NavigationLink {
|
||||||
|
AddContactView(contactConnection: contactConnection, connReqInvitation: connReqInv, viaNavLink: true)
|
||||||
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
} label: {
|
} label: {
|
||||||
Label("Show QR code", systemImage: "qrcode")
|
Label("Show QR code", systemImage: "qrcode")
|
||||||
.foregroundColor(contactConnection.incognito ? .indigo : .accentColor)
|
.foregroundColor(contactConnection.incognito ? .indigo : .accentColor)
|
||||||
@@ -79,11 +80,6 @@ struct ContactConnectionInfo: View {
|
|||||||
}
|
}
|
||||||
.listStyle(.insetGrouped)
|
.listStyle(.insetGrouped)
|
||||||
}
|
}
|
||||||
.sheet(isPresented: $showQRCodeView) {
|
|
||||||
if let connReqInv = contactConnection.connReqInv {
|
|
||||||
AddContactView(contactConnection: contactConnection, connReqInvitation: connReqInv)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.alert(item: $alert) { _alert in
|
.alert(item: $alert) { _alert in
|
||||||
switch _alert {
|
switch _alert {
|
||||||
case .deleteInvitationAlert:
|
case .deleteInvitationAlert:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ struct AddContactView: View {
|
|||||||
@EnvironmentObject private var chatModel: ChatModel
|
@EnvironmentObject private var chatModel: ChatModel
|
||||||
var contactConnection: PendingContactConnection? = nil
|
var contactConnection: PendingContactConnection? = nil
|
||||||
var connReqInvitation: String
|
var connReqInvitation: String
|
||||||
var viaSettings = false
|
var viaNavLink = false
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ScrollView {
|
ScrollView {
|
||||||
@@ -22,7 +22,7 @@ struct AddContactView: View {
|
|||||||
Text("One-time invitation link")
|
Text("One-time invitation link")
|
||||||
.font(.largeTitle)
|
.font(.largeTitle)
|
||||||
.bold()
|
.bold()
|
||||||
.padding(viaSettings ? .bottom : .vertical)
|
.padding(viaNavLink ? .bottom : .vertical)
|
||||||
Text("Your contact can scan it from the app.")
|
Text("Your contact can scan it from the app.")
|
||||||
.padding(.bottom, 4)
|
.padding(.bottom, 4)
|
||||||
if (contactConnection?.incognito ?? chatModel.incognito) {
|
if (contactConnection?.incognito ?? chatModel.incognito) {
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ struct CreateLinkView: View {
|
|||||||
@State var selection: CreateLinkTab
|
@State var selection: CreateLinkTab
|
||||||
@State var connReqInvitation: String = ""
|
@State var connReqInvitation: String = ""
|
||||||
@State private var creatingConnReq = false
|
@State private var creatingConnReq = false
|
||||||
var viaSettings = false
|
var viaNavLink = false
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
TabView(selection: $selection) {
|
TabView(selection: $selection) {
|
||||||
AddContactView(connReqInvitation: connReqInvitation, viaSettings: viaSettings)
|
AddContactView(connReqInvitation: connReqInvitation, viaNavLink: viaNavLink)
|
||||||
.tabItem {
|
.tabItem {
|
||||||
Label(
|
Label(
|
||||||
connReqInvitation == ""
|
connReqInvitation == ""
|
||||||
@@ -32,7 +32,7 @@ struct CreateLinkView: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
.tag(CreateLinkTab.oneTime)
|
.tag(CreateLinkTab.oneTime)
|
||||||
UserAddress(viaSettings: viaSettings)
|
UserAddress(viaNavLink: viaNavLink)
|
||||||
.tabItem {
|
.tabItem {
|
||||||
Label("Your contact address", systemImage: "infinity.circle")
|
Label("Your contact address", systemImage: "infinity.circle")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ struct SettingsView: View {
|
|||||||
.disabled(chatModel.chatRunning != true)
|
.disabled(chatModel.chatRunning != true)
|
||||||
|
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
CreateLinkView(selection: .longTerm, viaSettings: true)
|
CreateLinkView(selection: .longTerm, viaNavLink: true)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
} label: {
|
} label: {
|
||||||
settingsRow("qrcode") { Text("Your SimpleX contact address") }
|
settingsRow("qrcode") { Text("Your SimpleX contact address") }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import SimpleXChat
|
|||||||
struct UserAddress: View {
|
struct UserAddress: View {
|
||||||
@EnvironmentObject private var chatModel: ChatModel
|
@EnvironmentObject private var chatModel: ChatModel
|
||||||
@State private var alert: UserAddressAlert?
|
@State private var alert: UserAddressAlert?
|
||||||
var viaSettings = false
|
var viaNavLink = false
|
||||||
|
|
||||||
private enum UserAddressAlert: Identifiable {
|
private enum UserAddressAlert: Identifiable {
|
||||||
case deleteAddress
|
case deleteAddress
|
||||||
@@ -32,7 +32,7 @@ struct UserAddress: View {
|
|||||||
Text("Your contact address")
|
Text("Your contact address")
|
||||||
.font(.largeTitle)
|
.font(.largeTitle)
|
||||||
.bold()
|
.bold()
|
||||||
.padding(viaSettings ? .bottom : .vertical)
|
.padding(viaNavLink ? .bottom : .vertical)
|
||||||
Text("You can share your address as a link or as a QR code - anybody will be able to connect to you. You won't lose your contacts if you later delete it.")
|
Text("You can share your address as a link or as a QR code - anybody will be able to connect to you. You won't lose your contacts if you later delete it.")
|
||||||
.padding(.bottom)
|
.padding(.bottom)
|
||||||
if let userAdress = chatModel.userAddress {
|
if let userAdress = chatModel.userAddress {
|
||||||
|
|||||||
@@ -1203,7 +1203,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = "SimpleX (iOS).entitlements";
|
CODE_SIGN_ENTITLEMENTS = "SimpleX (iOS).entitlements";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 83;
|
CURRENT_PROJECT_VERSION = 84;
|
||||||
DEVELOPMENT_TEAM = 5NN7GUYB6T;
|
DEVELOPMENT_TEAM = 5NN7GUYB6T;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
@@ -1245,7 +1245,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = "SimpleX (iOS).entitlements";
|
CODE_SIGN_ENTITLEMENTS = "SimpleX (iOS).entitlements";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 83;
|
CURRENT_PROJECT_VERSION = 84;
|
||||||
DEVELOPMENT_TEAM = 5NN7GUYB6T;
|
DEVELOPMENT_TEAM = 5NN7GUYB6T;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
@@ -1324,7 +1324,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = "SimpleX NSE/SimpleX NSE.entitlements";
|
CODE_SIGN_ENTITLEMENTS = "SimpleX NSE/SimpleX NSE.entitlements";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 83;
|
CURRENT_PROJECT_VERSION = 84;
|
||||||
DEVELOPMENT_TEAM = 5NN7GUYB6T;
|
DEVELOPMENT_TEAM = 5NN7GUYB6T;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -1354,7 +1354,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = "SimpleX NSE/SimpleX NSE.entitlements";
|
CODE_SIGN_ENTITLEMENTS = "SimpleX NSE/SimpleX NSE.entitlements";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 83;
|
CURRENT_PROJECT_VERSION = 84;
|
||||||
DEVELOPMENT_TEAM = 5NN7GUYB6T;
|
DEVELOPMENT_TEAM = 5NN7GUYB6T;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
|||||||
Reference in New Issue
Block a user