mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-12 18:52:39 +01:00
design: Move device ID to menu
This commit is contained in:
parent
4b248a9bc6
commit
068e312726
@ -45,6 +45,7 @@ class UserDeviceListItem extends StatelessWidget {
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
final action = await showModalActionSheet<UserDeviceListItemAction>(
|
final action = await showModalActionSheet<UserDeviceListItemAction>(
|
||||||
context: context,
|
context: context,
|
||||||
|
title: '${userDevice.displayName} (${userDevice.deviceId})',
|
||||||
actions: [
|
actions: [
|
||||||
SheetAction(
|
SheetAction(
|
||||||
key: UserDeviceListItemAction.rename,
|
key: UserDeviceListItemAction.rename,
|
||||||
@ -112,18 +113,6 @@ class UserDeviceListItem extends StatelessWidget {
|
|||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
const Spacer(),
|
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)
|
if (keys != null)
|
||||||
Text(
|
Text(
|
||||||
keys.blocked
|
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 New Issue
Block a user