mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Add help view to login page
This commit is contained in:
parent
3c56f09130
commit
357418287c
2 changed files with 43 additions and 4 deletions
|
|
@ -37,6 +37,8 @@ struct LoginFragment: View {
|
|||
@State private var isLinkSIPActive = false
|
||||
@State private var isLinkREGActive = false
|
||||
|
||||
@State var isShowHelpFragment = false
|
||||
|
||||
var isShowBack = false
|
||||
|
||||
var onBackPressed: (() -> Void)?
|
||||
|
|
@ -93,6 +95,14 @@ struct LoginFragment: View {
|
|||
}
|
||||
}
|
||||
|
||||
if isShowHelpFragment {
|
||||
HelpFragment(
|
||||
isShowHelpFragment: $isShowHelpFragment
|
||||
)
|
||||
.transition(.move(edge: .trailing))
|
||||
.zIndex(3)
|
||||
}
|
||||
|
||||
if coreContext.loggingInProgress {
|
||||
PopupLoadingView()
|
||||
.background(.black.opacity(0.65))
|
||||
|
|
@ -129,6 +139,26 @@ struct LoginFragment: View {
|
|||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Button {
|
||||
withAnimation {
|
||||
isShowHelpFragment = true
|
||||
}
|
||||
} label: {
|
||||
HStack {
|
||||
Image("question")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20)
|
||||
|
||||
Text("help_title")
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.default_text_style_orange_600(styleSize: 15)
|
||||
.frame(height: 35)
|
||||
}
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
}
|
||||
|
||||
Text("assistant_account_login")
|
||||
|
|
|
|||
|
|
@ -29,14 +29,21 @@ struct HelpFragment: View {
|
|||
|
||||
@FocusState var isVoicemailUriFocused: Bool
|
||||
|
||||
var showAssistant: Bool {
|
||||
(CoreContext.shared.coreIsStarted && CoreContext.shared.accounts.isEmpty)
|
||||
|| SharedMainViewModel.shared.displayProfileMode
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
ZStack {
|
||||
VStack(spacing: 1) {
|
||||
Rectangle()
|
||||
.foregroundColor(Color.orangeMain500)
|
||||
.edgesIgnoringSafeArea(.top)
|
||||
.frame(height: 0)
|
||||
if !showAssistant {
|
||||
Rectangle()
|
||||
.foregroundColor(Color.orangeMain500)
|
||||
.edgesIgnoringSafeArea(.top)
|
||||
.frame(height: 0)
|
||||
}
|
||||
|
||||
HStack {
|
||||
Image("caret-left")
|
||||
|
|
@ -302,5 +309,7 @@ struct HelpFragment: View {
|
|||
.navigationBarHidden(true)
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationTitle("")
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue