mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-24 14:32:37 +01:00
chore: Adjust onboarding design
This commit is contained in:
parent
7da70ebeba
commit
d930b569fc
BIN
assets/banner_transparent.png
Normal file
BIN
assets/banner_transparent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
@ -2985,5 +2985,6 @@
|
||||
"endToEndEncryption": "End to end encryption",
|
||||
"disableEncryptionWarning": "For security reasons you can not disable encryption in a chat, where it has been enabled before.",
|
||||
"sorryThatsNotPossible": "Sorry... that is not possible",
|
||||
"deviceKeys": "Device keys:"
|
||||
"deviceKeys": "Device keys:",
|
||||
"letsStart": "Let's start"
|
||||
}
|
||||
|
@ -40,9 +40,12 @@ class ConnectPageView extends StatelessWidget {
|
||||
elevation: Theme.of(context)
|
||||
.appBarTheme
|
||||
.scrolledUnderElevation ??
|
||||
4,
|
||||
10,
|
||||
color: Colors.transparent,
|
||||
shadowColor: Theme.of(context).appBarTheme.shadowColor,
|
||||
shadowColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.onBackground
|
||||
.withAlpha(64),
|
||||
clipBehavior: Clip.hardEdge,
|
||||
child: CircleAvatar(
|
||||
radius: 64,
|
||||
@ -103,13 +106,14 @@ class ConnectPageView extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Hero(
|
||||
tag: 'loginButton',
|
||||
child: ElevatedButton(
|
||||
child: ElevatedButton.icon(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
onPressed: controller.loading ? () {} : controller.signUp,
|
||||
child: controller.loading
|
||||
icon: const Icon(Icons.person_add_outlined),
|
||||
label: controller.loading
|
||||
? const LinearProgressIndicator()
|
||||
: Text(L10n.of(context)!.signUp),
|
||||
),
|
||||
@ -198,7 +202,8 @@ class ConnectPageView extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Hero(
|
||||
tag: 'signinButton',
|
||||
child: ElevatedButton(
|
||||
child: ElevatedButton.icon(
|
||||
icon: const Icon(Icons.login_outlined),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.primaryContainer,
|
||||
@ -206,7 +211,7 @@ class ConnectPageView extends StatelessWidget {
|
||||
Theme.of(context).colorScheme.onPrimaryContainer,
|
||||
),
|
||||
onPressed: controller.loading ? () {} : controller.login,
|
||||
child: Text(L10n.of(context)!.login),
|
||||
label: Text(L10n.of(context)!.login),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -48,75 +48,68 @@ class HomeserverPickerView extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
if (controller.displayServerList)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Material(
|
||||
borderRadius:
|
||||
BorderRadius.circular(AppConfig.borderRadius),
|
||||
color: Theme.of(context).colorScheme.onInverseSurface,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
child: benchmarkResults == null
|
||||
? const Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(12.0),
|
||||
child: CircularProgressIndicator.adaptive(),
|
||||
))
|
||||
: Column(
|
||||
children: controller.filteredHomeservers
|
||||
.map(
|
||||
(server) => ListTile(
|
||||
trailing: IconButton(
|
||||
icon: const Icon(
|
||||
Icons.info_outlined,
|
||||
color: Colors.black,
|
||||
),
|
||||
onPressed: () =>
|
||||
controller.showServerInfo(server),
|
||||
),
|
||||
onTap: () => controller.setServer(
|
||||
server.homeserver.baseUrl.host),
|
||||
title: Text(
|
||||
server.homeserver.baseUrl.host,
|
||||
style: const TextStyle(
|
||||
color: Colors.black),
|
||||
),
|
||||
subtitle: Text(
|
||||
server.homeserver.description ?? '',
|
||||
style: TextStyle(
|
||||
color: Colors.grey.shade700),
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
child: controller.displayServerList
|
||||
? ListView(
|
||||
children: [
|
||||
if (controller.displayServerList)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Material(
|
||||
borderRadius:
|
||||
BorderRadius.circular(AppConfig.borderRadius),
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onInverseSurface,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
child: benchmarkResults == null
|
||||
? const Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(12.0),
|
||||
child:
|
||||
CircularProgressIndicator.adaptive(),
|
||||
))
|
||||
: Column(
|
||||
children: controller.filteredHomeservers
|
||||
.map(
|
||||
(server) => ListTile(
|
||||
trailing: IconButton(
|
||||
icon: const Icon(
|
||||
Icons.info_outlined,
|
||||
color: Colors.black,
|
||||
),
|
||||
onPressed: () => controller
|
||||
.showServerInfo(server),
|
||||
),
|
||||
onTap: () => controller.setServer(
|
||||
server
|
||||
.homeserver.baseUrl.host),
|
||||
title: Text(
|
||||
server.homeserver.baseUrl.host,
|
||||
style: const TextStyle(
|
||||
color: Colors.black),
|
||||
),
|
||||
subtitle: Text(
|
||||
server.homeserver.description ??
|
||||
'',
|
||||
style: TextStyle(
|
||||
color:
|
||||
Colors.grey.shade700),
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
else ...[
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
height: 200,
|
||||
: Container(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Image.asset(
|
||||
'assets/info-logo.png',
|
||||
'assets/banner_transparent.png',
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
AppConfig.applicationWelcomeMessage ??
|
||||
L10n.of(context)!.welcomeText,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 20),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
SafeArea(
|
||||
child: Container(
|
||||
@ -126,21 +119,17 @@ class HomeserverPickerView extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor:
|
||||
Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
onPressed: controller.restoreBackup,
|
||||
child: Text(L10n.of(context)!.hydrate),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => launch(AppConfig.privacyUrl),
|
||||
child: Text(L10n.of(context)!.privacy),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: controller.restoreBackup,
|
||||
child: Text(L10n.of(context)!.hydrate),
|
||||
),
|
||||
Hero(
|
||||
tag: 'loginButton',
|
||||
child: ElevatedButton(
|
||||
child: ElevatedButton.icon(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.primary,
|
||||
@ -150,9 +139,10 @@ class HomeserverPickerView extends StatelessWidget {
|
||||
onPressed: controller.isLoading
|
||||
? null
|
||||
: controller.checkHomeserverAction,
|
||||
child: controller.isLoading
|
||||
icon: const Icon(Icons.start_outlined),
|
||||
label: controller.isLoading
|
||||
? const LinearProgressIndicator()
|
||||
: Text(L10n.of(context)!.connect),
|
||||
: Text(L10n.of(context)!.letsStart),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -82,7 +82,7 @@ class LoginView extends StatelessWidget {
|
||||
tag: 'signinButton',
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: ElevatedButton(
|
||||
child: ElevatedButton.icon(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||
@ -90,7 +90,8 @@ class LoginView extends StatelessWidget {
|
||||
onPressed: controller.loading
|
||||
? null
|
||||
: () => controller.login(context),
|
||||
child: controller.loading
|
||||
icon: const Icon(Icons.login_outlined),
|
||||
label: controller.loading
|
||||
? const LinearProgressIndicator()
|
||||
: Text(L10n.of(context)!.login),
|
||||
),
|
||||
@ -124,14 +125,15 @@ class LoginView extends StatelessWidget {
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: ElevatedButton(
|
||||
child: ElevatedButton.icon(
|
||||
onPressed:
|
||||
controller.loading ? () {} : controller.passwordForgotten,
|
||||
style: ElevatedButton.styleFrom(
|
||||
foregroundColor: Theme.of(context).colorScheme.error,
|
||||
backgroundColor: Theme.of(context).colorScheme.onError,
|
||||
),
|
||||
child: Text(L10n.of(context)!.passwordForgotten),
|
||||
icon: const Icon(Icons.safety_check_outlined),
|
||||
label: Text(L10n.of(context)!.passwordForgotten),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -94,13 +94,14 @@ class SignupPageView extends StatelessWidget {
|
||||
tag: 'loginButton',
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: ElevatedButton(
|
||||
child: ElevatedButton.icon(
|
||||
icon: const Icon(Icons.person_add_outlined),
|
||||
style: ElevatedButton.styleFrom(
|
||||
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
onPressed: controller.loading ? () {} : controller.signup,
|
||||
child: controller.loading
|
||||
label: controller.loading
|
||||
? const LinearProgressIndicator()
|
||||
: Text(L10n.of(context)!.signUp),
|
||||
),
|
||||
|
@ -43,21 +43,20 @@ class LoginScaffold extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: Material(
|
||||
color: Theme.of(context).brightness == Brightness.light
|
||||
? Theme.of(context).scaffoldBackgroundColor.withOpacity(0.9)
|
||||
: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.75),
|
||||
borderRadius: isMobileMode
|
||||
? null
|
||||
: BorderRadius.circular(AppConfig.borderRadius),
|
||||
elevation: isMobileMode ? 0 : 10,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
shadowColor: Colors.black,
|
||||
child: ConstrainedBox(
|
||||
constraints: isMobileMode
|
||||
? const BoxConstraints()
|
||||
: const BoxConstraints(maxWidth: 480, maxHeight: 640),
|
||||
child: scaffold,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Material(
|
||||
color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.925),
|
||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||
clipBehavior: Clip.hardEdge,
|
||||
elevation: 10,
|
||||
shadowColor: Colors.black,
|
||||
child: ConstrainedBox(
|
||||
constraints: isMobileMode
|
||||
? const BoxConstraints()
|
||||
: const BoxConstraints(maxWidth: 480, maxHeight: 640),
|
||||
child: scaffold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user