diff --git a/lib/pages/bootstrap/bootstrap_dialog.dart b/lib/pages/bootstrap/bootstrap_dialog.dart index 9b09d77c..90f1eef8 100644 --- a/lib/pages/bootstrap/bootstrap_dialog.dart +++ b/lib/pages/bootstrap/bootstrap_dialog.dart @@ -139,6 +139,7 @@ class BootstrapDialogState extends State { minLines: 4, maxLines: 4, readOnly: true, + style: const TextStyle(fontFamily: 'monospace'), controller: TextEditingController(text: key), ), const SizedBox(height: 16), @@ -254,16 +255,22 @@ class BootstrapDialogState extends State { ), const Divider(height: 32), TextField( - minLines: 1, - maxLines: 1, + minLines: 2, + maxLines: 2, autocorrect: false, readOnly: _recoveryKeyInputLoading, autofillHints: _recoveryKeyInputLoading ? null : [AutofillHints.password], controller: _recoveryKeyTextEditingController, + style: const TextStyle(fontFamily: 'monospace'), decoration: InputDecoration( hintText: 'Abc123 Def456', + labelStyle: TextStyle( + fontFamily: Theme.of(context) + .textTheme + .bodyText1 + ?.fontFamily), labelText: L10n.of(context)!.recoveryKey, errorText: _recoveryKeyInputError, ), diff --git a/lib/pages/new_private_chat/new_private_chat_view.dart b/lib/pages/new_private_chat/new_private_chat_view.dart index 671dfc65..7c50d232 100644 --- a/lib/pages/new_private_chat/new_private_chat_view.dart +++ b/lib/pages/new_private_chat/new_private_chat_view.dart @@ -39,42 +39,8 @@ class NewPrivateChatView extends StatelessWidget { withScrolling: true, child: Column( children: [ - Container( - margin: const EdgeInsets.all(_qrCodePadding), - alignment: Alignment.center, - padding: const EdgeInsets.all(_qrCodePadding * 2), - child: InkWell( - onTap: controller.inviteAction, - borderRadius: BorderRadius.circular(12), - child: Material( - borderRadius: BorderRadius.circular(12), - elevation: 6, - color: Colors.white, - shadowColor: const Color(0x44000000), - clipBehavior: Clip.hardEdge, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - QrImage( - data: - 'https://matrix.to/#/${Matrix.of(context).client.userID}', - version: QrVersions.auto, - size: min(MediaQuery.of(context).size.width - 16, 200), - ), - Image.asset('assets/share.png', width: 48, height: 48), - ], - ), - ), - ), - ), - ListTile( - subtitle: Text( - L10n.of(context)!.createNewChatExplaination, - textAlign: TextAlign.center, - ), - ), Padding( - padding: const EdgeInsets.all(12), + padding: const EdgeInsets.symmetric(horizontal: 12), child: Form( key: controller.formKey, child: TextFormField( @@ -87,6 +53,10 @@ class NewPrivateChatView extends StatelessWidget { validator: controller.validateForm, inputFormatters: controller.removeMatrixToFormatters, decoration: InputDecoration( + contentPadding: const EdgeInsets.symmetric( + horizontal: 12, + vertical: 6, + ), labelText: L10n.of(context)!.typeInInviteLinkManually, hintText: '@username', prefixText: NewPrivateChatController.prefixNoProtocol, @@ -98,6 +68,35 @@ class NewPrivateChatView extends StatelessWidget { ), ), ), + Container( + margin: const EdgeInsets.all(_qrCodePadding), + alignment: Alignment.center, + padding: const EdgeInsets.all(_qrCodePadding * 2), + child: Material( + borderRadius: BorderRadius.circular(12), + elevation: 10, + color: Colors.white, + shadowColor: Theme.of(context).appBarTheme.shadowColor, + clipBehavior: Clip.hardEdge, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + QrImage( + data: + 'https://matrix.to/#/${Matrix.of(context).client.userID}', + version: QrVersions.auto, + size: min(MediaQuery.of(context).size.width - 16, 200), + ), + TextButton.icon( + icon: Icon(Icons.adaptive.share_outlined), + label: Text(L10n.of(context)!.shareYourInviteLink), + onPressed: controller.inviteAction, + ), + const SizedBox(height: 8), + ], + ), + ), + ), ], ), ),