design: Move device ID to menu

This commit is contained in:
Krille Fear 2021-11-19 10:07:05 +01:00
parent 4b248a9bc6
commit 068e312726

View File

@ -45,6 +45,7 @@ class UserDeviceListItem extends StatelessWidget {
onTap: () async {
final action = await showModalActionSheet<UserDeviceListItemAction>(
context: context,
title: '${userDevice.displayName} (${userDevice.deviceId})',
actions: [
SheetAction(
key: UserDeviceListItemAction.rename,
@ -112,18 +113,6 @@ class UserDeviceListItem extends StatelessWidget {
overflow: TextOverflow.ellipsis,
),
const Spacer(),
if (userDevice.lastSeenTs != null)
Text(DateTime.fromMillisecondsSinceEpoch(userDevice.lastSeenTs)
.localizedTimeShort(context)),
],
),
subtitle: Row(
children: <Widget>[
Text(
userDevice.deviceId,
style: const TextStyle(fontWeight: FontWeight.w300),
),
const Spacer(),
if (keys != null)
Text(
keys.blocked
@ -141,6 +130,12 @@ class UserDeviceListItem extends StatelessWidget {
),
],
),
subtitle: Text(
L10n.of(context).lastActiveAgo(
DateTime.fromMillisecondsSinceEpoch(userDevice.lastSeenTs)
.localizedTimeShort(context)),
style: const TextStyle(fontWeight: FontWeight.w300),
),
);
}
}