mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-17 20:08:31 +00:00
Add outbound proxy popup
This commit is contained in:
parent
f08bb865aa
commit
5bbbbe5d75
5 changed files with 121 additions and 44 deletions
|
|
@ -2,6 +2,6 @@ import Foundation
|
||||||
|
|
||||||
public enum AppGitInfo {
|
public enum AppGitInfo {
|
||||||
public static let branch = "master"
|
public static let branch = "master"
|
||||||
public static let commit = "0f6d8b129"
|
public static let commit = "f08bb865a"
|
||||||
public static let tag = "6.1.0-alpha"
|
public static let tag = "6.1.0-alpha"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -364,6 +364,7 @@
|
||||||
"Interoperable mode" = "Interoperable mode";
|
"Interoperable mode" = "Interoperable mode";
|
||||||
"list_filter_no_result_found" = "No result found…";
|
"list_filter_no_result_found" = "No result found…";
|
||||||
"manage_account_add_picture" = "Add a picture";
|
"manage_account_add_picture" = "Add a picture";
|
||||||
|
|
||||||
"manage_account_delete" = "Sign out";
|
"manage_account_delete" = "Sign out";
|
||||||
"manage_account_details_title" = "Details";
|
"manage_account_details_title" = "Details";
|
||||||
"manage_account_device_last_connection" = "Last connection:";
|
"manage_account_device_last_connection" = "Last connection:";
|
||||||
|
|
@ -372,6 +373,8 @@
|
||||||
"manage_account_dialog_international_prefix_help_message" = "Pick your country to allow Linphone to match your contacts.";
|
"manage_account_dialog_international_prefix_help_message" = "Pick your country to allow Linphone to match your contacts.";
|
||||||
"manage_account_dialog_remove_account_message" = "If you wish to delete your account permanently, go to: https://sip.linphone.org";
|
"manage_account_dialog_remove_account_message" = "If you wish to delete your account permanently, go to: https://sip.linphone.org";
|
||||||
"manage_account_dialog_remove_account_title" = "Sign out of your account?";
|
"manage_account_dialog_remove_account_title" = "Sign out of your account?";
|
||||||
|
"manage_account_outbound_proxy" = "Outbound SIP Proxy";
|
||||||
|
"manage_account_dialog_outbound_proxy_help_message" = "If this field is filled, the outbound proxy will be enabled automatically. Leave it empty to disable it.";
|
||||||
"manage_account_edit_picture" = "Edit picture";
|
"manage_account_edit_picture" = "Edit picture";
|
||||||
"manage_account_international_prefix" = "International Prefix";
|
"manage_account_international_prefix" = "International Prefix";
|
||||||
"manage_account_no_device" = "No device found…";
|
"manage_account_no_device" = "No device found…";
|
||||||
|
|
|
||||||
|
|
@ -372,6 +372,8 @@
|
||||||
"manage_account_dialog_international_prefix_help_message" = "Choisissez votre pays pour permettre à Linphone de faire le lien avec vos contacts.";
|
"manage_account_dialog_international_prefix_help_message" = "Choisissez votre pays pour permettre à Linphone de faire le lien avec vos contacts.";
|
||||||
"manage_account_dialog_remove_account_message" = "Si vous souhaitez supprimer définitivement votre compte rendez-vous sur : https://sip.linphone.org";
|
"manage_account_dialog_remove_account_message" = "Si vous souhaitez supprimer définitivement votre compte rendez-vous sur : https://sip.linphone.org";
|
||||||
"manage_account_dialog_remove_account_title" = "Se déconnecter du compte ?";
|
"manage_account_dialog_remove_account_title" = "Se déconnecter du compte ?";
|
||||||
|
"manage_account_outbound_proxy" = "Proxy SIP sortant";
|
||||||
|
"manage_account_dialog_outbound_proxy_help_message" = "Si ce champ est rempli, l'outbound proxy sera activé automatiquement. Laissez-le vide pour le désactiver.";
|
||||||
"manage_account_edit_picture" = "Modifier";
|
"manage_account_edit_picture" = "Modifier";
|
||||||
"manage_account_international_prefix" = "Indicatif international";
|
"manage_account_international_prefix" = "Indicatif international";
|
||||||
"manage_account_no_device" = "Aucun appareil n'a été trouvé…";
|
"manage_account_no_device" = "Aucun appareil n'a été trouvé…";
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,9 @@ struct ThirdPartySipAccountLoginFragment: View {
|
||||||
|
|
||||||
@Environment(\.dismiss) var dismiss
|
@Environment(\.dismiss) var dismiss
|
||||||
|
|
||||||
@State private var isSecured: Bool = true
|
@State private var isSecured = true
|
||||||
@State private var advancedSettingsIsOpen: Bool = false
|
@State private var advancedSettingsIsOpen = false
|
||||||
|
@State private var isShowOutboundProxyPopup = false
|
||||||
|
|
||||||
@FocusState var isNameFocused: Bool
|
@FocusState var isNameFocused: Bool
|
||||||
@FocusState var isPasswordFocused: Bool
|
@FocusState var isPasswordFocused: Bool
|
||||||
|
|
@ -42,41 +43,63 @@ struct ThirdPartySipAccountLoginFragment: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
GeometryReader { geometry in
|
GeometryReader { geometry in
|
||||||
ScrollViewReader { proxy in
|
ScrollViewReader { proxy in
|
||||||
if #available(iOS 16.4, *) {
|
ZStack {
|
||||||
ScrollView(.vertical) {
|
if #available(iOS 16.4, *) {
|
||||||
innerScrollView(geometry: geometry)
|
ScrollView(.vertical) {
|
||||||
}
|
innerScrollView(geometry: geometry)
|
||||||
.scrollBounceBehavior(.basedOnSize)
|
}
|
||||||
.onChange(of: isAuthIdFocused) { field in
|
.scrollBounceBehavior(.basedOnSize)
|
||||||
if field {
|
.onChange(of: isAuthIdFocused) { field in
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
if field {
|
||||||
proxy.scrollTo(2, anchor: .top)
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||||
|
proxy.scrollTo(2, anchor: .top)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.onChange(of: isOutboundProxyFocused) { field in
|
||||||
|
if field {
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||||
|
proxy.scrollTo(2, anchor: .top)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ScrollView(.vertical) {
|
||||||
|
innerScrollView(geometry: geometry)
|
||||||
|
}
|
||||||
|
.onChange(of: isAuthIdFocused) { field in
|
||||||
|
if field {
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||||
|
proxy.scrollTo(2, anchor: .top)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.onChange(of: isOutboundProxyFocused) { field in
|
||||||
|
if field {
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||||
|
proxy.scrollTo(2, anchor: .top)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onChange(of: isOutboundProxyFocused) { field in
|
|
||||||
if field {
|
if isShowOutboundProxyPopup {
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
PopupView(
|
||||||
proxy.scrollTo(2, anchor: .top)
|
isShowPopup: $isShowOutboundProxyPopup,
|
||||||
}
|
title: Text("manage_account_outbound_proxy"),
|
||||||
}
|
content: Text("manage_account_dialog_outbound_proxy_help_message"),
|
||||||
}
|
titleFirstButton: nil,
|
||||||
} else {
|
actionFirstButton: {},
|
||||||
ScrollView(.vertical) {
|
titleSecondButton: Text("dialog_understood"),
|
||||||
innerScrollView(geometry: geometry)
|
actionSecondButton: { self.isShowOutboundProxyPopup.toggle() },
|
||||||
}
|
titleThirdButton: nil,
|
||||||
.onChange(of: isAuthIdFocused) { field in
|
actionThirdButton: {}
|
||||||
if field {
|
)
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
.padding(.bottom, keyboard.currentHeight)
|
||||||
proxy.scrollTo(2, anchor: .top)
|
.background(.black.opacity(0.65))
|
||||||
}
|
.zIndex(3)
|
||||||
}
|
.onTapGesture {
|
||||||
}
|
self.isShowOutboundProxyPopup.toggle()
|
||||||
.onChange(of: isOutboundProxyFocused) { field in
|
|
||||||
if field {
|
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
|
||||||
proxy.scrollTo(2, anchor: .top)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -314,9 +337,24 @@ struct ThirdPartySipAccountLoginFragment: View {
|
||||||
.padding(.bottom)
|
.padding(.bottom)
|
||||||
|
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text("account_settings_outbound_proxy_title")
|
HStack {
|
||||||
.default_text_style_700(styleSize: 15)
|
Text("account_settings_outbound_proxy_title")
|
||||||
.padding(.bottom, -5)
|
.default_text_style_700(styleSize: 15)
|
||||||
|
.padding(.bottom, -5)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
|
Button(action: {
|
||||||
|
self.isShowOutboundProxyPopup = true
|
||||||
|
}, label: {
|
||||||
|
Image("info")
|
||||||
|
.renderingMode(.template)
|
||||||
|
.resizable()
|
||||||
|
.foregroundStyle(Color.grayMain2c500)
|
||||||
|
.frame(width: 25, height: 25)
|
||||||
|
})
|
||||||
|
.padding(.trailing, 10)
|
||||||
|
}
|
||||||
|
.padding(.bottom, -5)
|
||||||
|
|
||||||
TextField("account_settings_outbound_proxy_title", text: $accountLoginViewModel.outboundProxy)
|
TextField("account_settings_outbound_proxy_title", text: $accountLoginViewModel.outboundProxy)
|
||||||
.id(3)
|
.id(3)
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,10 @@ struct AccountSettingsFragment: View {
|
||||||
|
|
||||||
@Environment(\.dismiss) var dismiss
|
@Environment(\.dismiss) var dismiss
|
||||||
|
|
||||||
@State var natPolicySettingsIsOpen: Bool = false
|
@State private var isSecured = true
|
||||||
@State var advancedSettingsIsOpen: Bool = false
|
@State private var advancedSettingsIsOpen = false
|
||||||
@State var isSecured: Bool = true
|
@State private var natPolicySettingsIsOpen = false
|
||||||
|
@State private var isShowOutboundProxyPopup = false
|
||||||
|
|
||||||
@FocusState var isVoicemailUriFocused: Bool
|
@FocusState var isVoicemailUriFocused: Bool
|
||||||
@FocusState var isMwiUriFocused: Bool
|
@FocusState var isMwiUriFocused: Bool
|
||||||
|
|
@ -356,9 +357,23 @@ struct AccountSettingsFragment: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text("account_settings_outbound_proxy_title")
|
HStack {
|
||||||
.default_text_style_700(styleSize: 15)
|
Text("account_settings_outbound_proxy_title")
|
||||||
.padding(.bottom, -5)
|
.default_text_style_700(styleSize: 15)
|
||||||
|
.padding(.bottom, -5)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
|
Button(action: {
|
||||||
|
self.isShowOutboundProxyPopup = true
|
||||||
|
}, label: {
|
||||||
|
Image("info")
|
||||||
|
.renderingMode(.template)
|
||||||
|
.resizable()
|
||||||
|
.foregroundStyle(Color.grayMain2c500)
|
||||||
|
.frame(width: 25, height: 25)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
.padding(.bottom, -5)
|
||||||
|
|
||||||
TextField("account_settings_outbound_proxy_title", text: $accountSettingsViewModel.outboundProxy)
|
TextField("account_settings_outbound_proxy_title", text: $accountSettingsViewModel.outboundProxy)
|
||||||
.default_text_style(styleSize: 15)
|
.default_text_style(styleSize: 15)
|
||||||
|
|
@ -511,6 +526,25 @@ struct AccountSettingsFragment: View {
|
||||||
.background(Color.gray100)
|
.background(Color.gray100)
|
||||||
}
|
}
|
||||||
.background(Color.gray100)
|
.background(Color.gray100)
|
||||||
|
|
||||||
|
if isShowOutboundProxyPopup {
|
||||||
|
PopupView(
|
||||||
|
isShowPopup: $isShowOutboundProxyPopup,
|
||||||
|
title: Text("manage_account_outbound_proxy"),
|
||||||
|
content: Text("manage_account_dialog_outbound_proxy_help_message"),
|
||||||
|
titleFirstButton: nil,
|
||||||
|
actionFirstButton: {},
|
||||||
|
titleSecondButton: Text("dialog_understood"),
|
||||||
|
actionSecondButton: { self.isShowOutboundProxyPopup.toggle() },
|
||||||
|
titleThirdButton: nil,
|
||||||
|
actionThirdButton: {}
|
||||||
|
)
|
||||||
|
.background(.black.opacity(0.65))
|
||||||
|
.zIndex(3)
|
||||||
|
.onTapGesture {
|
||||||
|
self.isShowOutboundProxyPopup.toggle()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.navigationTitle("")
|
.navigationTitle("")
|
||||||
.navigationBarHidden(true)
|
.navigationBarHidden(true)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue