add explicit link to edit devices from one's own UserInfo
This commit is contained in:
parent
6df8157a40
commit
5b48e13eb9
1 changed files with 16 additions and 0 deletions
|
@ -46,6 +46,7 @@ import EncryptionPanel from "./EncryptionPanel";
|
|||
import {useAsyncMemo} from '../../../hooks/useAsyncMemo';
|
||||
import {legacyVerifyUser, verifyDevice, verifyUser} from '../../../verification';
|
||||
import {Action} from "../../../dispatcher/actions";
|
||||
import { USER_SECURITY_TAB } from "../dialogs/UserSettingsDialog";
|
||||
import {useIsEncrypted} from "../../../hooks/useIsEncrypted";
|
||||
import BaseCard from "./BaseCard";
|
||||
import {E2EStatus} from "../../../utils/ShieldUtils";
|
||||
|
@ -1362,6 +1363,20 @@ const BasicUserInfo: React.FC<{
|
|||
}
|
||||
}
|
||||
|
||||
let editDevices;
|
||||
if (member.userId == cli.getUserId()) {
|
||||
editDevices = (<p>
|
||||
<AccessibleButton className="mx_UserInfo_field" onClick={() => {
|
||||
dis.dispatch({
|
||||
action: Action.ViewUserSettings,
|
||||
initialTabId: USER_SECURITY_TAB,
|
||||
});
|
||||
}}>
|
||||
{ _t("Edit devices") }
|
||||
</AccessibleButton>
|
||||
</p>)
|
||||
}
|
||||
|
||||
const securitySection = (
|
||||
<div className="mx_UserInfo_container">
|
||||
<h3>{ _t("Security") }</h3>
|
||||
|
@ -1371,6 +1386,7 @@ const BasicUserInfo: React.FC<{
|
|||
loading={showDeviceListSpinner}
|
||||
devices={devices}
|
||||
userId={member.userId} /> }
|
||||
{ editDevices }
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue