diff --git a/Linphone/UI/Assistant/Fragments/LoginFragment.swift b/Linphone/UI/Assistant/Fragments/LoginFragment.swift index c494099cb..b8e063153 100644 --- a/Linphone/UI/Assistant/Fragments/LoginFragment.swift +++ b/Linphone/UI/Assistant/Fragments/LoginFragment.swift @@ -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") diff --git a/Linphone/UI/Main/Help/Fragments/HelpFragment.swift b/Linphone/UI/Main/Help/Fragments/HelpFragment.swift index e93324f50..a50ad77d8 100644 --- a/Linphone/UI/Main/Help/Fragments/HelpFragment.swift +++ b/Linphone/UI/Main/Help/Fragments/HelpFragment.swift @@ -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) } }