|
|
|
@ -138,17 +138,6 @@ abstract class AppRoutes {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'spaces/:roomid',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
ChatDetails(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
routes: _chatDetailsRoutes,
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'archive',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
@ -213,203 +202,201 @@ abstract class AppRoutes {
|
|
|
|
|
? const EmptyPage()
|
|
|
|
|
: const Settings(),
|
|
|
|
|
),
|
|
|
|
|
routes: _settingsRoutes,
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
routes: [
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: ':roomid',
|
|
|
|
|
path: 'notifications',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
ChatPage(roomId: state.pathParameters['roomid']!),
|
|
|
|
|
const SettingsNotifications(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
routes: [
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'encryption',
|
|
|
|
|
path: 'style',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const ChatEncryptionSettings(),
|
|
|
|
|
const SettingsStyle(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'invite',
|
|
|
|
|
path: 'devices',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
InvitationSelection(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
|
const DevicesSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'details',
|
|
|
|
|
path: 'chat',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
ChatDetails(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
routes: _chatDetailsRoutes,
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
const SettingsChat(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
routes: [
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'emotes',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const EmotesSettings(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
static final List<RouteBase> _chatDetailsRoutes = [
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'members',
|
|
|
|
|
path: 'addaccount',
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
ChatMembersPage(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
const HomeserverPicker(),
|
|
|
|
|
),
|
|
|
|
|
routes: [
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'permissions',
|
|
|
|
|
path: 'login',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const ChatPermissionsSettings(),
|
|
|
|
|
const Login(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'invite',
|
|
|
|
|
path: 'security',
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
InvitationSelection(roomId: state.pathParameters['roomid']!),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
const SettingsSecurity(),
|
|
|
|
|
),
|
|
|
|
|
routes: [
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'multiple_emotes',
|
|
|
|
|
path: 'stories',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const MultipleEmotesSettings(),
|
|
|
|
|
const SettingsStories(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'emotes',
|
|
|
|
|
path: 'ignorelist',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const EmotesSettings(),
|
|
|
|
|
const SettingsIgnoreList(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'emotes/:state_key',
|
|
|
|
|
path: '3pid',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const EmotesSettings(),
|
|
|
|
|
const Settings3Pid(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
static final List<RouteBase> _settingsRoutes = [
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'notifications',
|
|
|
|
|
path: ':roomid',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const SettingsNotifications(),
|
|
|
|
|
ChatPage(roomId: state.pathParameters['roomid']!),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
routes: [
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'style',
|
|
|
|
|
path: 'encryption',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const SettingsStyle(),
|
|
|
|
|
const ChatEncryptionSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'devices',
|
|
|
|
|
path: 'invite',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const DevicesSettings(),
|
|
|
|
|
InvitationSelection(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'chat',
|
|
|
|
|
path: 'details',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const SettingsChat(),
|
|
|
|
|
ChatDetails(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
routes: [
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'emotes',
|
|
|
|
|
path: 'members',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const EmotesSettings(),
|
|
|
|
|
ChatMembersPage(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'addaccount',
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
path: 'permissions',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const HomeserverPicker(),
|
|
|
|
|
const ChatPermissionsSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
routes: [
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'login',
|
|
|
|
|
path: 'invite',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const Login(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
InvitationSelection(
|
|
|
|
|
roomId: state.pathParameters['roomid']!,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'security',
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const SettingsSecurity(),
|
|
|
|
|
),
|
|
|
|
|
routes: [
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'stories',
|
|
|
|
|
path: 'multiple_emotes',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const SettingsStories(),
|
|
|
|
|
const MultipleEmotesSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: 'ignorelist',
|
|
|
|
|
path: 'emotes',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const SettingsIgnoreList(),
|
|
|
|
|
const EmotesSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
GoRoute(
|
|
|
|
|
path: '3pid',
|
|
|
|
|
path: 'emotes/:state_key',
|
|
|
|
|
pageBuilder: (context, state) => defaultPageBuilder(
|
|
|
|
|
context,
|
|
|
|
|
const Settings3Pid(),
|
|
|
|
|
const EmotesSettings(),
|
|
|
|
|
),
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
redirect: loggedOutRedirect,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
static Page defaultPageBuilder(BuildContext context, Widget child) =>
|
|
|
|
|