Show device ID in UserInfo when there is no device name

Signed-off-by: Aaron Raimist <aaron@raim.ist>
pull/21833/head
Aaron Raimist 2021-05-06 20:01:48 -05:00
parent 68210b1415
commit 5d7535738a
No known key found for this signature in database
GPG Key ID: 37419210002890EF
1 changed files with 9 additions and 3 deletions

View File

@ -187,9 +187,15 @@ function DeviceItem({userId, device}: {userId: string, device: IDevice}) {
verifyDevice(cli.getUser(userId), device);
};
const deviceName = device.ambiguous ?
(device.getDisplayName() ? device.getDisplayName() : "") + " (" + device.deviceId + ")" :
device.getDisplayName();
let deviceName;
if (device.getDisplayName() === null || device.getDisplayName().trim() === "") {
deviceName = device.deviceId;
} else {
deviceName = device.ambiguous ?
device.getDisplayName() + " (" + device.deviceId + ")" :
device.getDisplayName();
}
let trustedLabel = null;
if (userTrust.isVerified()) trustedLabel = isVerified ? _t("Trusted") : _t("Not trusted");