forked from mirrors/linphone-iphone
Moved mountain image to the bottom of all Login views
This commit is contained in:
parent
0b81887728
commit
273c77edbe
14 changed files with 1310 additions and 1224 deletions
21
Linphone/Assets.xcassets/mountain2.imageset/Contents.json
vendored
Normal file
21
Linphone/Assets.xcassets/mountain2.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "mountain2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Linphone/Assets.xcassets/mountain2.imageset/mountain2.png
vendored
Normal file
BIN
Linphone/Assets.xcassets/mountain2.imageset/mountain2.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
|
|
@ -1055,13 +1055,13 @@
|
|||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Some features require a %@ account, such as group messaging, video conferences…\\n\\nThese features are hidden when you register with a third party SIP account.\\n\\nTo enable it in a commercial project, please contact us."
|
||||
"value" : "Some features require a %@ account, such as group messaging, video conferences…\n\nThese features are hidden when you register with a third party SIP account.\n\nTo enable it in a commercial project, please contact us."
|
||||
}
|
||||
},
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Certaines fonctionnalités telles que les conversations de groupe, les vidéo-conférences, etc… nécessitent un compte %@.\\n\\nCes fonctionnalités seront masquées si vous utilisez un compte SIP tiers.\\n\\nPour les activer dans un projet commercial, merci de nous contacter."
|
||||
"value" : "Certaines fonctionnalités telles que les conversations de groupe, les vidéo-conférences, etc… nécessitent un compte %@.\n\nCes fonctionnalités seront masquées si vous utilisez un compte SIP tiers.\n\nPour les activer dans un projet commercial, merci de nous contacter."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7677,12 +7677,12 @@
|
|||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Your communications are safe thanks to our <b>end-to-end encryption</b>."
|
||||
"value" : "Your communications are safe thanks to our **end-to-end encryption**."
|
||||
}
|
||||
},
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"state" : "needs_review",
|
||||
"value" : "Vos communications sont en sécurité grâce au **chiffrement de bout en bout**."
|
||||
}
|
||||
}
|
||||
|
|
@ -7709,12 +7709,12 @@
|
|||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "A <b>free</b> and open source application since <b>2001</b>."
|
||||
"value" : "A **free** and open source application since **2001**."
|
||||
}
|
||||
},
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"state" : "needs_review",
|
||||
"value" : "Une application open source et un **service gratuit** depuis **2001**."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,45 +45,98 @@ struct LoginFragment: View {
|
|||
NavigationView {
|
||||
ZStack {
|
||||
GeometryReader { geometry in
|
||||
if #available(iOS 16.4, *) {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
.scrollBounceBehavior(.basedOnSize)
|
||||
} else {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
}
|
||||
|
||||
if self.isShowPopup {
|
||||
let generalTerms = String(format: "[%@](%@)", String(localized: "assistant_dialog_general_terms_label"), "https://www.linphone.org/en/terms-of-use/")
|
||||
let privacyPolicy = String(format: "[%@](%@)", String(localized: "assistant_dialog_privacy_policy_label"), "https://linphone.org/en/privacy-policy")
|
||||
let splitMsg = String(localized: "assistant_dialog_general_terms_and_privacy_policy_message").components(separatedBy: "%@")
|
||||
if splitMsg.count == 3 { // We expect form of STRING %A STRING %@ STRING
|
||||
let contentPopup1 = Text(.init(splitMsg[0]))
|
||||
let contentPopup2 = Text(.init(generalTerms)).underline()
|
||||
let contentPopup3 = Text(.init(splitMsg[1]))
|
||||
let contentPopup4 = Text(.init(privacyPolicy)).underline()
|
||||
let contentPopup5 = Text(.init(splitMsg[2]))
|
||||
PopupView(isShowPopup: $isShowPopup,
|
||||
title: Text("assistant_dialog_general_terms_and_privacy_policy_title"),
|
||||
content: contentPopup1 + contentPopup2 + contentPopup3 + contentPopup4 + contentPopup5,
|
||||
titleFirstButton: Text("dialog_deny"),
|
||||
actionFirstButton: {self.isShowPopup.toggle()},
|
||||
titleSecondButton: Text("dialog_accept"),
|
||||
actionSecondButton: {acceptGeneralTerms()})
|
||||
.background(.black.opacity(0.65))
|
||||
.onTapGesture {
|
||||
self.isShowPopup.toggle()
|
||||
}
|
||||
} else { // backup just in case
|
||||
PopupView(isShowPopup: $isShowPopup,
|
||||
title: Text("assistant_dialog_general_terms_and_privacy_policy_title"),
|
||||
content: Text(.init(String(format: String(localized: "assistant_dialog_general_terms_and_privacy_policy_message"), generalTerms, privacyPolicy))),
|
||||
titleFirstButton: Text("dialog_deny"),
|
||||
actionFirstButton: {self.isShowPopup.toggle()},
|
||||
titleSecondButton: Text("dialog_accept"),
|
||||
actionSecondButton: {acceptGeneralTerms()})
|
||||
.background(.black.opacity(0.65))
|
||||
.onTapGesture {
|
||||
self.isShowPopup.toggle()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if coreContext.loggingInProgress {
|
||||
PopupLoadingView()
|
||||
.background(.black.opacity(0.65))
|
||||
}
|
||||
}
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
.edgesIgnoringSafeArea(.bottom)
|
||||
.edgesIgnoringSafeArea(.horizontal)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
}
|
||||
|
||||
func innerScrollView(geometry: GeometryProxy) -> some View {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
if isShowBack {
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
if isShowBack {
|
||||
Image("caret-left")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.frame(width: 25, height: 25)
|
||||
.padding(.all, 10)
|
||||
.padding(.top, -75)
|
||||
.padding(.leading, -10)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
onBackPressed?()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Color.clear
|
||||
.frame(width: 25, height: 25)
|
||||
.padding(.all, 10)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
}
|
||||
.frame(width: geometry.size.width)
|
||||
}
|
||||
|
||||
Text("assistant_account_login")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 20)
|
||||
.default_text_style_800(styleSize: 20)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
.frame(width: geometry.size.width)
|
||||
.padding(.top, 10)
|
||||
.padding(.bottom, 20)
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
Text(String(localized: "username")+"*")
|
||||
|
|
@ -247,6 +300,9 @@ struct LoginFragment: View {
|
|||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal, 20)
|
||||
|
||||
Spacer()
|
||||
|
||||
|
|
@ -285,61 +341,16 @@ struct LoginFragment: View {
|
|||
Spacer()
|
||||
}
|
||||
.padding(.bottom)
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal, 20)
|
||||
|
||||
Image("mountain2")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 60)
|
||||
.clipped()
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
|
||||
if self.isShowPopup {
|
||||
let generalTerms = String(format: "[%@](%@)", String(localized: "assistant_dialog_general_terms_label"), "https://www.linphone.org/en/terms-of-use/")
|
||||
let privacyPolicy = String(format: "[%@](%@)", String(localized: "assistant_dialog_privacy_policy_label"), "https://linphone.org/en/privacy-policy")
|
||||
let splitMsg = String(localized: "assistant_dialog_general_terms_and_privacy_policy_message").components(separatedBy: "%@")
|
||||
if splitMsg.count == 3 { // We expect form of STRING %A STRING %@ STRING
|
||||
let contentPopup1 = Text(.init(splitMsg[0]))
|
||||
let contentPopup2 = Text(.init(generalTerms)).underline()
|
||||
let contentPopup3 = Text(.init(splitMsg[1]))
|
||||
let contentPopup4 = Text(.init(privacyPolicy)).underline()
|
||||
let contentPopup5 = Text(.init(splitMsg[2]))
|
||||
PopupView(isShowPopup: $isShowPopup,
|
||||
title: Text("assistant_dialog_general_terms_and_privacy_policy_title"),
|
||||
content: contentPopup1 + contentPopup2 + contentPopup3 + contentPopup4 + contentPopup5,
|
||||
titleFirstButton: Text("dialog_deny"),
|
||||
actionFirstButton: {self.isShowPopup.toggle()},
|
||||
titleSecondButton: Text("dialog_accept"),
|
||||
actionSecondButton: {acceptGeneralTerms()})
|
||||
.background(.black.opacity(0.65))
|
||||
.onTapGesture {
|
||||
self.isShowPopup.toggle()
|
||||
}
|
||||
} else { // backup just in case
|
||||
PopupView(isShowPopup: $isShowPopup,
|
||||
title: Text("assistant_dialog_general_terms_and_privacy_policy_title"),
|
||||
content: Text(.init(String(format: String(localized: "assistant_dialog_general_terms_and_privacy_policy_message"), generalTerms, privacyPolicy))),
|
||||
titleFirstButton: Text("dialog_deny"),
|
||||
actionFirstButton: {self.isShowPopup.toggle()},
|
||||
titleSecondButton: Text("dialog_accept"),
|
||||
actionSecondButton: {acceptGeneralTerms()})
|
||||
.background(.black.opacity(0.65))
|
||||
.onTapGesture {
|
||||
self.isShowPopup.toggle()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if coreContext.loggingInProgress {
|
||||
PopupLoadingView()
|
||||
.background(.black.opacity(0.65))
|
||||
}
|
||||
}
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
}
|
||||
|
||||
func acceptGeneralTerms() {
|
||||
sharedMainViewModel.changeGeneralTerms()
|
||||
self.isShowPopup.toggle()
|
||||
|
|
|
|||
|
|
@ -29,43 +29,54 @@ struct PermissionsFragment: View {
|
|||
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
if #available(iOS 16.4, *) {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
.scrollBounceBehavior(.basedOnSize)
|
||||
} else {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationBarHidden(true)
|
||||
.edgesIgnoringSafeArea(.bottom)
|
||||
.edgesIgnoringSafeArea(.horizontal)
|
||||
.onReceive(permissionManager.$allPermissionsHaveBeenDisplayed, perform: { (granted) in
|
||||
if granted {
|
||||
withAnimation {
|
||||
sharedMainViewModel.changeWelcomeView()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func innerScrollView(geometry: GeometryProxy) -> some View {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Image("caret-left")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.frame(width: 25, height: 25)
|
||||
.padding(.all, 10)
|
||||
.padding(.top, -75)
|
||||
.padding(.leading, -10)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
}
|
||||
.frame(width: geometry.size.width)
|
||||
|
||||
Text("assistant_permissions_title")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 20)
|
||||
.default_text_style_800(styleSize: 20)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
.frame(width: geometry.size.width)
|
||||
.padding(.top, 10)
|
||||
.padding(.bottom, 20)
|
||||
|
||||
Text(String(format: String(localized: "assistant_permissions_subtitle"), Bundle.main.displayName))
|
||||
.default_text_style(styleSize: 15)
|
||||
|
|
@ -186,21 +197,16 @@ struct PermissionsFragment: View {
|
|||
.cornerRadius(60)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
||||
.padding(.bottom)
|
||||
|
||||
Image("mountain2")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 60)
|
||||
.clipped()
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationBarHidden(true)
|
||||
.onReceive(permissionManager.$allPermissionsHaveBeenDisplayed, perform: { (granted) in
|
||||
if granted {
|
||||
withAnimation {
|
||||
sharedMainViewModel.changeWelcomeView()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
|
|
|
|||
|
|
@ -41,43 +41,57 @@ struct RegisterCodeConfirmationFragment: View {
|
|||
NavigationView {
|
||||
GeometryReader { geometry in
|
||||
ZStack {
|
||||
if #available(iOS 16.4, *) {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
.scrollBounceBehavior(.basedOnSize)
|
||||
} else {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
}
|
||||
|
||||
if registerViewModel.createInProgress {
|
||||
PopupLoadingView()
|
||||
.background(.black.opacity(0.65))
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
.edgesIgnoringSafeArea(.bottom)
|
||||
.edgesIgnoringSafeArea(.horizontal)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
|
||||
func innerScrollView(geometry: GeometryProxy) -> some View {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Image("caret-left")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.frame(width: 25, height: 25)
|
||||
.padding(.all, 10)
|
||||
.padding(.top, -75)
|
||||
.padding(.leading, -10)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
}
|
||||
.frame(width: geometry.size.width)
|
||||
|
||||
Text("assistant_account_register")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 20)
|
||||
.default_text_style_800(styleSize: 20)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
.frame(width: geometry.size.width)
|
||||
.padding(.top, 10)
|
||||
.padding(.bottom, 20)
|
||||
|
||||
ZStack {
|
||||
VStack {
|
||||
|
|
@ -152,6 +166,14 @@ struct RegisterCodeConfirmationFragment: View {
|
|||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Image("mountain2")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 60)
|
||||
.clipped()
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
.onAppear {
|
||||
|
|
@ -159,20 +181,6 @@ struct RegisterCodeConfirmationFragment: View {
|
|||
}
|
||||
}
|
||||
|
||||
if registerViewModel.createInProgress {
|
||||
PopupLoadingView()
|
||||
.background(.black.opacity(0.65))
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
|
||||
private func otpText(text: String, focused: Bool) -> some View {
|
||||
|
||||
return Text(text)
|
||||
|
|
|
|||
|
|
@ -39,43 +39,83 @@ struct RegisterFragment: View {
|
|||
NavigationView {
|
||||
GeometryReader { geometry in
|
||||
ZStack {
|
||||
if #available(iOS 16.4, *) {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
.scrollBounceBehavior(.basedOnSize)
|
||||
} else {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
}
|
||||
|
||||
if self.isShowPopup {
|
||||
let titlePopup = Text("assistant_dialog_confirm_phone_number_title")
|
||||
let contentPopup = Text("assistant_dialog_confirm_phone_number_message")
|
||||
|
||||
PopupView(
|
||||
isShowPopup: $isShowPopup,
|
||||
title: titlePopup,
|
||||
content: contentPopup,
|
||||
titleFirstButton: Text("dialog_cancel"),
|
||||
actionFirstButton: {
|
||||
self.isShowPopup = false
|
||||
},
|
||||
titleSecondButton: Text("dialog_continue"),
|
||||
actionSecondButton: {
|
||||
self.isShowPopup = false
|
||||
registerViewModel.createInProgress = true
|
||||
registerViewModel.startAccountCreation()
|
||||
registerViewModel.phoneNumberConfirmedByUser()
|
||||
}
|
||||
)
|
||||
.background(.black.opacity(0.65))
|
||||
.onTapGesture {
|
||||
self.isShowPopup = false
|
||||
}
|
||||
}
|
||||
|
||||
if registerViewModel.createInProgress {
|
||||
PopupLoadingView()
|
||||
.background(.black.opacity(0.65))
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
.edgesIgnoringSafeArea(.bottom)
|
||||
.edgesIgnoringSafeArea(.horizontal)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
|
||||
func innerScrollView(geometry: GeometryProxy) -> some View {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Image("caret-left")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.frame(width: 25, height: 25)
|
||||
.padding(.all, 10)
|
||||
.padding(.top, -75)
|
||||
.padding(.leading, -10)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
}
|
||||
.frame(width: geometry.size.width)
|
||||
|
||||
Text("assistant_account_register")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 20)
|
||||
.default_text_style_800(styleSize: 20)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
.frame(width: geometry.size.width)
|
||||
.padding(.top, 10)
|
||||
.padding(.bottom, 20)
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
Text(String(localized: "username")+"*")
|
||||
|
|
@ -266,6 +306,9 @@ struct RegisterFragment: View {
|
|||
)
|
||||
.padding(.bottom)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal, 20)
|
||||
|
||||
Spacer()
|
||||
|
||||
|
|
@ -294,52 +337,15 @@ struct RegisterFragment: View {
|
|||
Spacer()
|
||||
}
|
||||
.padding(.bottom)
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal, 20)
|
||||
|
||||
Image("mountain2")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 60)
|
||||
.clipped()
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
|
||||
if self.isShowPopup {
|
||||
let titlePopup = Text("assistant_dialog_confirm_phone_number_title")
|
||||
let contentPopup = Text("assistant_dialog_confirm_phone_number_message")
|
||||
|
||||
PopupView(
|
||||
isShowPopup: $isShowPopup,
|
||||
title: titlePopup,
|
||||
content: contentPopup,
|
||||
titleFirstButton: Text("dialog_cancel"),
|
||||
actionFirstButton: {
|
||||
self.isShowPopup = false
|
||||
},
|
||||
titleSecondButton: Text("dialog_continue"),
|
||||
actionSecondButton: {
|
||||
self.isShowPopup = false
|
||||
registerViewModel.createInProgress = true
|
||||
registerViewModel.startAccountCreation()
|
||||
registerViewModel.phoneNumberConfirmedByUser()
|
||||
}
|
||||
)
|
||||
.background(.black.opacity(0.65))
|
||||
.onTapGesture {
|
||||
self.isShowPopup = false
|
||||
}
|
||||
}
|
||||
|
||||
if registerViewModel.createInProgress {
|
||||
PopupLoadingView()
|
||||
.background(.black.opacity(0.65))
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
|
|
|
|||
|
|
@ -36,25 +36,33 @@ struct ThirdPartySipAccountLoginFragment: View {
|
|||
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
if #available(iOS 16.4, *) {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
.scrollBounceBehavior(.basedOnSize)
|
||||
} else {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
.edgesIgnoringSafeArea(.bottom)
|
||||
.edgesIgnoringSafeArea(.horizontal)
|
||||
}
|
||||
|
||||
func innerScrollView(geometry: GeometryProxy) -> some View {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Image("caret-left")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.frame(width: 25, height: 25)
|
||||
.padding(.all, 10)
|
||||
.padding(.top, -75)
|
||||
.padding(.leading, -10)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
accountLoginViewModel.domain = "sip.linphone.org"
|
||||
|
|
@ -62,19 +70,15 @@ struct ThirdPartySipAccountLoginFragment: View {
|
|||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
}
|
||||
.frame(width: geometry.size.width)
|
||||
|
||||
Text("assistant_login_third_party_sip_account")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 20)
|
||||
.default_text_style_800(styleSize: 20)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
.frame(width: geometry.size.width)
|
||||
.padding(.top, 10)
|
||||
.padding(.bottom, 20)
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
Text(String(localized: "username")+"*")
|
||||
|
|
@ -209,6 +213,9 @@ struct ThirdPartySipAccountLoginFragment: View {
|
|||
.stroke(Color.gray200, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom)
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal, 20)
|
||||
|
||||
Spacer()
|
||||
|
||||
|
|
@ -228,16 +235,18 @@ struct ThirdPartySipAccountLoginFragment: View {
|
|||
: Color.orangeMain500)
|
||||
.cornerRadius(60)
|
||||
.disabled(accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty || accountLoginViewModel.domain.isEmpty)
|
||||
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom)
|
||||
|
||||
Image("mountain2")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 60)
|
||||
.clipped()
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
}
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
|
|
|
|||
|
|
@ -30,43 +30,51 @@ struct ThirdPartySipAccountWarningFragment: View {
|
|||
var body: some View {
|
||||
NavigationView {
|
||||
GeometryReader { geometry in
|
||||
if #available(iOS 16.4, *) {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
.scrollBounceBehavior(.basedOnSize)
|
||||
} else {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
.edgesIgnoringSafeArea(.bottom)
|
||||
.edgesIgnoringSafeArea(.horizontal)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
|
||||
func innerScrollView(geometry: GeometryProxy) -> some View {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Image("caret-left")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.frame(width: 25, height: 25)
|
||||
.padding(.all, 10)
|
||||
.padding(.top, -75)
|
||||
.padding(.leading, -10)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
}
|
||||
.frame(width: geometry.size.width)
|
||||
|
||||
Text("assistant_login_third_party_sip_account")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 20)
|
||||
.default_text_style_800(styleSize: 20)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
.frame(width: geometry.size.width)
|
||||
.padding(.top, 10)
|
||||
.padding(.bottom, 20)
|
||||
|
||||
Spacer()
|
||||
|
||||
|
|
@ -78,9 +86,9 @@ struct ThirdPartySipAccountWarningFragment: View {
|
|||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20, alignment: .leading)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
}
|
||||
.padding(16)
|
||||
.padding(20)
|
||||
.background(Color.grayMain2c200)
|
||||
.cornerRadius(40)
|
||||
.padding(.horizontal)
|
||||
|
|
@ -90,9 +98,9 @@ struct ThirdPartySipAccountWarningFragment: View {
|
|||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20, alignment: .leading)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
}
|
||||
.padding(16)
|
||||
.padding(20)
|
||||
.background(Color.grayMain2c200)
|
||||
.cornerRadius(40)
|
||||
.padding(.horizontal)
|
||||
|
|
@ -166,18 +174,16 @@ struct ThirdPartySipAccountWarningFragment: View {
|
|||
.cornerRadius(60)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
||||
.padding(.bottom)
|
||||
|
||||
Image("mountain2")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 60)
|
||||
.clipped()
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
}
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class SharedMainViewModel: ObservableObject {
|
|||
let displayProfileModeKey = "display_profile_mode"
|
||||
let defaultAvatarKey = "default_avatar"
|
||||
|
||||
var maxWidth = 400.0
|
||||
var maxWidth = 600.0
|
||||
|
||||
private init() {
|
||||
let preferences = UserDefaults.standard
|
||||
|
|
|
|||
|
|
@ -39,7 +39,9 @@ struct WelcomePage1Fragment: View {
|
|||
.multilineTextAlignment(.center)
|
||||
|
||||
}
|
||||
Spacer()
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, 60)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,9 @@ struct WelcomePage2Fragment: View {
|
|||
.multilineTextAlignment(.center)
|
||||
|
||||
}
|
||||
Spacer()
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, 60)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,9 @@ struct WelcomePage3Fragment: View {
|
|||
.multilineTextAlignment(.center)
|
||||
|
||||
}
|
||||
Spacer()
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, 60)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
|
|
|
|||
|
|
@ -28,15 +28,28 @@ struct WelcomeView: View {
|
|||
var body: some View {
|
||||
NavigationView {
|
||||
GeometryReader { geometry in
|
||||
ScrollView {
|
||||
if #available(iOS 16.4, *) {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
.scrollBounceBehavior(.basedOnSize)
|
||||
} else {
|
||||
ScrollView(.vertical) {
|
||||
innerScrollView(geometry: geometry)
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
.edgesIgnoringSafeArea(.bottom)
|
||||
.edgesIgnoringSafeArea(.horizontal)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
}
|
||||
|
||||
func innerScrollView(geometry: GeometryProxy) -> some View {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .trailing) {
|
||||
NavigationLink(destination: {
|
||||
PermissionsFragment()
|
||||
|
|
@ -54,12 +67,12 @@ struct WelcomeView: View {
|
|||
}
|
||||
)
|
||||
Text("welcome_page_title")
|
||||
.welcome_text_style_white_800(styleSize: 35)
|
||||
.default_text_style_800(styleSize: 35)
|
||||
.padding(.trailing, 100)
|
||||
.frame(width: geometry.size.width)
|
||||
.padding(.bottom, -25)
|
||||
Text(String(format: String(localized: "welcome_page_subtitle"), Bundle.main.displayName))
|
||||
.welcome_text_style_white_800(styleSize: 25)
|
||||
.default_text_style_800(styleSize: 25)
|
||||
.padding(.leading, 100)
|
||||
.frame(width: geometry.size.width)
|
||||
.padding(.bottom, -10)
|
||||
|
|
@ -130,15 +143,15 @@ struct WelcomeView: View {
|
|||
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
}
|
||||
|
||||
Image("mountain2")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 60)
|
||||
.clipped()
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
}
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
}
|
||||
|
||||
func setupAppearance() {
|
||||
UIPageControl.appearance().currentPageIndicatorTintColor = UIColor(Color.orangeMain500)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue