mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-24 06:22:34 +01:00
style: Enhance user device settings design
This commit is contained in:
parent
2ccc30879b
commit
cef5fbe3c8
@ -2517,5 +2517,6 @@
|
||||
"letsStart": "Let's start",
|
||||
"enterInviteLinkOrMatrixId": "Enter invite link or Matrix ID...",
|
||||
"reopenChat": "Reopen chat",
|
||||
"noBackupWarning": "Warning! Without enabling chat backup, you will lose access to your encrypted messages. It is highly recommended to enable the chat backup first before logging out."
|
||||
"noBackupWarning": "Warning! Without enabling chat backup, you will lose access to your encrypted messages. It is highly recommended to enable the chat backup first before logging out.",
|
||||
"noOtherDevicesFound": "No other devices found"
|
||||
}
|
@ -69,6 +69,13 @@ class DevicesSettingsView extends StatelessWidget {
|
||||
? null
|
||||
: () => controller.removeDevicesAction(
|
||||
controller.notThisDevice),
|
||||
)
|
||||
else
|
||||
Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Text(L10n.of(context)!.noOtherDevicesFound),
|
||||
),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
],
|
||||
|
@ -36,10 +36,10 @@ class UserDeviceListItem extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final keys = Matrix.of(context)
|
||||
.client
|
||||
.userDeviceKeys[Matrix.of(context).client.userID]
|
||||
final client = Matrix.of(context).client;
|
||||
final keys = client.userDeviceKeys[Matrix.of(context).client.userID]
|
||||
?.deviceKeys[userDevice.deviceId];
|
||||
final isOwnDevice = userDevice.deviceId == client.deviceID;
|
||||
|
||||
return ListTile(
|
||||
onTap: () async {
|
||||
@ -51,7 +51,7 @@ class UserDeviceListItem extends StatelessWidget {
|
||||
key: UserDeviceListItemAction.rename,
|
||||
label: L10n.of(context)!.changeDeviceName,
|
||||
),
|
||||
if (keys != null) ...{
|
||||
if (!isOwnDevice && keys != null) ...{
|
||||
SheetAction(
|
||||
key: UserDeviceListItemAction.verify,
|
||||
label: L10n.of(context)!.verifyStart,
|
||||
@ -69,11 +69,12 @@ class UserDeviceListItem extends StatelessWidget {
|
||||
isDestructiveAction: true,
|
||||
),
|
||||
},
|
||||
SheetAction(
|
||||
key: UserDeviceListItemAction.remove,
|
||||
label: L10n.of(context)!.delete,
|
||||
isDestructiveAction: true,
|
||||
),
|
||||
if (!isOwnDevice)
|
||||
SheetAction(
|
||||
key: UserDeviceListItemAction.remove,
|
||||
label: L10n.of(context)!.delete,
|
||||
isDestructiveAction: true,
|
||||
),
|
||||
],
|
||||
);
|
||||
if (action == null) return;
|
||||
|
Loading…
Reference in New Issue
Block a user