mirror of
https://github.com/krille-chan/fluffychat
synced 2024-10-10 03:03:38 +00:00
design: Adjust new chat page design
This commit is contained in:
parent
d0e4aec4d6
commit
9c24547b7f
1 changed files with 24 additions and 29 deletions
|
@ -30,10 +30,10 @@ class NewPrivateChatView extends StatelessWidget {
|
||||||
title: Text(L10n.of(context)!.newChat),
|
title: Text(L10n.of(context)!.newChat),
|
||||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
TextButton(
|
||||||
onPressed:
|
onPressed:
|
||||||
UrlLauncher(context, AppConfig.startChatTutorial).launchUrl,
|
UrlLauncher(context, AppConfig.startChatTutorial).launchUrl,
|
||||||
icon: const Icon(Icons.info_outlined),
|
child: Text(L10n.of(context)!.help),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -42,7 +42,10 @@ class NewPrivateChatView extends StatelessWidget {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 16.0,
|
||||||
|
vertical: 8.0,
|
||||||
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: controller.controller,
|
controller: controller.controller,
|
||||||
onChanged: controller.searchUsers,
|
onChanged: controller.searchUsers,
|
||||||
|
@ -88,8 +91,9 @@ class NewPrivateChatView extends StatelessWidget {
|
||||||
: CrossFadeState.showSecond,
|
: CrossFadeState.showSecond,
|
||||||
firstChild: ListView(
|
firstChild: ListView(
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
Padding(
|
||||||
title: SelectableText.rich(
|
padding: const EdgeInsets.symmetric(horizontal: 18.0),
|
||||||
|
child: SelectableText.rich(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
|
@ -104,33 +108,12 @@ class NewPrivateChatView extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
Theme.of(context).colorScheme.onPrimaryContainer,
|
fontSize: 13,
|
||||||
fontSize: 14,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
trailing: IconButton(
|
|
||||||
icon: Icon(
|
|
||||||
Icons.copy_outlined,
|
|
||||||
size: 16,
|
|
||||||
color:
|
|
||||||
Theme.of(context).colorScheme.onPrimaryContainer,
|
|
||||||
),
|
|
||||||
onPressed: controller.copyUserId,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (PlatformInfos.isMobile)
|
|
||||||
ListTile(
|
|
||||||
leading: CircleAvatar(
|
|
||||||
backgroundColor:
|
|
||||||
Theme.of(context).colorScheme.primaryContainer,
|
|
||||||
foregroundColor:
|
|
||||||
Theme.of(context).colorScheme.onPrimaryContainer,
|
|
||||||
child: const Icon(Icons.qr_code_scanner_outlined),
|
|
||||||
),
|
|
||||||
title: Text(L10n.of(context)!.scanQrCode),
|
|
||||||
onTap: controller.openScannerAction,
|
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
|
@ -153,6 +136,18 @@ class NewPrivateChatView extends StatelessWidget {
|
||||||
title: Text(L10n.of(context)!.createGroup),
|
title: Text(L10n.of(context)!.createGroup),
|
||||||
onTap: () => context.go('/rooms/newgroup'),
|
onTap: () => context.go('/rooms/newgroup'),
|
||||||
),
|
),
|
||||||
|
if (PlatformInfos.isMobile)
|
||||||
|
ListTile(
|
||||||
|
leading: CircleAvatar(
|
||||||
|
backgroundColor:
|
||||||
|
Theme.of(context).colorScheme.primaryContainer,
|
||||||
|
foregroundColor:
|
||||||
|
Theme.of(context).colorScheme.onPrimaryContainer,
|
||||||
|
child: const Icon(Icons.qr_code_scanner_outlined),
|
||||||
|
),
|
||||||
|
title: Text(L10n.of(context)!.scanQrCode),
|
||||||
|
onTap: controller.openScannerAction,
|
||||||
|
),
|
||||||
Center(
|
Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(64.0),
|
padding: const EdgeInsets.all(64.0),
|
||||||
|
|
Loading…
Reference in a new issue