|
|
|
@ -59,6 +59,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: '/home',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const HomeserverPicker(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedInRedirect,
|
|
|
|
@ -67,6 +68,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'login',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const Login(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedInRedirect,
|
|
|
|
@ -77,12 +79,14 @@ abstract class AppRoutes {
|
|
|
|
|
path: '/logs',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const LogViewer(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ShellRoute(
|
|
|
|
|
pageBuilder: (context, state, child) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
FluffyThemes.isColumnMode(context) &&
|
|
|
|
|
state.fullPath?.startsWith('/rooms/settings') == false
|
|
|
|
|
? TwoColumnLayout(
|
|
|
|
@ -103,6 +107,7 @@ abstract class AppRoutes {
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
FluffyThemes.isColumnMode(context)
|
|
|
|
|
? const EmptyPage()
|
|
|
|
|
: ChatList(
|
|
|
|
@ -114,6 +119,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'archive',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const Archive(),
|
|
|
|
|
),
|
|
|
|
|
routes: [
|
|
|
|
@ -121,6 +127,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: ':roomid',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
ChatPage(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
@ -134,6 +141,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'newprivatechat',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const NewPrivateChat(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -142,6 +150,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'newgroup',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const NewGroup(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -150,6 +159,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'newspace',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const NewSpace(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -157,6 +167,7 @@ abstract class AppRoutes {
|
|
|
|
|
ShellRoute(
|
|
|
|
|
pageBuilder: (context, state, child) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
FluffyThemes.isColumnMode(context)
|
|
|
|
|
? TwoColumnLayout(
|
|
|
|
|
mainView: const Settings(),
|
|
|
|
@ -170,6 +181,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'settings',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
FluffyThemes.isColumnMode(context)
|
|
|
|
|
? const EmptyPage()
|
|
|
|
|
: const Settings(),
|
|
|
|
@ -179,6 +191,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'notifications',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const SettingsNotifications(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -187,6 +200,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'style',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const SettingsStyle(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -195,6 +209,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'devices',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const DevicesSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -203,6 +218,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'chat',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const SettingsChat(),
|
|
|
|
|
),
|
|
|
|
|
routes: [
|
|
|
|
@ -210,6 +226,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'emotes',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const EmotesSettings(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -221,6 +238,7 @@ abstract class AppRoutes {
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const HomeserverPicker(),
|
|
|
|
|
),
|
|
|
|
|
routes: [
|
|
|
|
@ -228,6 +246,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'login',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const Login(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -239,6 +258,7 @@ abstract class AppRoutes {
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const SettingsSecurity(),
|
|
|
|
|
),
|
|
|
|
|
routes: [
|
|
|
|
@ -247,6 +267,7 @@ abstract class AppRoutes {
|
|
|
|
|
pageBuilder: (context, state) {
|
|
|
|
|
return defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const SettingsPassword(),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
@ -257,6 +278,7 @@ abstract class AppRoutes {
|
|
|
|
|
pageBuilder: (context, state) {
|
|
|
|
|
return defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
SettingsIgnoreList(
|
|
|
|
|
initialUserId: state.extra?.toString(),
|
|
|
|
|
),
|
|
|
|
@ -268,6 +290,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: '3pid',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const Settings3Pid(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -283,6 +306,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: ':roomid',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
ChatPage(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
shareText: state.uri.queryParameters['body'],
|
|
|
|
@ -294,6 +318,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'encryption',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const ChatEncryptionSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -302,6 +327,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'invite',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
InvitationSelection(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
@ -312,6 +338,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'details',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
ChatDetails(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
@ -321,6 +348,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'members',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
ChatMembersPage(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
@ -331,6 +359,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'permissions',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const ChatPermissionsSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -339,6 +368,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'invite',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
InvitationSelection(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
@ -349,6 +379,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'multiple_emotes',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const MultipleEmotesSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -357,6 +388,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'emotes',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const EmotesSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -365,6 +397,7 @@ abstract class AppRoutes {
|
|
|
|
|
path: 'emotes/:state_key',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
state,
|
|
|
|
|
const EmotesSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
@ -380,13 +413,23 @@ abstract class AppRoutes {
|
|
|
|
|
),
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
static Page defaultPageBuilder(BuildContext context, Widget child) =>
|
|
|
|
|
static Page defaultPageBuilder(
|
|
|
|
|
BuildContext context,
|
|
|
|
|
GoRouterState state,
|
|
|
|
|
Widget child,
|
|
|
|
|
) =>
|
|
|
|
|
FluffyThemes.isColumnMode(context)
|
|
|
|
|
? CustomTransitionPage(
|
|
|
|
|
key: state.pageKey,
|
|
|
|
|
restorationId: state.pageKey.value,
|
|
|
|
|
child: child,
|
|
|
|
|
transitionsBuilder:
|
|
|
|
|
(context, animation, secondaryAnimation, child) =>
|
|
|
|
|
FadeTransition(opacity: animation, child: child),
|
|
|
|
|
)
|
|
|
|
|
: MaterialPage(child: child);
|
|
|
|
|
: MaterialPage(
|
|
|
|
|
key: state.pageKey,
|
|
|
|
|
restorationId: state.pageKey.value,
|
|
|
|
|
child: child,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|