diff --git a/assets/l10n/intl_de.arb b/assets/l10n/intl_de.arb index 853f337b7..0fb6f2a45 100644 --- a/assets/l10n/intl_de.arb +++ b/assets/l10n/intl_de.arb @@ -2991,5 +2991,6 @@ "placeholders": { "number": {} } - } + }, + "newSpaceDescription": "Mit Spaces kannst du deine Chats zusammenfassen und private oder öffentliche Communities aufbauen." } diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb index c29d05705..6d0e93469 100644 --- a/assets/l10n/intl_en.arb +++ b/assets/l10n/intl_en.arb @@ -2258,11 +2258,7 @@ "senderName": {} } }, - "startYourFirstChat": "Start your first chat right now! 🙂\n- Tap on 'New chat'\n- Scan the QR code of a friend\n- Have fun chatting", - "@startYourFirstChat": { - "type": "text", - "placeholders": {} - }, + "startFirstChat": "Start your first chat", "status": "Status", "@status": { "type": "text", @@ -2982,5 +2978,6 @@ "placeholders": { "oldDisplayName": {} } - } + }, + "newSpaceDescription": "Spaces allows you to consolidate your chats and build private or public communities." } diff --git a/assets/private_chat_wallpaper.png b/assets/private_chat_wallpaper.png deleted file mode 100644 index f8e7c732c..000000000 Binary files a/assets/private_chat_wallpaper.png and /dev/null differ diff --git a/assets/start_chat.png b/assets/start_chat.png new file mode 100644 index 000000000..bb9dd5524 Binary files /dev/null and b/assets/start_chat.png differ diff --git a/lib/config/themes.dart b/lib/config/themes.dart index 720afe7e4..3029686ef 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -55,8 +55,11 @@ abstract class FluffyThemes { dividerColor: brightness == Brightness.light ? Colors.blueGrey.shade50 : Colors.blueGrey.shade900, - inputDecorationTheme: const InputDecorationTheme( - border: InputBorder.none, + inputDecorationTheme: InputDecorationTheme( + border: UnderlineInputBorder( + borderSide: BorderSide.none, + borderRadius: BorderRadius.circular(AppConfig.borderRadius), + ), filled: true, ), appBarTheme: AppBarTheme( diff --git a/lib/pages/chat_list/chat_list_body.dart b/lib/pages/chat_list/chat_list_body.dart index 19441d6b8..f7c8fc9af 100644 --- a/lib/pages/chat_list/chat_list_body.dart +++ b/lib/pages/chat_list/chat_list_body.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:animations/animations.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:matrix/matrix.dart'; +import 'package:vrouter/vrouter.dart'; import 'package:fluffychat/pages/chat_list/chat_list.dart'; import 'package:fluffychat/pages/chat_list/chat_list_item.dart'; @@ -172,28 +173,34 @@ class ChatListViewBody extends StatelessWidget { icon: const Icon(Icons.chat_outlined), ), if (rooms.isEmpty && !controller.isSearchMode) - Column( - key: const ValueKey(null), - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - Image.asset( - 'assets/private_chat_wallpaper.png', - width: 160, - height: 160, - ), - Center( - child: Text( - L10n.of(context)!.startYourFirstChat, - textAlign: TextAlign.start, - style: const TextStyle( - color: Colors.grey, - fontSize: 16, - ), + Padding( + padding: const EdgeInsets.all(32.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const SizedBox(height: 32), + Image.asset( + 'assets/start_chat.png', ), - ), - const SizedBox(height: 16), - ], + Divider( + height: 1, + color: Theme.of(context) + .colorScheme + .onBackground, + ), + const SizedBox(height: 32), + FloatingActionButton.extended( + backgroundColor: + Theme.of(context).colorScheme.primary, + foregroundColor: + Theme.of(context).colorScheme.onPrimary, + icon: const Icon(Icons.edit_outlined), + onPressed: () => + VRouter.of(context).to('/newprivatechat'), + label: Text(L10n.of(context)!.startFirstChat), + ), + ], + ), ), ], ); diff --git a/lib/pages/chat_list/chat_list_view.dart b/lib/pages/chat_list/chat_list_view.dart index 69a3700e2..806c5e936 100644 --- a/lib/pages/chat_list/chat_list_view.dart +++ b/lib/pages/chat_list/chat_list_view.dart @@ -234,7 +234,8 @@ class ChatListView extends StatelessWidget { destinations: getNavigationDestinations(context), ) : null, - floatingActionButton: selectMode == SelectMode.normal + floatingActionButton: controller.filteredRooms.isNotEmpty && + selectMode == SelectMode.normal ? KeyBoardShortcuts( keysToPress: { LogicalKeyboardKey.controlLeft, diff --git a/lib/pages/chat_list/start_chat_fab.dart b/lib/pages/chat_list/start_chat_fab.dart index 033ceb403..f7ef3d7fa 100644 --- a/lib/pages/chat_list/start_chat_fab.dart +++ b/lib/pages/chat_list/start_chat_fab.dart @@ -42,7 +42,7 @@ class StartChatFloatingActionButton extends StatelessWidget { switch (controller.activeFilter) { case ActiveFilter.allChats: case ActiveFilter.messages: - return L10n.of(context)!.newChat; + return L10n.of(context)!.start; case ActiveFilter.groups: return L10n.of(context)!.newGroup; case ActiveFilter.spaces: diff --git a/lib/pages/new_group/new_group_view.dart b/lib/pages/new_group/new_group_view.dart index 628ab9399..69b27355e 100644 --- a/lib/pages/new_group/new_group_view.dart +++ b/lib/pages/new_group/new_group_view.dart @@ -35,12 +35,16 @@ class NewGroupView extends StatelessWidget { ), ), SwitchListTile.adaptive( + secondary: const Icon(Icons.public_outlined), title: Text(L10n.of(context)!.groupIsPublic), value: controller.publicGroup, onChanged: controller.setPublicGroup, ), - Expanded( - child: Image.asset('assets/private_chat_wallpaper.png'), + SwitchListTile.adaptive( + secondary: const Icon(Icons.lock_outlined), + title: Text(L10n.of(context)!.enableEncryption), + value: !controller.publicGroup, + onChanged: null, ), ], ), diff --git a/lib/pages/new_space/new_space_view.dart b/lib/pages/new_space/new_space_view.dart index 7bbbd1a1f..750302eaf 100644 --- a/lib/pages/new_space/new_space_view.dart +++ b/lib/pages/new_space/new_space_view.dart @@ -39,8 +39,12 @@ class NewSpaceView extends StatelessWidget { value: controller.publicGroup, onChanged: controller.setPublicGroup, ), - Expanded( - child: Image.asset('assets/private_chat_wallpaper.png'), + ListTile( + trailing: const Padding( + padding: EdgeInsets.symmetric(horizontal: 16.0), + child: Icon(Icons.info_outlined), + ), + subtitle: Text(L10n.of(context)!.newSpaceDescription), ), ], ), diff --git a/lib/widgets/layouts/empty_page.dart b/lib/widgets/layouts/empty_page.dart index b317ab3b4..535e4a9fe 100644 --- a/lib/widgets/layouts/empty_page.dart +++ b/lib/widgets/layouts/empty_page.dart @@ -8,7 +8,7 @@ class EmptyPage extends StatelessWidget { const EmptyPage({this.loading = false, Key? key}) : super(key: key); @override Widget build(BuildContext context) { - final width = min(MediaQuery.of(context).size.width, EmptyPage._width); + final width = min(MediaQuery.of(context).size.width, EmptyPage._width) / 2; return Scaffold( // Add invisible appbar to make status bar on Android tablets bright. appBar: AppBar( @@ -24,7 +24,7 @@ class EmptyPage extends StatelessWidget { child: Hero( tag: 'info-logo', child: Image.asset( - 'assets/info-logo.png', + 'assets/favicon.png', width: width, height: width, filterQuality: FilterQuality.medium,