Merged element 1.11.3 into bum

This commit is contained in:
Arnfried Griesert
2023-09-29 05:24:53 +02:00
36 changed files with 452 additions and 180 deletions
@@ -125,7 +125,7 @@ struct UserSessionsOverview: View {
Label(VectorL10n.signOut, systemImage: "rectangle.portrait.and.arrow.right.fill")
}
}
if viewModel.viewState.otherSessionsViewData.count > 0 {
if viewModel.viewState.otherSessionsViewData.count > 0, viewModel.viewState.showDeviceLogout {
DestructiveButton {
viewModel.send(viewAction: .logoutOtherSessions)
} label: {
@@ -141,19 +141,20 @@ struct UserSessionsOverview: View {
private var otherSessionsMenu: some View {
Menu {
if BWIBuildSettings.shared.deviceManagerShowIPAddress {
Button {
withAnimation {
viewModel.send(viewAction: .showLocationInfo)
}
} label: {
Label(showLocationInfo: viewModel.viewState.showLocationInfo)
Button {
withAnimation {
viewModel.send(viewAction: .showLocationInfo)
}
}
DestructiveButton {
viewModel.send(viewAction: .logoutOtherSessions)
} label: {
Label(VectorL10n.userOtherSessionMenuSignOutSessions(String(viewModel.viewState.otherSessionsViewData.count)), systemImage: "rectangle.portrait.and.arrow.forward.fill")
Label(showLocationInfo: viewModel.viewState.showLocationInfo)
}
if viewModel.viewState.showDeviceLogout {
DestructiveButton {
viewModel.send(viewAction: .logoutOtherSessions)
} label: {
Label(VectorL10n.userOtherSessionMenuSignOutSessions(String(viewModel.viewState.otherSessionsViewData.count)), systemImage: "rectangle.portrait.and.arrow.forward.fill")
}
}
} label: {
menuImage