Add help view to login page

This commit is contained in:
Benoit Martins 2025-09-04 15:00:52 +02:00
parent f79506590f
commit 25d960c8a8
2 changed files with 43 additions and 4 deletions

View file

@ -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")

View file

@ -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)
}
}