fixed display displayName in toast
This commit is contained in:
parent
353894ccea
commit
7883f3152d
@ -63,7 +63,7 @@ const LogoutAllSessionDialog = ({
|
||||
: onLogoutAllSessions(t);
|
||||
onClose();
|
||||
} else {
|
||||
onLogoutAllExceptThis(t, exceptId);
|
||||
onLogoutAllExceptThis(t, exceptId, displayName);
|
||||
onClose();
|
||||
}
|
||||
};
|
||||
|
@ -34,6 +34,7 @@ const Wrapper = styled.div`
|
||||
|
||||
const AllSessionsBlock = (props) => {
|
||||
const { t, isLoading, items, onClickLogoutAllExceptThis } = props;
|
||||
const { displayName } = items;
|
||||
|
||||
const exceptId = items.connections[0]?.id;
|
||||
const sessions = items.sessions || items.connections;
|
||||
@ -51,7 +52,7 @@ const AllSessionsBlock = (props) => {
|
||||
<Button
|
||||
label={t("Profile:LogoutFromAllSessions")}
|
||||
size="small"
|
||||
onClick={() => onClickLogoutAllExceptThis(t, exceptId)}
|
||||
onClick={() => onClickLogoutAllExceptThis(t, exceptId, displayName)}
|
||||
scale={true}
|
||||
isLoading={isLoading}
|
||||
/>
|
||||
|
@ -140,8 +140,6 @@ const Sessions = ({
|
||||
? [bufferSelection.id, ...userIdsFromSelection]
|
||||
: [...userIdsFromSelection];
|
||||
|
||||
console.log(allSessions);
|
||||
|
||||
if (!isSessionsLoaded) return <SessionsLoader viewAs={viewAs} />;
|
||||
|
||||
return (
|
||||
|
@ -702,7 +702,7 @@ class SelectionStore {
|
||||
}
|
||||
};
|
||||
|
||||
onClickLogoutAllExceptThis = async (t, sessionId) => {
|
||||
onClickLogoutAllExceptThis = async (t, sessionId, displayName) => {
|
||||
const { removeAllExceptThisEventId } = this.settingsSetupStore;
|
||||
|
||||
const bufferSelection = this.bufferSelection?.connections[0]?.id;
|
||||
@ -711,7 +711,7 @@ class SelectionStore {
|
||||
|
||||
if (!exceptSessionId)
|
||||
return toastr.error(
|
||||
t("Settings:UserAlreadyLoggedOut", { displayName: this.displayName }),
|
||||
t("Settings:UserAlreadyLoggedOut", { displayName: displayName }),
|
||||
);
|
||||
|
||||
try {
|
||||
@ -733,7 +733,7 @@ class SelectionStore {
|
||||
|
||||
toastr.success(
|
||||
t("Settings:LoggedOutByUserExceptThis", {
|
||||
displayName: this.displayName,
|
||||
displayName: displayName,
|
||||
}),
|
||||
);
|
||||
} catch (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user