diff --git a/lib/route.dart b/lib/route.dart index e14ffea2..6261fc29 100644 --- a/lib/route.dart +++ b/lib/route.dart @@ -127,11 +127,6 @@ final routerProvider = Provider((ref) { return CallScreen(roomId: id); }, ), - GoRoute( - name: 'thought', - path: '/thought', - builder: (context, state) => const ThoughtScreen(), - ), GoRoute( name: 'logs', path: '/logs', @@ -466,6 +461,13 @@ final routerProvider = Provider((ref) { ], ), + // SN-chan tab + GoRoute( + name: 'thought', + path: '/thought', + builder: (context, state) => const ThoughtScreen(), + ), + // Creator hub tab GoRoute( name: 'creatorHub', diff --git a/lib/screens/tabs.dart b/lib/screens/tabs.dart index 2a164cbf..5ddb0084 100644 --- a/lib/screens/tabs.dart +++ b/lib/screens/tabs.dart @@ -24,6 +24,7 @@ const kTabRoutes = [ '/realms', '/account', '/files', + '/thought', '/creators', '/developers', ]; @@ -90,6 +91,10 @@ class TabsScreen extends HookConsumerWidget { label: 'files'.tr(), icon: const Icon(Symbols.folder_rounded), ), + NavigationDestination( + label: 'aiThought'.tr(), + icon: const Icon(Symbols.bubble_chart), + ), NavigationDestination( label: 'creatorHub'.tr(), icon: const Icon(Symbols.design_services_rounded), diff --git a/lib/screens/thought/think.dart b/lib/screens/thought/think.dart index 0aad99ad..678bd001 100644 --- a/lib/screens/thought/think.dart +++ b/lib/screens/thought/think.dart @@ -51,6 +51,7 @@ class ThoughtScreen extends HookConsumerWidget { isNoBackground: false, appBar: AppBar( title: Text(initialTopic ?? 'aiThought'.tr()), + leading: const PageBackButton(), actions: [ IconButton( icon: const Icon(Symbols.history), diff --git a/lib/widgets/navigation/fab_menu.dart b/lib/widgets/navigation/fab_menu.dart index 04e60b56..3e136947 100644 --- a/lib/widgets/navigation/fab_menu.dart +++ b/lib/widgets/navigation/fab_menu.dart @@ -6,6 +6,7 @@ import 'package:go_router/go_router.dart'; import 'package:island/pods/network.dart'; import 'package:island/screens/notification.dart'; import 'package:island/services/event_bus.dart'; +import 'package:island/services/responsive.dart'; import 'package:island/widgets/account/account_picker.dart'; import 'package:island/widgets/alert.dart'; import 'package:island/widgets/post/compose_sheet.dart'; @@ -51,15 +52,16 @@ class FabMenu extends HookConsumerWidget { late final Widget menuContent; final commonEntires = [ - ListTile( - contentPadding: const EdgeInsets.symmetric(horizontal: 24), - leading: const Icon(Symbols.bubble_chart), - title: Text('aiThoughtTitle').tr(), - onTap: () async { - Navigator.of(context).pop(); - context.pushNamed('thought'); - }, - ), + if (!isWideScreen(context)) + ListTile( + contentPadding: const EdgeInsets.symmetric(horizontal: 24), + leading: const Icon(Symbols.bubble_chart), + title: Text('aiThoughtTitle').tr(), + onTap: () async { + Navigator.of(context).pop(); + context.goNamed('thought'); + }, + ), Consumer( builder: (context, ref, _) { final notificationCount = ref.watch(