diff --git a/src/app/features/settings/devices/DeviceTile.tsx b/src/app/features/settings/devices/DeviceTile.tsx index 892dadea..6ddd1165 100644 --- a/src/app/features/settings/devices/DeviceTile.tsx +++ b/src/app/features/settings/devices/DeviceTile.tsx @@ -145,7 +145,6 @@ function DeviceRename({ device, onCancel, onRename, refreshDeviceList }: DeviceR return ( - Device Name Save - + + - {renameState.status === AsyncStatus.Error ? ( + {renameState.status === AsyncStatus.Error && ( {renameState.error instanceof Error ? renameState.error.message : 'Unknown Error'} - ) : ( - Device names are visible to public. )} ); @@ -284,55 +282,54 @@ export function DeviceTile({ }, []); return ( - <> - setDetails(!details)} - > - - - } - after={ - !edit && ( - - {options} - {!deleted && ( - setEdit(true)} - disabled={disabled} - > - Edit - - )} - - ) - } - > - {device.display_name ?? device.device_id} - - {typeof activeTs === 'number' && } - {details && ( - <> - - {children} - - )} - - - {edit && ( + setDetails(!details)} + > + + + } + after={ + !edit && ( + + {options} + {!deleted && ( + setEdit(true)} + disabled={disabled} + > + Edit + + )} + + ) + } + > + {edit ? ( setEdit(false)} onRename={handleRename} refreshDeviceList={refreshDeviceList} /> + ) : ( + {device.display_name?.trim() || device.device_id} )} - + + {typeof activeTs === 'number' && } + {details && ( + <> + + {children} + + )} + + ); }