mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 08:15:09 +00:00
design: Move device ID to menu
This commit is contained in:
parent
d9260a4785
commit
9e641c8ee4
1 changed files with 7 additions and 12 deletions
|
@ -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),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue