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" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"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" : {
|
"fr" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"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" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"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" : {
|
"fr" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"state" : "needs_review",
|
||||||
"value" : "Vos communications sont en sécurité grâce au **chiffrement de bout en bout**."
|
"value" : "Vos communications sont en sécurité grâce au **chiffrement de bout en bout**."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7709,12 +7709,12 @@
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"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" : {
|
"fr" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"state" : "needs_review",
|
||||||
"value" : "Une application open source et un **service gratuit** depuis **2001**."
|
"value" : "Une application open source et un **service gratuit** depuis **2001**."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,45 +45,98 @@ struct LoginFragment: View {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
ZStack {
|
ZStack {
|
||||||
GeometryReader { geometry in
|
GeometryReader { geometry in
|
||||||
|
if #available(iOS 16.4, *) {
|
||||||
ScrollView(.vertical) {
|
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 {
|
VStack {
|
||||||
ZStack {
|
ZStack {
|
||||||
Image("mountain")
|
|
||||||
.resizable()
|
|
||||||
.scaledToFill()
|
|
||||||
.frame(width: geometry.size.width, height: 100)
|
|
||||||
.clipped()
|
|
||||||
|
|
||||||
if isShowBack {
|
|
||||||
VStack(alignment: .leading) {
|
|
||||||
HStack {
|
HStack {
|
||||||
|
if isShowBack {
|
||||||
Image("caret-left")
|
Image("caret-left")
|
||||||
.renderingMode(.template)
|
.renderingMode(.template)
|
||||||
.resizable()
|
.resizable()
|
||||||
.foregroundStyle(Color.grayMain2c500)
|
.foregroundStyle(Color.grayMain2c500)
|
||||||
.frame(width: 25, height: 25, alignment: .leading)
|
.frame(width: 25, height: 25)
|
||||||
.padding(.all, 10)
|
.padding(.all, 10)
|
||||||
.padding(.top, -75)
|
|
||||||
.padding(.leading, -10)
|
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
onBackPressed?()
|
onBackPressed?()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Color.clear
|
||||||
|
.frame(width: 25, height: 25)
|
||||||
|
.padding(.all, 10)
|
||||||
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.leading)
|
|
||||||
}
|
|
||||||
.frame(width: geometry.size.width)
|
|
||||||
}
|
|
||||||
|
|
||||||
Text("assistant_account_login")
|
Text("assistant_account_login")
|
||||||
.default_text_style_white_800(styleSize: 20)
|
.default_text_style_800(styleSize: 20)
|
||||||
.padding(.top, 20)
|
|
||||||
}
|
}
|
||||||
.padding(.top, 35)
|
.frame(width: geometry.size.width)
|
||||||
.padding(.bottom, 10)
|
.padding(.top, 10)
|
||||||
|
.padding(.bottom, 20)
|
||||||
|
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text(String(localized: "username")+"*")
|
Text(String(localized: "username")+"*")
|
||||||
|
|
@ -247,6 +300,9 @@ struct LoginFragment: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||||
|
.padding(.horizontal, 20)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
|
|
@ -285,61 +341,16 @@ struct LoginFragment: View {
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.bottom)
|
.padding(.bottom)
|
||||||
}
|
|
||||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
Image("mountain2")
|
||||||
.padding(.horizontal, 20)
|
.resizable()
|
||||||
|
.scaledToFill()
|
||||||
|
.frame(width: geometry.size.width, height: 60)
|
||||||
|
.clipped()
|
||||||
}
|
}
|
||||||
.frame(minHeight: geometry.size.height)
|
.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() {
|
func acceptGeneralTerms() {
|
||||||
sharedMainViewModel.changeGeneralTerms()
|
sharedMainViewModel.changeGeneralTerms()
|
||||||
self.isShowPopup.toggle()
|
self.isShowPopup.toggle()
|
||||||
|
|
|
||||||
|
|
@ -29,43 +29,54 @@ struct PermissionsFragment: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
GeometryReader { geometry in
|
GeometryReader { geometry in
|
||||||
|
if #available(iOS 16.4, *) {
|
||||||
ScrollView(.vertical) {
|
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 {
|
VStack {
|
||||||
ZStack {
|
ZStack {
|
||||||
Image("mountain")
|
|
||||||
.resizable()
|
|
||||||
.scaledToFill()
|
|
||||||
.frame(width: geometry.size.width, height: 100)
|
|
||||||
.clipped()
|
|
||||||
|
|
||||||
VStack(alignment: .leading) {
|
|
||||||
HStack {
|
HStack {
|
||||||
Image("caret-left")
|
Image("caret-left")
|
||||||
.renderingMode(.template)
|
.renderingMode(.template)
|
||||||
.resizable()
|
.resizable()
|
||||||
.foregroundStyle(Color.grayMain2c500)
|
.foregroundStyle(Color.grayMain2c500)
|
||||||
.frame(width: 25, height: 25, alignment: .leading)
|
.frame(width: 25, height: 25)
|
||||||
.padding(.all, 10)
|
.padding(.all, 10)
|
||||||
.padding(.top, -75)
|
|
||||||
.padding(.leading, -10)
|
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.leading)
|
|
||||||
}
|
|
||||||
.frame(width: geometry.size.width)
|
|
||||||
|
|
||||||
Text("assistant_permissions_title")
|
Text("assistant_permissions_title")
|
||||||
.default_text_style_white_800(styleSize: 20)
|
.default_text_style_800(styleSize: 20)
|
||||||
.padding(.top, 20)
|
|
||||||
}
|
}
|
||||||
.padding(.top, 35)
|
.frame(width: geometry.size.width)
|
||||||
.padding(.bottom, 10)
|
.padding(.top, 10)
|
||||||
|
.padding(.bottom, 20)
|
||||||
|
|
||||||
Text(String(format: String(localized: "assistant_permissions_subtitle"), Bundle.main.displayName))
|
Text(String(format: String(localized: "assistant_permissions_subtitle"), Bundle.main.displayName))
|
||||||
.default_text_style(styleSize: 15)
|
.default_text_style(styleSize: 15)
|
||||||
|
|
@ -186,21 +197,16 @@ struct PermissionsFragment: View {
|
||||||
.cornerRadius(60)
|
.cornerRadius(60)
|
||||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||||
.padding(.horizontal)
|
.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)
|
.frame(minHeight: geometry.size.height)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.navigationViewStyle(StackNavigationViewStyle())
|
|
||||||
.navigationBarHidden(true)
|
|
||||||
.onReceive(permissionManager.$allPermissionsHaveBeenDisplayed, perform: { (granted) in
|
|
||||||
if granted {
|
|
||||||
withAnimation {
|
|
||||||
sharedMainViewModel.changeWelcomeView()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#Preview {
|
#Preview {
|
||||||
|
|
|
||||||
|
|
@ -41,43 +41,57 @@ struct RegisterCodeConfirmationFragment: View {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
GeometryReader { geometry in
|
GeometryReader { geometry in
|
||||||
ZStack {
|
ZStack {
|
||||||
|
if #available(iOS 16.4, *) {
|
||||||
ScrollView(.vertical) {
|
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 {
|
VStack {
|
||||||
ZStack {
|
ZStack {
|
||||||
Image("mountain")
|
|
||||||
.resizable()
|
|
||||||
.scaledToFill()
|
|
||||||
.frame(width: geometry.size.width, height: 100)
|
|
||||||
.clipped()
|
|
||||||
|
|
||||||
VStack(alignment: .leading) {
|
|
||||||
HStack {
|
HStack {
|
||||||
Image("caret-left")
|
Image("caret-left")
|
||||||
.renderingMode(.template)
|
.renderingMode(.template)
|
||||||
.resizable()
|
.resizable()
|
||||||
.foregroundStyle(Color.grayMain2c500)
|
.foregroundStyle(Color.grayMain2c500)
|
||||||
.frame(width: 25, height: 25, alignment: .leading)
|
.frame(width: 25, height: 25)
|
||||||
.padding(.all, 10)
|
.padding(.all, 10)
|
||||||
.padding(.top, -75)
|
|
||||||
.padding(.leading, -10)
|
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.leading)
|
|
||||||
}
|
|
||||||
.frame(width: geometry.size.width)
|
|
||||||
|
|
||||||
Text("assistant_account_register")
|
Text("assistant_account_register")
|
||||||
.default_text_style_white_800(styleSize: 20)
|
.default_text_style_800(styleSize: 20)
|
||||||
.padding(.top, 20)
|
|
||||||
}
|
}
|
||||||
.padding(.top, 35)
|
.frame(width: geometry.size.width)
|
||||||
.padding(.bottom, 10)
|
.padding(.top, 10)
|
||||||
|
.padding(.bottom, 20)
|
||||||
|
|
||||||
ZStack {
|
ZStack {
|
||||||
VStack {
|
VStack {
|
||||||
|
|
@ -152,6 +166,14 @@ struct RegisterCodeConfirmationFragment: View {
|
||||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||||
.padding(.horizontal, 20)
|
.padding(.horizontal, 20)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
Image("mountain2")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFill()
|
||||||
|
.frame(width: geometry.size.width, height: 60)
|
||||||
|
.clipped()
|
||||||
}
|
}
|
||||||
.frame(minHeight: geometry.size.height)
|
.frame(minHeight: geometry.size.height)
|
||||||
.onAppear {
|
.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 {
|
private func otpText(text: String, focused: Bool) -> some View {
|
||||||
|
|
||||||
return Text(text)
|
return Text(text)
|
||||||
|
|
|
||||||
|
|
@ -39,43 +39,83 @@ struct RegisterFragment: View {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
GeometryReader { geometry in
|
GeometryReader { geometry in
|
||||||
ZStack {
|
ZStack {
|
||||||
|
if #available(iOS 16.4, *) {
|
||||||
ScrollView(.vertical) {
|
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 {
|
VStack {
|
||||||
ZStack {
|
ZStack {
|
||||||
Image("mountain")
|
|
||||||
.resizable()
|
|
||||||
.scaledToFill()
|
|
||||||
.frame(width: geometry.size.width, height: 100)
|
|
||||||
.clipped()
|
|
||||||
|
|
||||||
VStack(alignment: .leading) {
|
|
||||||
HStack {
|
HStack {
|
||||||
Image("caret-left")
|
Image("caret-left")
|
||||||
.renderingMode(.template)
|
.renderingMode(.template)
|
||||||
.resizable()
|
.resizable()
|
||||||
.foregroundStyle(Color.grayMain2c500)
|
.foregroundStyle(Color.grayMain2c500)
|
||||||
.frame(width: 25, height: 25, alignment: .leading)
|
.frame(width: 25, height: 25)
|
||||||
.padding(.all, 10)
|
.padding(.all, 10)
|
||||||
.padding(.top, -75)
|
|
||||||
.padding(.leading, -10)
|
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.leading)
|
|
||||||
}
|
|
||||||
.frame(width: geometry.size.width)
|
|
||||||
|
|
||||||
Text("assistant_account_register")
|
Text("assistant_account_register")
|
||||||
.default_text_style_white_800(styleSize: 20)
|
.default_text_style_800(styleSize: 20)
|
||||||
.padding(.top, 20)
|
|
||||||
}
|
}
|
||||||
.padding(.top, 35)
|
.frame(width: geometry.size.width)
|
||||||
.padding(.bottom, 10)
|
.padding(.top, 10)
|
||||||
|
.padding(.bottom, 20)
|
||||||
|
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text(String(localized: "username")+"*")
|
Text(String(localized: "username")+"*")
|
||||||
|
|
@ -266,6 +306,9 @@ struct RegisterFragment: View {
|
||||||
)
|
)
|
||||||
.padding(.bottom)
|
.padding(.bottom)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
|
}
|
||||||
|
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||||
|
.padding(.horizontal, 20)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
|
|
@ -294,52 +337,15 @@ struct RegisterFragment: View {
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.bottom)
|
.padding(.bottom)
|
||||||
}
|
|
||||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
Image("mountain2")
|
||||||
.padding(.horizontal, 20)
|
.resizable()
|
||||||
|
.scaledToFill()
|
||||||
|
.frame(width: geometry.size.width, height: 60)
|
||||||
|
.clipped()
|
||||||
}
|
}
|
||||||
.frame(minHeight: geometry.size.height)
|
.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 {
|
#Preview {
|
||||||
|
|
|
||||||
|
|
@ -36,25 +36,33 @@ struct ThirdPartySipAccountLoginFragment: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
GeometryReader { geometry in
|
GeometryReader { geometry in
|
||||||
|
if #available(iOS 16.4, *) {
|
||||||
ScrollView(.vertical) {
|
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 {
|
VStack {
|
||||||
ZStack {
|
ZStack {
|
||||||
Image("mountain")
|
|
||||||
.resizable()
|
|
||||||
.scaledToFill()
|
|
||||||
.frame(width: geometry.size.width, height: 100)
|
|
||||||
.clipped()
|
|
||||||
|
|
||||||
VStack(alignment: .leading) {
|
|
||||||
HStack {
|
HStack {
|
||||||
Image("caret-left")
|
Image("caret-left")
|
||||||
.renderingMode(.template)
|
.renderingMode(.template)
|
||||||
.resizable()
|
.resizable()
|
||||||
.foregroundStyle(Color.grayMain2c500)
|
.foregroundStyle(Color.grayMain2c500)
|
||||||
.frame(width: 25, height: 25, alignment: .leading)
|
.frame(width: 25, height: 25)
|
||||||
.padding(.all, 10)
|
.padding(.all, 10)
|
||||||
.padding(.top, -75)
|
|
||||||
.padding(.leading, -10)
|
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
accountLoginViewModel.domain = "sip.linphone.org"
|
accountLoginViewModel.domain = "sip.linphone.org"
|
||||||
|
|
@ -62,19 +70,15 @@ struct ThirdPartySipAccountLoginFragment: View {
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.leading)
|
|
||||||
}
|
|
||||||
.frame(width: geometry.size.width)
|
|
||||||
|
|
||||||
Text("assistant_login_third_party_sip_account")
|
Text("assistant_login_third_party_sip_account")
|
||||||
.default_text_style_white_800(styleSize: 20)
|
.default_text_style_800(styleSize: 20)
|
||||||
.padding(.top, 20)
|
|
||||||
}
|
}
|
||||||
.padding(.top, 35)
|
.frame(width: geometry.size.width)
|
||||||
.padding(.bottom, 10)
|
.padding(.top, 10)
|
||||||
|
.padding(.bottom, 20)
|
||||||
|
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text(String(localized: "username")+"*")
|
Text(String(localized: "username")+"*")
|
||||||
|
|
@ -209,6 +213,9 @@ struct ThirdPartySipAccountLoginFragment: View {
|
||||||
.stroke(Color.gray200, lineWidth: 1)
|
.stroke(Color.gray200, lineWidth: 1)
|
||||||
)
|
)
|
||||||
.padding(.bottom)
|
.padding(.bottom)
|
||||||
|
}
|
||||||
|
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||||
|
.padding(.horizontal, 20)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
|
|
@ -228,16 +235,18 @@ struct ThirdPartySipAccountLoginFragment: View {
|
||||||
: Color.orangeMain500)
|
: Color.orangeMain500)
|
||||||
.cornerRadius(60)
|
.cornerRadius(60)
|
||||||
.disabled(accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty || accountLoginViewModel.domain.isEmpty)
|
.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)
|
.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)
|
.frame(minHeight: geometry.size.height)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.navigationBarHidden(true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#Preview {
|
#Preview {
|
||||||
|
|
|
||||||
|
|
@ -30,43 +30,51 @@ struct ThirdPartySipAccountWarningFragment: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
GeometryReader { geometry in
|
GeometryReader { geometry in
|
||||||
|
if #available(iOS 16.4, *) {
|
||||||
ScrollView(.vertical) {
|
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 {
|
VStack {
|
||||||
ZStack {
|
ZStack {
|
||||||
Image("mountain")
|
|
||||||
.resizable()
|
|
||||||
.scaledToFill()
|
|
||||||
.frame(width: geometry.size.width, height: 100)
|
|
||||||
.clipped()
|
|
||||||
|
|
||||||
VStack(alignment: .leading) {
|
|
||||||
HStack {
|
HStack {
|
||||||
Image("caret-left")
|
Image("caret-left")
|
||||||
.renderingMode(.template)
|
.renderingMode(.template)
|
||||||
.resizable()
|
.resizable()
|
||||||
.foregroundStyle(Color.grayMain2c500)
|
.foregroundStyle(Color.grayMain2c500)
|
||||||
.frame(width: 25, height: 25, alignment: .leading)
|
.frame(width: 25, height: 25)
|
||||||
.padding(.all, 10)
|
.padding(.all, 10)
|
||||||
.padding(.top, -75)
|
|
||||||
.padding(.leading, -10)
|
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.leading)
|
|
||||||
}
|
|
||||||
.frame(width: geometry.size.width)
|
|
||||||
|
|
||||||
Text("assistant_login_third_party_sip_account")
|
Text("assistant_login_third_party_sip_account")
|
||||||
.default_text_style_white_800(styleSize: 20)
|
.default_text_style_800(styleSize: 20)
|
||||||
.padding(.top, 20)
|
|
||||||
}
|
}
|
||||||
.padding(.top, 35)
|
.frame(width: geometry.size.width)
|
||||||
.padding(.bottom, 10)
|
.padding(.top, 10)
|
||||||
|
.padding(.bottom, 20)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
|
|
@ -78,9 +86,9 @@ struct ThirdPartySipAccountWarningFragment: View {
|
||||||
.renderingMode(.template)
|
.renderingMode(.template)
|
||||||
.resizable()
|
.resizable()
|
||||||
.foregroundStyle(Color.grayMain2c500)
|
.foregroundStyle(Color.grayMain2c500)
|
||||||
.frame(width: 20, height: 20, alignment: .leading)
|
.frame(width: 25, height: 25, alignment: .leading)
|
||||||
}
|
}
|
||||||
.padding(16)
|
.padding(20)
|
||||||
.background(Color.grayMain2c200)
|
.background(Color.grayMain2c200)
|
||||||
.cornerRadius(40)
|
.cornerRadius(40)
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
|
|
@ -90,9 +98,9 @@ struct ThirdPartySipAccountWarningFragment: View {
|
||||||
.renderingMode(.template)
|
.renderingMode(.template)
|
||||||
.resizable()
|
.resizable()
|
||||||
.foregroundStyle(Color.grayMain2c500)
|
.foregroundStyle(Color.grayMain2c500)
|
||||||
.frame(width: 20, height: 20, alignment: .leading)
|
.frame(width: 25, height: 25, alignment: .leading)
|
||||||
}
|
}
|
||||||
.padding(16)
|
.padding(20)
|
||||||
.background(Color.grayMain2c200)
|
.background(Color.grayMain2c200)
|
||||||
.cornerRadius(40)
|
.cornerRadius(40)
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
|
|
@ -166,18 +174,16 @@ struct ThirdPartySipAccountWarningFragment: View {
|
||||||
.cornerRadius(60)
|
.cornerRadius(60)
|
||||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||||
.padding(.horizontal)
|
.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)
|
.frame(minHeight: geometry.size.height)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.navigationTitle("")
|
|
||||||
.navigationBarHidden(true)
|
|
||||||
}
|
|
||||||
.navigationViewStyle(StackNavigationViewStyle())
|
|
||||||
.navigationTitle("")
|
|
||||||
.navigationBarHidden(true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#Preview {
|
#Preview {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class SharedMainViewModel: ObservableObject {
|
||||||
let displayProfileModeKey = "display_profile_mode"
|
let displayProfileModeKey = "display_profile_mode"
|
||||||
let defaultAvatarKey = "default_avatar"
|
let defaultAvatarKey = "default_avatar"
|
||||||
|
|
||||||
var maxWidth = 400.0
|
var maxWidth = 600.0
|
||||||
|
|
||||||
private init() {
|
private init() {
|
||||||
let preferences = UserDefaults.standard
|
let preferences = UserDefaults.standard
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,9 @@ struct WelcomePage1Fragment: View {
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
|
|
||||||
}
|
}
|
||||||
Spacer()
|
.padding(.horizontal)
|
||||||
|
.padding(.bottom, 60)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,9 @@ struct WelcomePage2Fragment: View {
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
|
|
||||||
}
|
}
|
||||||
Spacer()
|
.padding(.horizontal)
|
||||||
|
.padding(.bottom, 60)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,9 @@ struct WelcomePage3Fragment: View {
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
|
|
||||||
}
|
}
|
||||||
Spacer()
|
.padding(.horizontal)
|
||||||
|
.padding(.bottom, 60)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
|
|
|
||||||
|
|
@ -28,15 +28,28 @@ struct WelcomeView: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
GeometryReader { geometry in
|
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 {
|
VStack {
|
||||||
ZStack {
|
ZStack {
|
||||||
Image("mountain")
|
|
||||||
.resizable()
|
|
||||||
.scaledToFill()
|
|
||||||
.frame(width: geometry.size.width, height: 100)
|
|
||||||
.clipped()
|
|
||||||
|
|
||||||
VStack(alignment: .trailing) {
|
VStack(alignment: .trailing) {
|
||||||
NavigationLink(destination: {
|
NavigationLink(destination: {
|
||||||
PermissionsFragment()
|
PermissionsFragment()
|
||||||
|
|
@ -54,12 +67,12 @@ struct WelcomeView: View {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
Text("welcome_page_title")
|
Text("welcome_page_title")
|
||||||
.welcome_text_style_white_800(styleSize: 35)
|
.default_text_style_800(styleSize: 35)
|
||||||
.padding(.trailing, 100)
|
.padding(.trailing, 100)
|
||||||
.frame(width: geometry.size.width)
|
.frame(width: geometry.size.width)
|
||||||
.padding(.bottom, -25)
|
.padding(.bottom, -25)
|
||||||
Text(String(format: String(localized: "welcome_page_subtitle"), Bundle.main.displayName))
|
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)
|
.padding(.leading, 100)
|
||||||
.frame(width: geometry.size.width)
|
.frame(width: geometry.size.width)
|
||||||
.padding(.bottom, -10)
|
.padding(.bottom, -10)
|
||||||
|
|
@ -130,15 +143,15 @@ struct WelcomeView: View {
|
||||||
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
||||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Image("mountain2")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFill()
|
||||||
|
.frame(width: geometry.size.width, height: 60)
|
||||||
|
.clipped()
|
||||||
}
|
}
|
||||||
.frame(minHeight: geometry.size.height)
|
.frame(minHeight: geometry.size.height)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.navigationTitle("")
|
|
||||||
.navigationBarHidden(true)
|
|
||||||
}
|
|
||||||
.navigationViewStyle(StackNavigationViewStyle())
|
|
||||||
}
|
|
||||||
|
|
||||||
func setupAppearance() {
|
func setupAppearance() {
|
||||||
UIPageControl.appearance().currentPageIndicatorTintColor = UIColor(Color.orangeMain500)
|
UIPageControl.appearance().currentPageIndicatorTintColor = UIColor(Color.orangeMain500)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue