mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-12 18:52:39 +01:00
design: Change design of verification page
This commit is contained in:
parent
f2e37b20ff
commit
849a3d95e4
@ -2397,6 +2397,7 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
|
"unverified": "Unverified",
|
||||||
"verified": "Verified",
|
"verified": "Verified",
|
||||||
"@verified": {
|
"@verified": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
@ -94,26 +94,14 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
|||||||
.getUserByMXIDSync(deviceKeys[i].userId)
|
.getUserByMXIDSync(deviceKeys[i].userId)
|
||||||
.calcDisplayname(),
|
.calcDisplayname(),
|
||||||
),
|
),
|
||||||
title: Row(
|
title: Text(
|
||||||
children: [
|
room
|
||||||
Text(
|
.getUserByMXIDSync(deviceKeys[i].userId)
|
||||||
room
|
.calcDisplayname(),
|
||||||
.getUserByMXIDSync(deviceKeys[i].userId)
|
),
|
||||||
.calcDisplayname(),
|
subtitle: Text(
|
||||||
),
|
deviceKeys[i].userId,
|
||||||
Spacer(),
|
style: TextStyle(fontWeight: FontWeight.w300),
|
||||||
Text(
|
|
||||||
deviceKeys[i].userId,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
color: Theme.of(context)
|
|
||||||
.textTheme
|
|
||||||
.bodyText1
|
|
||||||
.color
|
|
||||||
.withAlpha(150),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -149,10 +137,8 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
foregroundColor:
|
foregroundColor: Colors.white,
|
||||||
Theme.of(context).textTheme.bodyText1.color,
|
backgroundColor: deviceKeys[i].color,
|
||||||
backgroundColor:
|
|
||||||
Theme.of(context).secondaryHeaderColor,
|
|
||||||
child: Icon(deviceKeys[i].icon),
|
child: Icon(deviceKeys[i].icon),
|
||||||
),
|
),
|
||||||
title: Text(
|
title: Text(
|
||||||
@ -164,14 +150,7 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
deviceKeys[i].deviceId,
|
deviceKeys[i].deviceId,
|
||||||
style: TextStyle(
|
style: TextStyle(fontWeight: FontWeight.w300),
|
||||||
fontSize: 14,
|
|
||||||
color: Theme.of(context)
|
|
||||||
.textTheme
|
|
||||||
.bodyText1
|
|
||||||
.color
|
|
||||||
.withAlpha(150),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
Text(
|
Text(
|
||||||
@ -179,14 +158,10 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
|||||||
? L10n.of(context).blocked
|
? L10n.of(context).blocked
|
||||||
: deviceKeys[i].verified
|
: deviceKeys[i].verified
|
||||||
? L10n.of(context).verified
|
? L10n.of(context).verified
|
||||||
: L10n.of(context).unknownDevice,
|
: L10n.of(context).unverified,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: deviceKeys[i].blocked
|
color: deviceKeys[i].color,
|
||||||
? Colors.red
|
|
||||||
: deviceKeys[i].verified
|
|
||||||
? Colors.green
|
|
||||||
: Colors.orange,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -203,3 +178,11 @@ class ChatEncryptionSettingsView extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension on DeviceKeys {
|
||||||
|
Color get color => blocked
|
||||||
|
? Colors.red
|
||||||
|
: verified
|
||||||
|
? Colors.green
|
||||||
|
: Colors.orange;
|
||||||
|
}
|
||||||
|
@ -93,8 +93,14 @@ class UserDeviceListItem extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
foregroundColor: Theme.of(context).textTheme.bodyText1.color,
|
foregroundColor: Colors.white,
|
||||||
backgroundColor: Theme.of(context).secondaryHeaderColor,
|
backgroundColor: keys == null
|
||||||
|
? Colors.grey[700]
|
||||||
|
: keys.blocked
|
||||||
|
? Colors.red
|
||||||
|
: keys.verified
|
||||||
|
? Colors.green
|
||||||
|
: Colors.orange,
|
||||||
child: Icon(userDevice.icon),
|
child: Icon(userDevice.icon),
|
||||||
),
|
),
|
||||||
title: Row(
|
title: Row(
|
||||||
@ -112,7 +118,10 @@ class UserDeviceListItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
subtitle: Row(
|
subtitle: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(userDevice.deviceId),
|
Text(
|
||||||
|
userDevice.deviceId,
|
||||||
|
style: TextStyle(fontWeight: FontWeight.w300),
|
||||||
|
),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
if (keys != null)
|
if (keys != null)
|
||||||
Text(
|
Text(
|
||||||
@ -120,7 +129,7 @@ class UserDeviceListItem extends StatelessWidget {
|
|||||||
? L10n.of(context).blocked
|
? L10n.of(context).blocked
|
||||||
: keys.verified
|
: keys.verified
|
||||||
? L10n.of(context).verified
|
? L10n.of(context).verified
|
||||||
: L10n.of(context).unknownDevice,
|
: L10n.of(context).unverified,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: keys.blocked
|
color: keys.blocked
|
||||||
? Colors.red
|
? Colors.red
|
||||||
|
Loading…
Reference in New Issue
Block a user