Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Use device IDs for nameless devices in device list (#7081)
Browse files Browse the repository at this point in the history
  • Loading branch information
duxovni authored Nov 4, 2021
1 parent bd2f4b6 commit e31b126
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/components/views/settings/DevicesPanelEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ export default class DevicesPanelEntry extends React.Component<IProps, IState> {
<StyledCheckbox kind={CheckboxStyle.Outline} onChange={this.onDeviceToggled} checked={this.props.selected} />
</div>;

const deviceName = device.display_name ?
<React.Fragment>
<TextWithTooltip tooltip={device.display_name + " (" + device.device_id + ")"}>
{ device.display_name }
</TextWithTooltip>
</React.Fragment> :
<React.Fragment>
{ device.device_id }
</React.Fragment>;

const buttons = this.state.renaming ?
<form className="mx_DevicesPanel_renameForm" onSubmit={this.onRenameSubmit}>
<Field
Expand All @@ -182,9 +192,7 @@ export default class DevicesPanelEntry extends React.Component<IProps, IState> {
{ left }
<div className="mx_DevicesPanel_deviceInfo">
<div className="mx_DevicesPanel_deviceName">
<TextWithTooltip tooltip={device.display_name + " (" + device.device_id + ")"}>
{ device.display_name }
</TextWithTooltip>
{ deviceName }
</div>
<div className="mx_DevicesPanel_lastSeen">
{ lastSeen }
Expand Down

0 comments on commit e31b126

Please sign in to comment.