mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Merge branch 'develop' into aleksandrs/6801_unverified_sessions_screen
This commit is contained in:
+33
-7
@@ -36,7 +36,9 @@ struct UserSessionsOverview: View {
|
||||
.background(theme.colors.system.ignoresSafeArea())
|
||||
.frame(maxHeight: .infinity)
|
||||
.navigationTitle(VectorL10n.userSessionsOverviewTitle)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.activityIndicator(show: viewModel.viewState.showLoadingIndicator)
|
||||
.accentColor(theme.colors.accent)
|
||||
.onAppear {
|
||||
viewModel.send(viewAction: .viewAppeared)
|
||||
}
|
||||
@@ -91,18 +93,42 @@ struct UserSessionsOverview: View {
|
||||
viewModel.send(viewAction: .viewCurrentSessionDetails)
|
||||
})
|
||||
} header: {
|
||||
Text(VectorL10n.userSessionsOverviewCurrentSessionSectionTitle)
|
||||
.textCase(.uppercase)
|
||||
.font(theme.fonts.footnote)
|
||||
.foregroundColor(theme.colors.secondaryContent)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.bottom, 12.0)
|
||||
.padding(.top, 24.0)
|
||||
HStack(alignment: .firstTextBaseline) {
|
||||
Text(VectorL10n.userSessionsOverviewCurrentSessionSectionTitle)
|
||||
.textCase(.uppercase)
|
||||
.font(theme.fonts.footnote)
|
||||
.foregroundColor(theme.colors.secondaryContent)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.bottom, 12.0)
|
||||
.padding(.top, 24.0)
|
||||
|
||||
currentSessionMenu
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
}
|
||||
|
||||
private var currentSessionMenu: some View {
|
||||
Menu {
|
||||
Button { viewModel.send(viewAction: .renameCurrentSession) } label: {
|
||||
Label(VectorL10n.manageSessionRename, systemImage: "pencil")
|
||||
}
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
Button(role: .destructive) { viewModel.send(viewAction: .logoutOfCurrentSession) } label: {
|
||||
Label(VectorL10n.signOut, systemImage: "rectangle.portrait.and.arrow.right.fill")
|
||||
}
|
||||
} else {
|
||||
Button { viewModel.send(viewAction: .logoutOfCurrentSession) } label: {
|
||||
Label(VectorL10n.signOut, systemImage: "rectangle.righthalf.inset.fill.arrow.right")
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
Image(systemName: "ellipsis.circle")
|
||||
}
|
||||
}
|
||||
|
||||
private var otherSessionsSection: some View {
|
||||
SwiftUI.Section {
|
||||
LazyVStack(spacing: 0) {
|
||||
|
||||
Reference in New Issue
Block a user