From 8d4469ebde108514a8bea46ffa44b64c3a9f7251 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 16 Feb 2020 08:44:56 +0100 Subject: [PATCH] Better login UX --- lib/views/login.dart | 5 ++++- lib/views/sign_up.dart | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/views/login.dart b/lib/views/login.dart index 361a88d..f9146d5 100644 --- a/lib/views/login.dart +++ b/lib/views/login.dart @@ -44,7 +44,7 @@ class _LoginState extends State { } String homeserver = serverController.text; - if (homeserver.isEmpty) homeserver = "matrix-client.matrix.org"; + if (homeserver.isEmpty) homeserver = "tchncs.de"; if (!homeserver.startsWith("https://")) { homeserver = "https://" + homeserver; } @@ -91,6 +91,7 @@ class _LoginState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + leading: loading ? Container() : null, title: TextField( autocorrect: false, controller: serverController, @@ -124,6 +125,7 @@ class _LoginState extends State { color: Theme.of(context).primaryColor), ), title: TextField( + readOnly: loading, autocorrect: false, controller: usernameController, decoration: InputDecoration( @@ -139,6 +141,7 @@ class _LoginState extends State { child: Icon(Icons.lock, color: Theme.of(context).primaryColor), ), title: TextField( + readOnly: loading, autocorrect: false, controller: passwordController, obscureText: !showPassword, diff --git a/lib/views/sign_up.dart b/lib/views/sign_up.dart index 785f2f0..f59da37 100644 --- a/lib/views/sign_up.dart +++ b/lib/views/sign_up.dart @@ -52,7 +52,7 @@ class _SignUpState extends State { usernameController.text.toLowerCase().replaceAll(" ", "-"); String homeserver = serverController.text; - if (homeserver.isEmpty) homeserver = "matrix-client.matrix.org"; + if (homeserver.isEmpty) homeserver = "tchncs.de"; if (!homeserver.startsWith("https://")) { homeserver = "https://" + homeserver; }