|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
|
|
|
|
import 'package:fluffychat/widgets/layouts/one_page_card.dart';
|
|
|
|
|
import 'package:fluffychat/config/themes.dart';
|
|
|
|
|
import 'package:matrix/encryption.dart';
|
|
|
|
|
import 'package:matrix/encryption/utils/bootstrap.dart';
|
|
|
|
|
import 'package:matrix/matrix.dart';
|
|
|
|
@ -92,16 +92,20 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
|
|
|
|
|
_recoveryKeyStored == false) {
|
|
|
|
|
final key = bootstrap.newSsssKey.recoveryKey;
|
|
|
|
|
titleText = L10n.of(context).securityKey;
|
|
|
|
|
return OnePageCard(
|
|
|
|
|
child: Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
return AlertDialog(
|
|
|
|
|
title: AppBar(
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
leading: IconButton(
|
|
|
|
|
icon: Icon(Icons.close),
|
|
|
|
|
onPressed: Navigator.of(context).pop,
|
|
|
|
|
),
|
|
|
|
|
title: Text(L10n.of(context).securityKey),
|
|
|
|
|
),
|
|
|
|
|
body: ListView(
|
|
|
|
|
content: Center(
|
|
|
|
|
child: ConstrainedBox(
|
|
|
|
|
constraints:
|
|
|
|
|
BoxConstraints(maxWidth: FluffyThemes.columnWidth * 1.5),
|
|
|
|
|
child: ListView(
|
|
|
|
|
padding: const EdgeInsets.all(16.0),
|
|
|
|
|
children: [
|
|
|
|
|
TextField(
|
|
|
|
@ -129,6 +133,7 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
switch (bootstrap.state) {
|
|
|
|
@ -161,16 +166,20 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
|
|
|
|
|
break;
|
|
|
|
|
case BootstrapState.openExistingSsss:
|
|
|
|
|
_recoveryKeyStored = true;
|
|
|
|
|
return OnePageCard(
|
|
|
|
|
child: Scaffold(
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
leading: IconButton(
|
|
|
|
|
icon: Icon(Icons.close),
|
|
|
|
|
onPressed: Navigator.of(context).pop,
|
|
|
|
|
),
|
|
|
|
|
title: Text(L10n.of(context).pleaseEnterSecurityKey),
|
|
|
|
|
),
|
|
|
|
|
body: ListView(
|
|
|
|
|
body: Center(
|
|
|
|
|
child: ConstrainedBox(
|
|
|
|
|
constraints:
|
|
|
|
|
BoxConstraints(maxWidth: FluffyThemes.columnWidth * 1.5),
|
|
|
|
|
child: ListView(
|
|
|
|
|
padding: const EdgeInsets.all(16.0),
|
|
|
|
|
children: [
|
|
|
|
|
TextField(
|
|
|
|
@ -267,6 +276,7 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
case BootstrapState.askWipeCrossSigning:
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback(
|
|
|
|
|