design: Remove cupertino icons
This commit is contained in:
parent
0b44f52937
commit
88c9753222
10 changed files with 254 additions and 241 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||
|
|
@ -19,78 +18,85 @@ class SettingsSecurityView extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(L10n.of(context).security)),
|
||||
body: MaxWidthBody(
|
||||
withScrolling: true,
|
||||
child: Column(
|
||||
children: [
|
||||
ListTile(
|
||||
trailing: const Icon(CupertinoIcons.xmark_shield),
|
||||
title: Text(L10n.of(context).ignoredUsers),
|
||||
onTap: () => VRouter.of(context).to('ignorelist'),
|
||||
),
|
||||
ListTile(
|
||||
trailing: const Icon(CupertinoIcons.padlock),
|
||||
title: Text(
|
||||
L10n.of(context).changePassword,
|
||||
),
|
||||
onTap: controller.changePasswordAccountAction,
|
||||
),
|
||||
ListTile(
|
||||
trailing: const Icon(CupertinoIcons.mail),
|
||||
title: Text(L10n.of(context).passwordRecovery),
|
||||
onTap: () => VRouter.of(context).to('3pid'),
|
||||
),
|
||||
if (Matrix.of(context).client.encryption != null) ...{
|
||||
const Divider(thickness: 1),
|
||||
if (PlatformInfos.isMobile)
|
||||
ListTile(
|
||||
trailing: const Icon(Icons.lock_outlined),
|
||||
title: Text(L10n.of(context).appLock),
|
||||
onTap: controller.setAppLockAction,
|
||||
),
|
||||
body: ListTileTheme(
|
||||
iconColor: Theme.of(context).textTheme.bodyText1.color,
|
||||
child: MaxWidthBody(
|
||||
withScrolling: true,
|
||||
child: Column(
|
||||
children: [
|
||||
ListTile(
|
||||
trailing: const Icon(Icons.close),
|
||||
title: Text(L10n.of(context).ignoredUsers),
|
||||
onTap: () => VRouter.of(context).to('ignorelist'),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10n.of(context).yourPublicKey),
|
||||
onTap: () => showOkAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context).yourPublicKey,
|
||||
message: Matrix.of(context).client.fingerprintKey.beautified,
|
||||
okLabel: L10n.of(context).ok,
|
||||
),
|
||||
trailing: const Icon(Icons.vpn_key_outlined),
|
||||
title: Text(
|
||||
L10n.of(context).changePassword,
|
||||
),
|
||||
onTap: controller.changePasswordAccountAction,
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10n.of(context).crossSigningEnabled),
|
||||
trailing:
|
||||
Matrix.of(context).client.encryption.crossSigning.enabled
|
||||
? const Icon(Icons.check, color: Colors.green)
|
||||
: const Icon(Icons.error, color: Colors.red),
|
||||
trailing: const Icon(Icons.mail_outlined),
|
||||
title: Text(L10n.of(context).passwordRecovery),
|
||||
onTap: () => VRouter.of(context).to('3pid'),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10n.of(context).onlineKeyBackupEnabled),
|
||||
trailing:
|
||||
Matrix.of(context).client.encryption.keyManager.enabled
|
||||
? const Icon(Icons.check, color: Colors.green)
|
||||
: const Icon(Icons.error, color: Colors.red),
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('Session verified'),
|
||||
trailing: !Matrix.of(context).client.isUnknownSession
|
||||
? const Icon(Icons.check, color: Colors.green)
|
||||
: const Icon(Icons.error, color: Colors.red),
|
||||
),
|
||||
FutureBuilder(
|
||||
future:
|
||||
Matrix.of(context).client.encryption.keyManager.isCached(),
|
||||
builder: (context, snapshot) => ListTile(
|
||||
title: Text(L10n.of(context).keysCached),
|
||||
trailing: snapshot.data == true
|
||||
if (Matrix.of(context).client.encryption != null) ...{
|
||||
const Divider(thickness: 1),
|
||||
if (PlatformInfos.isMobile)
|
||||
ListTile(
|
||||
trailing: const Icon(Icons.lock_outlined),
|
||||
title: Text(L10n.of(context).appLock),
|
||||
onTap: controller.setAppLockAction,
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10n.of(context).yourPublicKey),
|
||||
onTap: () => showOkAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context).yourPublicKey,
|
||||
message:
|
||||
Matrix.of(context).client.fingerprintKey.beautified,
|
||||
okLabel: L10n.of(context).ok,
|
||||
),
|
||||
trailing: const Icon(Icons.vpn_key_outlined),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10n.of(context).crossSigningEnabled),
|
||||
trailing:
|
||||
Matrix.of(context).client.encryption.crossSigning.enabled
|
||||
? const Icon(Icons.check, color: Colors.green)
|
||||
: const Icon(Icons.error, color: Colors.red),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10n.of(context).onlineKeyBackupEnabled),
|
||||
trailing:
|
||||
Matrix.of(context).client.encryption.keyManager.enabled
|
||||
? const Icon(Icons.check, color: Colors.green)
|
||||
: const Icon(Icons.error, color: Colors.red),
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('Session verified'),
|
||||
trailing: !Matrix.of(context).client.isUnknownSession
|
||||
? const Icon(Icons.check, color: Colors.green)
|
||||
: const Icon(Icons.error, color: Colors.red),
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
FutureBuilder(
|
||||
future: Matrix.of(context)
|
||||
.client
|
||||
.encryption
|
||||
.keyManager
|
||||
.isCached(),
|
||||
builder: (context, snapshot) => ListTile(
|
||||
title: Text(L10n.of(context).keysCached),
|
||||
trailing: snapshot.data == true
|
||||
? const Icon(Icons.check, color: Colors.green)
|
||||
: const Icon(Icons.error, color: Colors.red),
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue