fixed logout
This commit is contained in:
parent
7883f3152d
commit
0e9d0e9dc9
@ -47,6 +47,7 @@ const LogoutAllSessionDialog = ({
|
||||
onLogoutAllUsers,
|
||||
onLogoutAllSessions,
|
||||
onLogoutAllExceptThis,
|
||||
setUserSessionPanelVisible,
|
||||
}) => {
|
||||
const [isChecked, setIsChecked] = useState(false);
|
||||
|
||||
@ -60,7 +61,7 @@ const LogoutAllSessionDialog = ({
|
||||
if (!isChecked) {
|
||||
isSeveralSelection
|
||||
? onLogoutAllUsers(t, userIds)
|
||||
: onLogoutAllSessions(t);
|
||||
: onLogoutAllSessions(t).then(() => setUserSessionPanelVisible(false));
|
||||
onClose();
|
||||
} else {
|
||||
onLogoutAllExceptThis(t, exceptId, displayName);
|
||||
|
@ -99,6 +99,7 @@ const Sessions = ({
|
||||
updateUserStatus,
|
||||
getLoginHistoryReport,
|
||||
isLoadingDownloadReport,
|
||||
setUserSessionPanelVisible,
|
||||
isSessionsLoaded,
|
||||
}) => {
|
||||
const { t } = useTranslation([
|
||||
@ -197,15 +198,17 @@ const Sessions = ({
|
||||
onLogoutAllUsers={onClickLogoutAllUsers}
|
||||
onLogoutAllSessions={onClickLogoutAllSessions}
|
||||
onLogoutAllExceptThis={onClickLogoutAllExceptThis}
|
||||
setUserSessionPanelVisible={setUserSessionPanelVisible}
|
||||
/>
|
||||
)}
|
||||
</MainContainer>
|
||||
);
|
||||
};
|
||||
|
||||
export default inject(({ settingsStore, setup, peopleStore }) => {
|
||||
export default inject(({ settingsStore, setup, peopleStore, dialogsStore }) => {
|
||||
const { updateUserStatus } = peopleStore.usersStore;
|
||||
const { currentDeviceType } = settingsStore;
|
||||
const { setUserSessionPanelVisible } = dialogsStore;
|
||||
const {
|
||||
allSessions,
|
||||
displayName,
|
||||
@ -259,6 +262,7 @@ export default inject(({ settingsStore, setup, peopleStore }) => {
|
||||
updateUserStatus,
|
||||
getLoginHistoryReport,
|
||||
isLoadingDownloadReport,
|
||||
setUserSessionPanelVisible,
|
||||
isSessionsLoaded: allSessions.length > 0,
|
||||
};
|
||||
})(observer(Sessions));
|
||||
|
@ -646,7 +646,13 @@ class SelectionStore {
|
||||
return { ...data, ...session, connections };
|
||||
});
|
||||
|
||||
return sessions.filter((session) => session.connections.length !== 0);
|
||||
const filteredSessions = sessions.filter(
|
||||
(item) =>
|
||||
item.connections.length !== 0 &&
|
||||
item.sessions.some((session) => session.hasOwnProperty("id")),
|
||||
);
|
||||
|
||||
return filteredSessions;
|
||||
}
|
||||
|
||||
fetchData = async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user