Add device IDs in user info tooltips

For easier device identification, add the device ID in an HTML tooltip for now.

Fixes https://github.com/vector-im/riot-web/issues/12103
This commit is contained in:
J. Ryan Stinnett 2020-01-28 18:03:47 +00:00
parent 145d2bb16b
commit 6fb8f6eef1

View file

@ -183,11 +183,16 @@ function DeviceItem({userId, device}) {
(device.getDisplayName() ? device.getDisplayName() : "") + " (" + device.deviceId + ")" :
device.getDisplayName();
const trustedLabel = isVerified ? _t("Trusted") : _t("Not trusted");
return (<AccessibleButton className={classes} onClick={onDeviceClick}>
return (
<AccessibleButton
className={classes} onClick={onDeviceClick}
title={device.deviceId}
>
<div className={iconClasses} />
<div className="mx_UserInfo_device_name">{deviceName}</div>
<div className="mx_UserInfo_device_trusted">{trustedLabel}</div>
</AccessibleButton>);
</AccessibleButton>
);
}
function DevicesSection({devices, userId, loading}) {