You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03: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:
@@ -339,25 +339,14 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
_renderCryptoInfo: function() {
|
_renderCryptoInfo: function() {
|
||||||
const client = MatrixClientPeg.get();
|
const client = MatrixClientPeg.get();
|
||||||
if (!client.isCryptoEnabled()) {
|
const deviceId = client.deviceId;
|
||||||
return <div>
|
const identityKey = client.getDeviceEd25519Key() || "<not supported>";
|
||||||
<h3>Cryptography</h3>
|
|
||||||
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection error">
|
|
||||||
End-to-end encryption is disabled
|
|
||||||
</div>
|
|
||||||
</div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
var deviceId = client.deviceId;
|
|
||||||
var identityKey = client.getDeviceEd25519Key() || "<not supported>";
|
|
||||||
|
|
||||||
var myDevice = client.getStoredDevicesForUser(MatrixClientPeg.get().credentials.userId)[0];
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h3>Cryptography</h3>
|
<h3>Cryptography</h3>
|
||||||
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection">
|
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection">
|
||||||
<ul>
|
<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 ID:</label> <span><code>{deviceId}</code></span></li>
|
||||||
<li><label>Device key:</label> <span><code><b>{identityKey}</b></code></span></li>
|
<li><label>Device key:</label> <span><code><b>{identityKey}</b></code></span></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user