Hide sign out x/all buttons in the Device Manager when using OIDC. (#7674)

This commit is contained in:
Doug
2023-09-12 13:46:36 +01:00
committed by GitHub
parent d5fd359f0c
commit a7c8905b10
15 changed files with 72 additions and 29 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: {
@@ -149,10 +149,12 @@ struct UserSessionsOverview: View {
Label(showLocationInfo: viewModel.viewState.showLocationInfo)
}
DestructiveButton {
viewModel.send(viewAction: .logoutOtherSessions)
} label: {
Label(VectorL10n.userOtherSessionMenuSignOutSessions(String(viewModel.viewState.otherSessionsViewData.count)), systemImage: "rectangle.portrait.and.arrow.forward.fill")
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