mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Remove device name from crypto section
As it was getting it by assuming our device was the first one, which is just not a valid assumption.
This commit is contained in:
parent
8ffe14881e
commit
6777e07a41
@ -339,25 +339,14 @@ module.exports = React.createClass({
|
||||
|
||||
_renderCryptoInfo: function() {
|
||||
const client = MatrixClientPeg.get();
|
||||
if (!client.isCryptoEnabled()) {
|
||||
return <div>
|
||||
<h3>Cryptography</h3>
|
||||
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection error">
|
||||
End-to-end encryption is disabled
|
||||
</div>
|
||||
</div>;
|
||||
}
|
||||
const deviceId = client.deviceId;
|
||||
const identityKey = client.getDeviceEd25519Key() || "<not supported>";
|
||||
|
||||
var deviceId = client.deviceId;
|
||||
var identityKey = client.getDeviceEd25519Key() || "<not supported>";
|
||||
|
||||
var myDevice = client.getStoredDevicesForUser(MatrixClientPeg.get().credentials.userId)[0];
|
||||
return (
|
||||
<div>
|
||||
<h3>Cryptography</h3>
|
||||
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection">
|
||||
<ul>
|
||||
<li><label>Device name:</label> <span>{ myDevice.getDisplayName() }</span></li>
|
||||
<li><label>Device ID:</label> <span><code>{deviceId}</code></span></li>
|
||||
<li><label>Device key:</label> <span><code><b>{identityKey}</b></code></span></li>
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user