Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TW-613: Add Settings to navigator bottom and hide Stories #661

Merged
merged 5 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions assets/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2696,7 +2696,8 @@
"askToInvite": " wants you to join this chat. What do you say?",
"select" : "Select",
"copyMessageText" : "Copy message text",
"pinMessage" : "Pin message",
"pinThisMessage" : "Pin this message",
"unpinThisMessage" : "Unpin this message",
"add": "Add",
"addMembers": "Add members",
"chatInfo": "Chat info",
Expand Down Expand Up @@ -2725,5 +2726,13 @@
"errorPageTitle": "Something's not right",
"errorPageDescription": "That page doesn't exist.",
"errorPageButton": "Back to chat",
"playVideo": "Play"
"playVideo": "Play",
"done": "Done",
"markThisMessageAsRead": "Mark this message as read",
"markThisMessageAsUnRead": "Mark this message as unread",
"muteThisMessage": "Mute this message",
"unmuteThisMessage": "Unmute this message",
"read": "Read",
"unread": "Unread",
"unmute": "Unmute"
}
191 changes: 82 additions & 109 deletions lib/config/go_routes/go_router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import 'package:fluffychat/pages/invitation_selection/invitation_selection.dart'
import 'package:fluffychat/pages/login/login.dart';
import 'package:fluffychat/pages/new_group/new_group.dart';
import 'package:fluffychat/pages/new_private_chat/new_private_chat.dart';
import 'package:fluffychat/pages/settings/settings.dart';
import 'package:fluffychat/pages/settings_3pid/settings_3pid.dart';
import 'package:fluffychat/pages/settings_chat/settings_chat.dart';
import 'package:fluffychat/pages/settings_emotes/settings_emotes.dart';
Expand Down Expand Up @@ -244,121 +243,95 @@ abstract class AppRoutes {
);
},
),
ShellRoute(
pageBuilder: (context, state, child) => defaultPageBuilder(
GoRoute(
path: 'notifications',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const SettingsNotifications(),
),
redirect: loggedOutRedirect,
),
GoRoute(
path: 'style',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const SettingsStyle(),
),
redirect: loggedOutRedirect,
),
GoRoute(
path: 'devices',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const DevicesSettings(),
),
redirect: loggedOutRedirect,
),
GoRoute(
path: 'chat',
pageBuilder: (context, state) => defaultPageBuilder(
context,
!_responsive.isMobile(context)
? AdaptiveScaffoldRoute(
displayAppBar: false,
body: const Settings(),
secondaryBody: child,
)
: child,
const SettingsChat(),
),
routes: [
GoRoute(
path: 'settings',
path: 'emotes',
pageBuilder: (context, state) => defaultPageBuilder(
context,
!_responsive.isMobile(context)
? const ChatBlank()
: const Settings(),
const EmotesSettings(),
),
),
],
redirect: loggedOutRedirect,
),
GoRoute(
path: 'addaccount',
redirect: loggedOutRedirect,
pageBuilder: (context, state) => defaultPageBuilder(
context,
const HomeserverPicker(),
),
routes: [
GoRoute(
path: 'login',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const Login(),
),
redirect: loggedOutRedirect,
),
],
),
GoRoute(
path: 'security',
redirect: loggedOutRedirect,
pageBuilder: (context, state) => defaultPageBuilder(
context,
const SettingsSecurity(),
),
routes: [
GoRoute(
path: 'stories',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const SettingsStories(),
),
redirect: loggedOutRedirect,
),
GoRoute(
path: 'ignorelist',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const SettingsIgnoreList(),
),
redirect: loggedOutRedirect,
),
GoRoute(
path: '3pid',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const Settings3Pid(),
),
routes: [
GoRoute(
path: 'notifications',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const SettingsNotifications(),
),
redirect: loggedOutRedirect,
),
GoRoute(
path: 'style',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const SettingsStyle(),
),
redirect: loggedOutRedirect,
),
GoRoute(
path: 'devices',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const DevicesSettings(),
),
redirect: loggedOutRedirect,
),
GoRoute(
path: 'chat',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const SettingsChat(),
),
routes: [
GoRoute(
path: 'emotes',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const EmotesSettings(),
),
),
],
redirect: loggedOutRedirect,
),
GoRoute(
path: 'addaccount',
redirect: loggedOutRedirect,
pageBuilder: (context, state) => defaultPageBuilder(
context,
const HomeserverPicker(),
),
routes: [
GoRoute(
path: 'login',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const Login(),
),
redirect: loggedOutRedirect,
),
],
),
GoRoute(
path: 'security',
redirect: loggedOutRedirect,
pageBuilder: (context, state) => defaultPageBuilder(
context,
const SettingsSecurity(),
),
routes: [
GoRoute(
path: 'stories',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const SettingsStories(),
),
redirect: loggedOutRedirect,
),
GoRoute(
path: 'ignorelist',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const SettingsIgnoreList(),
),
redirect: loggedOutRedirect,
),
GoRoute(
path: '3pid',
pageBuilder: (context, state) => defaultPageBuilder(
context,
const Settings3Pid(),
),
redirect: loggedOutRedirect,
),
],
),
],
redirect: loggedOutRedirect,
),
],
Expand Down
Loading