mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-03-29 10:57:06 +01:00
chore: Nicer new chat design
This commit is contained in:
parent
d930b569fc
commit
99b0ee194c
@ -139,6 +139,7 @@ class BootstrapDialogState extends State<BootstrapDialog> {
|
|||||||
minLines: 4,
|
minLines: 4,
|
||||||
maxLines: 4,
|
maxLines: 4,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
|
style: const TextStyle(fontFamily: 'monospace'),
|
||||||
controller: TextEditingController(text: key),
|
controller: TextEditingController(text: key),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
@ -254,16 +255,22 @@ class BootstrapDialogState extends State<BootstrapDialog> {
|
|||||||
),
|
),
|
||||||
const Divider(height: 32),
|
const Divider(height: 32),
|
||||||
TextField(
|
TextField(
|
||||||
minLines: 1,
|
minLines: 2,
|
||||||
maxLines: 1,
|
maxLines: 2,
|
||||||
autocorrect: false,
|
autocorrect: false,
|
||||||
readOnly: _recoveryKeyInputLoading,
|
readOnly: _recoveryKeyInputLoading,
|
||||||
autofillHints: _recoveryKeyInputLoading
|
autofillHints: _recoveryKeyInputLoading
|
||||||
? null
|
? null
|
||||||
: [AutofillHints.password],
|
: [AutofillHints.password],
|
||||||
controller: _recoveryKeyTextEditingController,
|
controller: _recoveryKeyTextEditingController,
|
||||||
|
style: const TextStyle(fontFamily: 'monospace'),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: 'Abc123 Def456',
|
hintText: 'Abc123 Def456',
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
fontFamily: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.bodyText1
|
||||||
|
?.fontFamily),
|
||||||
labelText: L10n.of(context)!.recoveryKey,
|
labelText: L10n.of(context)!.recoveryKey,
|
||||||
errorText: _recoveryKeyInputError,
|
errorText: _recoveryKeyInputError,
|
||||||
),
|
),
|
||||||
|
@ -39,42 +39,8 @@ class NewPrivateChatView extends StatelessWidget {
|
|||||||
withScrolling: true,
|
withScrolling: true,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
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(
|
||||||
padding: const EdgeInsets.all(12),
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
child: Form(
|
child: Form(
|
||||||
key: controller.formKey,
|
key: controller.formKey,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
@ -87,6 +53,10 @@ class NewPrivateChatView extends StatelessWidget {
|
|||||||
validator: controller.validateForm,
|
validator: controller.validateForm,
|
||||||
inputFormatters: controller.removeMatrixToFormatters,
|
inputFormatters: controller.removeMatrixToFormatters,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 12,
|
||||||
|
vertical: 6,
|
||||||
|
),
|
||||||
labelText: L10n.of(context)!.typeInInviteLinkManually,
|
labelText: L10n.of(context)!.typeInInviteLinkManually,
|
||||||
hintText: '@username',
|
hintText: '@username',
|
||||||
prefixText: NewPrivateChatController.prefixNoProtocol,
|
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),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user