mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-23 10:34:25 +01:00
chore: Login design follow up dark mode fix
This commit is contained in:
parent
fa47d92933
commit
b94bdccb3b
@ -13,6 +13,8 @@ abstract class FluffyThemes {
|
|||||||
static const fallbackTextStyle =
|
static const fallbackTextStyle =
|
||||||
TextStyle(fontFamily: 'Roboto', fontFamilyFallback: ['NotoEmoji']);
|
TextStyle(fontFamily: 'Roboto', fontFamilyFallback: ['NotoEmoji']);
|
||||||
|
|
||||||
|
static const TextStyle loginTextFieldStyle = TextStyle(color: Colors.black);
|
||||||
|
|
||||||
static InputDecoration loginTextFieldDecoration({
|
static InputDecoration loginTextFieldDecoration({
|
||||||
String? errorText,
|
String? errorText,
|
||||||
String? labelText,
|
String? labelText,
|
||||||
@ -26,6 +28,9 @@ abstract class FluffyThemes {
|
|||||||
hintText: hintText,
|
hintText: hintText,
|
||||||
suffixIcon: suffixIcon,
|
suffixIcon: suffixIcon,
|
||||||
prefixIcon: prefixIcon,
|
prefixIcon: prefixIcon,
|
||||||
|
suffixIconColor: Colors.black,
|
||||||
|
prefixIconColor: Colors.black,
|
||||||
|
iconColor: Colors.black,
|
||||||
errorText: errorText,
|
errorText: errorText,
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(
|
||||||
color: Colors.red.shade200,
|
color: Colors.red.shade200,
|
||||||
@ -37,6 +42,7 @@ abstract class FluffyThemes {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
hintStyle: TextStyle(color: Colors.grey.shade700),
|
||||||
labelStyle: const TextStyle(
|
labelStyle: const TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
shadows: [
|
shadows: [
|
||||||
|
@ -90,8 +90,12 @@ class ConnectPageView extends StatelessWidget {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
controller: controller.usernameController,
|
controller: controller.usernameController,
|
||||||
onSubmitted: (_) => controller.signUp(),
|
onSubmitted: (_) => controller.signUp(),
|
||||||
|
style: FluffyThemes.loginTextFieldStyle,
|
||||||
decoration: FluffyThemes.loginTextFieldDecoration(
|
decoration: FluffyThemes.loginTextFieldDecoration(
|
||||||
prefixIcon: const Icon(Icons.account_box_outlined),
|
prefixIcon: const Icon(
|
||||||
|
Icons.account_box_outlined,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
hintText: L10n.of(context)!.chooseAUsername,
|
hintText: L10n.of(context)!.chooseAUsername,
|
||||||
errorText: controller.signupError,
|
errorText: controller.signupError,
|
||||||
),
|
),
|
||||||
|
@ -40,10 +40,14 @@ class HomeserverPickerView extends StatelessWidget {
|
|||||||
focusNode: controller.homeserverFocusNode,
|
focusNode: controller.homeserverFocusNode,
|
||||||
controller: controller.homeserverController,
|
controller: controller.homeserverController,
|
||||||
onChanged: controller.onChanged,
|
onChanged: controller.onChanged,
|
||||||
|
style: FluffyThemes.loginTextFieldStyle,
|
||||||
decoration: FluffyThemes.loginTextFieldDecoration(
|
decoration: FluffyThemes.loginTextFieldDecoration(
|
||||||
labelText: L10n.of(context)!.homeserver,
|
labelText: L10n.of(context)!.homeserver,
|
||||||
hintText: L10n.of(context)!.enterYourHomeserver,
|
hintText: L10n.of(context)!.enterYourHomeserver,
|
||||||
suffixIcon: const Icon(Icons.search),
|
suffixIcon: const Icon(
|
||||||
|
Icons.search,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
errorText: controller.error,
|
errorText: controller.error,
|
||||||
),
|
),
|
||||||
readOnly: !AppConfig.allowOtherHomeservers,
|
readOnly: !AppConfig.allowOtherHomeservers,
|
||||||
@ -70,7 +74,10 @@ class HomeserverPickerView extends StatelessWidget {
|
|||||||
.map(
|
.map(
|
||||||
(server) => ListTile(
|
(server) => ListTile(
|
||||||
trailing: IconButton(
|
trailing: IconButton(
|
||||||
icon: const Icon(Icons.info_outlined),
|
icon: const Icon(
|
||||||
|
Icons.info_outlined,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
controller.showServerInfo(server),
|
controller.showServerInfo(server),
|
||||||
),
|
),
|
||||||
@ -78,9 +85,14 @@ class HomeserverPickerView extends StatelessWidget {
|
|||||||
server.homeserver.baseUrl.host),
|
server.homeserver.baseUrl.host),
|
||||||
title: Text(
|
title: Text(
|
||||||
server.homeserver.baseUrl.host,
|
server.homeserver.baseUrl.host,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.black),
|
||||||
),
|
),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
server.homeserver.description ?? ''),
|
server.homeserver.description ?? '',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.grey.shade700),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
|
@ -44,10 +44,14 @@ class LoginView extends StatelessWidget {
|
|||||||
controller: controller.usernameController,
|
controller: controller.usernameController,
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
|
style: FluffyThemes.loginTextFieldStyle,
|
||||||
autofillHints:
|
autofillHints:
|
||||||
controller.loading ? null : [AutofillHints.username],
|
controller.loading ? null : [AutofillHints.username],
|
||||||
decoration: FluffyThemes.loginTextFieldDecoration(
|
decoration: FluffyThemes.loginTextFieldDecoration(
|
||||||
prefixIcon: const Icon(Icons.account_box_outlined),
|
prefixIcon: const Icon(
|
||||||
|
Icons.account_box_outlined,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
errorText: controller.usernameError,
|
errorText: controller.usernameError,
|
||||||
hintText: L10n.of(context)!.emailOrUsername,
|
hintText: L10n.of(context)!.emailOrUsername,
|
||||||
),
|
),
|
||||||
@ -64,14 +68,21 @@ class LoginView extends StatelessWidget {
|
|||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
obscureText: !controller.showPassword,
|
obscureText: !controller.showPassword,
|
||||||
onSubmitted: controller.login,
|
onSubmitted: controller.login,
|
||||||
|
style: FluffyThemes.loginTextFieldStyle,
|
||||||
decoration: FluffyThemes.loginTextFieldDecoration(
|
decoration: FluffyThemes.loginTextFieldDecoration(
|
||||||
prefixIcon: const Icon(Icons.lock_outlined),
|
prefixIcon: const Icon(
|
||||||
|
Icons.lock_outlined,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
errorText: controller.passwordError,
|
errorText: controller.passwordError,
|
||||||
suffixIcon: IconButton(
|
suffixIcon: IconButton(
|
||||||
tooltip: L10n.of(context)!.showPassword,
|
tooltip: L10n.of(context)!.showPassword,
|
||||||
icon: Icon(controller.showPassword
|
icon: Icon(
|
||||||
|
controller.showPassword
|
||||||
? Icons.visibility_off_outlined
|
? Icons.visibility_off_outlined
|
||||||
: Icons.visibility_outlined),
|
: Icons.visibility_outlined,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
onPressed: controller.toggleShowPassword,
|
onPressed: controller.toggleShowPassword,
|
||||||
),
|
),
|
||||||
hintText: L10n.of(context)!.password,
|
hintText: L10n.of(context)!.password,
|
||||||
|
@ -38,12 +38,18 @@ class SignupPageView extends StatelessWidget {
|
|||||||
obscureText: !controller.showPassword,
|
obscureText: !controller.showPassword,
|
||||||
validator: controller.password1TextFieldValidator,
|
validator: controller.password1TextFieldValidator,
|
||||||
decoration: FluffyThemes.loginTextFieldDecoration(
|
decoration: FluffyThemes.loginTextFieldDecoration(
|
||||||
prefixIcon: const Icon(Icons.vpn_key_outlined),
|
prefixIcon: const Icon(
|
||||||
|
Icons.vpn_key_outlined,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
suffixIcon: IconButton(
|
suffixIcon: IconButton(
|
||||||
tooltip: L10n.of(context)!.showPassword,
|
tooltip: L10n.of(context)!.showPassword,
|
||||||
icon: Icon(controller.showPassword
|
icon: Icon(
|
||||||
|
controller.showPassword
|
||||||
? Icons.visibility_off_outlined
|
? Icons.visibility_off_outlined
|
||||||
: Icons.visibility_outlined),
|
: Icons.visibility_outlined,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
onPressed: controller.toggleShowPassword,
|
onPressed: controller.toggleShowPassword,
|
||||||
),
|
),
|
||||||
hintText: L10n.of(context)!.chooseAStrongPassword,
|
hintText: L10n.of(context)!.chooseAStrongPassword,
|
||||||
@ -61,7 +67,10 @@ class SignupPageView extends StatelessWidget {
|
|||||||
controller.loading ? null : [AutofillHints.username],
|
controller.loading ? null : [AutofillHints.username],
|
||||||
validator: controller.emailTextFieldValidator,
|
validator: controller.emailTextFieldValidator,
|
||||||
decoration: FluffyThemes.loginTextFieldDecoration(
|
decoration: FluffyThemes.loginTextFieldDecoration(
|
||||||
prefixIcon: const Icon(Icons.mail_outlined),
|
prefixIcon: const Icon(
|
||||||
|
Icons.mail_outlined,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
hintText: L10n.of(context)!.enterAnEmailAddress,
|
hintText: L10n.of(context)!.enterAnEmailAddress,
|
||||||
errorText: controller.error),
|
errorText: controller.error),
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user