fixed user logout sessions with context menu
This commit is contained in:
parent
04178d39ae
commit
9b91118486
@ -35,7 +35,7 @@ import ModalDialogContainer from "../ModalDialogContainer";
|
||||
|
||||
const LogoutAllSessionDialog = ({
|
||||
t,
|
||||
connections,
|
||||
selection,
|
||||
displayName,
|
||||
visible,
|
||||
isLoading,
|
||||
@ -55,7 +55,7 @@ const LogoutAllSessionDialog = ({
|
||||
};
|
||||
|
||||
const onClickLogout = () => {
|
||||
const exceptId = connections[0]?.id;
|
||||
const exceptId = selection[0]?.connections[0]?.id;
|
||||
if (!isChecked) {
|
||||
onLogoutAllSessions(t);
|
||||
onClose();
|
||||
|
@ -80,9 +80,9 @@ const Sessions = ({
|
||||
displayName,
|
||||
clearSelection,
|
||||
setDataFromSocket,
|
||||
connections,
|
||||
updateAllSessions,
|
||||
platformData,
|
||||
selection,
|
||||
fetchData,
|
||||
isLoading,
|
||||
viewAs,
|
||||
@ -180,7 +180,7 @@ const Sessions = ({
|
||||
t={t}
|
||||
visible={logoutAllDialogVisible}
|
||||
isLoading={isLoading}
|
||||
connections={connections}
|
||||
selection={selection}
|
||||
displayName={displayName}
|
||||
onClose={() => setLogoutAllDialogVisible(false)}
|
||||
onLogoutAllSessions={onClickLogoutAllSessions}
|
||||
@ -200,10 +200,10 @@ export default inject(({ settingsStore, setup, peopleStore }) => {
|
||||
displayName,
|
||||
clearSelection,
|
||||
setDataFromSocket,
|
||||
connections,
|
||||
updateAllSessions,
|
||||
platformData,
|
||||
fetchData,
|
||||
selection,
|
||||
isLoading,
|
||||
onClickLogoutAllSessions,
|
||||
onClickLogoutAllExceptThis,
|
||||
@ -228,9 +228,9 @@ export default inject(({ settingsStore, setup, peopleStore }) => {
|
||||
displayName,
|
||||
clearSelection,
|
||||
setDataFromSocket,
|
||||
connections,
|
||||
updateAllSessions,
|
||||
platformData,
|
||||
selection,
|
||||
fetchData,
|
||||
viewAs,
|
||||
setViewAs,
|
||||
|
@ -524,7 +524,7 @@ class SelectionStore {
|
||||
|
||||
onClickLogoutAllSessions = async (t) => {
|
||||
const { removeAllActiveSessionsById } = this.settingsSetupStore;
|
||||
const userId = this.connections[0]?.userId;
|
||||
const userId = this.selection[0]?.connections[0]?.userId;
|
||||
|
||||
if (!userId) return toastr.error(t("The user is already logged out"));
|
||||
|
||||
@ -543,7 +543,8 @@ class SelectionStore {
|
||||
|
||||
onClickLogoutAllExceptThis = async (t, id) => {
|
||||
const { removeAllExceptThisEventId } = this.settingsSetupStore;
|
||||
const exceptId = this.connections[0]?.id;
|
||||
|
||||
const exceptId = this.selection[0]?.connections[0]?.id;
|
||||
|
||||
if (!exceptId) return toastr.error(t("The user is already logged out"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user