mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-04-26 12:27:51 +02:00
design: Make homepicker page nicer
This commit is contained in:
parent
e879278186
commit
4a8d50c201
@ -1,5 +1,6 @@
|
|||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:fluffychat/widgets/matrix.dart';
|
import 'package:fluffychat/widgets/matrix.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:vrouter/vrouter.dart';
|
import 'package:vrouter/vrouter.dart';
|
||||||
|
|
||||||
import '../homeserver_picker.dart';
|
import '../homeserver_picker.dart';
|
||||||
@ -126,37 +127,35 @@ class HomeserverPickerView extends StatelessWidget {
|
|||||||
const Expanded(child: Divider()),
|
const Expanded(child: Divider()),
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
if (controller.passwordLoginSupported)
|
if (controller.passwordLoginSupported)
|
||||||
Expanded(
|
Center(
|
||||||
child: _LoginButton(
|
child: _LoginButton(
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
VRouter.of(context).to('login'),
|
VRouter.of(context).to('login'),
|
||||||
icon: const Icon(Icons.login_outlined),
|
icon: Icon(
|
||||||
|
CupertinoIcons.lock_open_fill,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.bodyText1
|
||||||
|
.color,
|
||||||
|
),
|
||||||
labelText: L10n.of(context).login,
|
labelText: L10n.of(context).login,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (controller.registrationSupported &&
|
if (controller.registrationSupported)
|
||||||
controller.passwordLoginSupported)
|
Center(
|
||||||
const SizedBox(width: 12),
|
|
||||||
if (controller.registrationSupported &&
|
|
||||||
// Registration is broken on matrix.org
|
|
||||||
Matrix.of(context)
|
|
||||||
.client
|
|
||||||
.homeserver
|
|
||||||
.host !=
|
|
||||||
'matrix-client.matrix.org')
|
|
||||||
Expanded(
|
|
||||||
child: _LoginButton(
|
child: _LoginButton(
|
||||||
onPressed: controller.signUpAction,
|
onPressed: controller.signUpAction,
|
||||||
icon:
|
icon: Icon(
|
||||||
const Icon(Icons.add_box_outlined),
|
CupertinoIcons.person_add,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.bodyText1
|
||||||
|
.color,
|
||||||
|
),
|
||||||
labelText: L10n.of(context).register,
|
labelText: L10n.of(context).register,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
.map(
|
.map(
|
||||||
(widget) => Container(
|
(widget) => Container(
|
||||||
@ -216,11 +215,10 @@ class _LoginButton extends StatelessWidget {
|
|||||||
return OutlinedButton.icon(
|
return OutlinedButton.icon(
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
minimumSize: const Size(256, 56),
|
minimumSize: const Size(256, 56),
|
||||||
side: BorderSide(
|
textStyle: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
color: Theme.of(context).textTheme.bodyText1.color,
|
backgroundColor: Theme.of(context).backgroundColor,
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(7)),
|
||||||
),
|
),
|
||||||
shape:
|
|
||||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(90))),
|
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
icon: icon,
|
icon: icon,
|
||||||
label: Text(
|
label: Text(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user