2020-06-15 14:00:46 +00:00
|
|
|
import React from 'react';
|
2020-11-30 21:47:05 +00:00
|
|
|
import { I18nManager } from 'react-native';
|
2021-12-03 19:27:57 +00:00
|
|
|
import { createStackNavigator, StackNavigationOptions } from '@react-navigation/stack';
|
2020-06-15 14:00:46 +00:00
|
|
|
import { createDrawerNavigator } from '@react-navigation/drawer';
|
|
|
|
|
|
|
|
import { ThemeContext } from '../theme';
|
2022-06-06 14:17:51 +00:00
|
|
|
import { ModalAnimation, StackAnimation, defaultHeader, themedHeader } from '../lib/methods/helpers/navigation';
|
2020-06-15 14:00:46 +00:00
|
|
|
import Sidebar from '../views/SidebarView';
|
|
|
|
// Chats Stack
|
|
|
|
import RoomView from '../views/RoomView';
|
|
|
|
import RoomsListView from '../views/RoomsListView';
|
|
|
|
import RoomActionsView from '../views/RoomActionsView';
|
|
|
|
import RoomInfoView from '../views/RoomInfoView';
|
|
|
|
import RoomInfoEditView from '../views/RoomInfoEditView';
|
|
|
|
import RoomMembersView from '../views/RoomMembersView';
|
|
|
|
import SearchMessagesView from '../views/SearchMessagesView';
|
|
|
|
import SelectedUsersView from '../views/SelectedUsersView';
|
|
|
|
import InviteUsersView from '../views/InviteUsersView';
|
|
|
|
import InviteUsersEditView from '../views/InviteUsersEditView';
|
|
|
|
import MessagesView from '../views/MessagesView';
|
|
|
|
import AutoTranslateView from '../views/AutoTranslateView';
|
|
|
|
import DirectoryView from '../views/DirectoryView';
|
|
|
|
import NotificationPrefView from '../views/NotificationPreferencesView';
|
|
|
|
import ForwardLivechatView from '../views/ForwardLivechatView';
|
2022-07-15 20:06:27 +00:00
|
|
|
import CloseLivechatView from '../views/CloseLivechatView';
|
2020-06-15 14:00:46 +00:00
|
|
|
import LivechatEditView from '../views/LivechatEditView';
|
|
|
|
import PickerView from '../views/PickerView';
|
|
|
|
import ThreadMessagesView from '../views/ThreadMessagesView';
|
2021-04-07 18:31:25 +00:00
|
|
|
import TeamChannelsView from '../views/TeamChannelsView';
|
2020-06-15 14:00:46 +00:00
|
|
|
import MarkdownTableView from '../views/MarkdownTableView';
|
|
|
|
import ReadReceiptsView from '../views/ReadReceiptView';
|
2021-09-22 17:29:26 +00:00
|
|
|
import CannedResponsesListView from '../views/CannedResponsesListView';
|
|
|
|
import CannedResponseDetail from '../views/CannedResponseDetail';
|
2022-04-07 14:10:03 +00:00
|
|
|
import { themes } from '../lib/constants';
|
2020-06-15 14:00:46 +00:00
|
|
|
// Profile Stack
|
|
|
|
import ProfileView from '../views/ProfileView';
|
2020-08-21 18:14:06 +00:00
|
|
|
import UserPreferencesView from '../views/UserPreferencesView';
|
|
|
|
import UserNotificationPrefView from '../views/UserNotificationPreferencesView';
|
2021-10-06 20:30:10 +00:00
|
|
|
// Display Preferences View
|
|
|
|
import DisplayPrefsView from '../views/DisplayPrefsView';
|
2020-06-15 14:00:46 +00:00
|
|
|
// Settings Stack
|
|
|
|
import SettingsView from '../views/SettingsView';
|
2020-10-30 18:31:04 +00:00
|
|
|
import SecurityPrivacyView from '../views/SecurityPrivacyView';
|
|
|
|
import E2EEncryptionSecurityView from '../views/E2EEncryptionSecurityView';
|
2020-06-15 14:00:46 +00:00
|
|
|
import LanguageView from '../views/LanguageView';
|
|
|
|
import ThemeView from '../views/ThemeView';
|
|
|
|
import DefaultBrowserView from '../views/DefaultBrowserView';
|
|
|
|
import ScreenLockConfigView from '../views/ScreenLockConfigView';
|
|
|
|
// Admin Stack
|
|
|
|
import AdminPanelView from '../views/AdminPanelView';
|
|
|
|
// NewMessage Stack
|
|
|
|
import NewMessageView from '../views/NewMessageView';
|
|
|
|
import CreateChannelView from '../views/CreateChannelView';
|
2020-09-11 14:31:38 +00:00
|
|
|
// E2ESaveYourPassword Stack
|
|
|
|
import E2ESaveYourPasswordView from '../views/E2ESaveYourPasswordView';
|
|
|
|
import E2EHowItWorksView from '../views/E2EHowItWorksView';
|
|
|
|
// E2EEnterYourPassword Stack
|
|
|
|
import E2EEnterYourPasswordView from '../views/E2EEnterYourPasswordView';
|
2020-06-15 14:00:46 +00:00
|
|
|
// InsideStackNavigator
|
|
|
|
import AttachmentView from '../views/AttachmentView';
|
|
|
|
import ModalBlockView from '../views/ModalBlockView';
|
|
|
|
import JitsiMeetView from '../views/JitsiMeetView';
|
|
|
|
import StatusView from '../views/StatusView';
|
2020-06-26 20:22:56 +00:00
|
|
|
import ShareView from '../views/ShareView';
|
2020-06-15 14:00:46 +00:00
|
|
|
import CreateDiscussionView from '../views/CreateDiscussionView';
|
2020-08-28 19:41:08 +00:00
|
|
|
import QueueListView from '../ee/omnichannel/views/QueueListView';
|
[NEW] Add/Create/Remove channel on a team (#3090)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* One way to refactor :P
* Next level refactor :)
* Fix create group dm
* Refactor renderItem
* Minor bug fixes
* Fix stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-05-19 21:14:42 +00:00
|
|
|
import AddChannelTeamView from '../views/AddChannelTeamView';
|
|
|
|
import AddExistingChannelView from '../views/AddExistingChannelView';
|
[NEW] Leave Teams (#3116)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Minor tweak
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Lint
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-05-25 18:04:05 +00:00
|
|
|
import SelectListView from '../views/SelectListView';
|
2021-09-16 18:16:02 +00:00
|
|
|
import DiscussionsView from '../views/DiscussionsView';
|
2021-12-03 19:27:57 +00:00
|
|
|
import {
|
|
|
|
AdminPanelStackParamList,
|
|
|
|
ChatsStackParamList,
|
|
|
|
DisplayPrefStackParamList,
|
|
|
|
DrawerParamList,
|
|
|
|
E2EEnterYourPasswordStackParamList,
|
|
|
|
E2ESaveYourPasswordStackParamList,
|
|
|
|
InsideStackParamList,
|
|
|
|
NewMessageStackParamList,
|
|
|
|
ProfileStackParamList,
|
|
|
|
SettingsStackParamList
|
|
|
|
} from './types';
|
2020-08-28 19:41:08 +00:00
|
|
|
|
2020-06-15 14:00:46 +00:00
|
|
|
// ChatsStackNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const ChatsStack = createStackNavigator<ChatsStackParamList>();
|
2020-06-15 14:00:46 +00:00
|
|
|
const ChatsStackNavigator = () => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
return (
|
2021-12-03 19:27:57 +00:00
|
|
|
<ChatsStack.Navigator
|
2022-08-08 21:02:08 +00:00
|
|
|
screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...StackAnimation } as StackNavigationOptions}
|
|
|
|
>
|
2021-09-13 20:41:05 +00:00
|
|
|
<ChatsStack.Screen name='RoomsListView' component={RoomsListView} />
|
|
|
|
<ChatsStack.Screen name='RoomView' component={RoomView} />
|
|
|
|
<ChatsStack.Screen name='RoomActionsView' component={RoomActionsView} options={RoomActionsView.navigationOptions} />
|
|
|
|
<ChatsStack.Screen name='SelectListView' component={SelectListView} options={SelectListView.navigationOptions} />
|
|
|
|
<ChatsStack.Screen name='RoomInfoView' component={RoomInfoView} options={RoomInfoView.navigationOptions} />
|
|
|
|
<ChatsStack.Screen name='RoomInfoEditView' component={RoomInfoEditView} options={RoomInfoEditView.navigationOptions} />
|
2022-08-26 13:21:25 +00:00
|
|
|
<ChatsStack.Screen name='RoomMembersView' component={RoomMembersView} />
|
2021-09-16 18:16:02 +00:00
|
|
|
<ChatsStack.Screen name='DiscussionsView' component={DiscussionsView} />
|
2020-06-15 14:00:46 +00:00
|
|
|
<ChatsStack.Screen
|
|
|
|
name='SearchMessagesView'
|
|
|
|
component={SearchMessagesView}
|
|
|
|
options={SearchMessagesView.navigationOptions}
|
|
|
|
/>
|
2021-09-13 20:41:05 +00:00
|
|
|
<ChatsStack.Screen name='SelectedUsersView' component={SelectedUsersView} />
|
2022-05-13 13:02:01 +00:00
|
|
|
<ChatsStack.Screen name='InviteUsersView' component={InviteUsersView} />
|
2020-06-15 14:00:46 +00:00
|
|
|
<ChatsStack.Screen
|
|
|
|
name='InviteUsersEditView'
|
|
|
|
component={InviteUsersEditView}
|
|
|
|
options={InviteUsersEditView.navigationOptions}
|
|
|
|
/>
|
2021-09-13 20:41:05 +00:00
|
|
|
<ChatsStack.Screen name='MessagesView' component={MessagesView} />
|
|
|
|
<ChatsStack.Screen name='AutoTranslateView' component={AutoTranslateView} options={AutoTranslateView.navigationOptions} />
|
|
|
|
<ChatsStack.Screen name='DirectoryView' component={DirectoryView} options={DirectoryView.navigationOptions} />
|
2022-08-01 16:35:05 +00:00
|
|
|
<ChatsStack.Screen name='NotificationPrefView' component={NotificationPrefView} />
|
2022-05-02 12:03:55 +00:00
|
|
|
<ChatsStack.Screen name='ForwardLivechatView' component={ForwardLivechatView} />
|
2022-07-15 20:06:27 +00:00
|
|
|
<ChatsStack.Screen name='CloseLivechatView' component={CloseLivechatView} />
|
2021-09-13 20:41:05 +00:00
|
|
|
<ChatsStack.Screen name='LivechatEditView' component={LivechatEditView} options={LivechatEditView.navigationOptions} />
|
|
|
|
<ChatsStack.Screen name='PickerView' component={PickerView} options={PickerView.navigationOptions} />
|
2020-06-15 14:00:46 +00:00
|
|
|
<ChatsStack.Screen
|
|
|
|
name='ThreadMessagesView'
|
|
|
|
component={ThreadMessagesView}
|
|
|
|
options={ThreadMessagesView.navigationOptions}
|
|
|
|
/>
|
2021-12-03 19:27:57 +00:00
|
|
|
<ChatsStack.Screen name='TeamChannelsView' component={TeamChannelsView} />
|
2022-08-26 19:16:45 +00:00
|
|
|
<ChatsStack.Screen name='CreateChannelView' component={CreateChannelView} />
|
2021-12-03 19:27:57 +00:00
|
|
|
<ChatsStack.Screen name='AddChannelTeamView' component={AddChannelTeamView} />
|
[NEW] Add/Create/Remove channel on a team (#3090)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* One way to refactor :P
* Next level refactor :)
* Fix create group dm
* Refactor renderItem
* Minor bug fixes
* Fix stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-05-19 21:14:42 +00:00
|
|
|
<ChatsStack.Screen
|
|
|
|
name='AddExistingChannelView'
|
|
|
|
component={AddExistingChannelView}
|
|
|
|
options={AddExistingChannelView.navigationOptions}
|
|
|
|
/>
|
2022-05-13 12:57:19 +00:00
|
|
|
<ChatsStack.Screen name='MarkdownTableView' component={MarkdownTableView} />
|
2021-09-13 20:41:05 +00:00
|
|
|
<ChatsStack.Screen name='ReadReceiptsView' component={ReadReceiptsView} options={ReadReceiptsView.navigationOptions} />
|
2022-05-23 17:33:58 +00:00
|
|
|
<ChatsStack.Screen name='QueueListView' component={QueueListView} />
|
2021-12-03 19:27:57 +00:00
|
|
|
<ChatsStack.Screen name='CannedResponsesListView' component={CannedResponsesListView} />
|
|
|
|
<ChatsStack.Screen name='CannedResponseDetail' component={CannedResponseDetail} />
|
2022-06-27 18:04:20 +00:00
|
|
|
<ChatsStack.Screen name='JitsiMeetView' component={JitsiMeetView} options={{ headerShown: false }} />
|
2020-06-15 14:00:46 +00:00
|
|
|
</ChatsStack.Navigator>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
// ProfileStackNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const ProfileStack = createStackNavigator<ProfileStackParamList>();
|
2020-06-15 14:00:46 +00:00
|
|
|
const ProfileStackNavigator = () => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
return (
|
2021-12-03 19:27:57 +00:00
|
|
|
<ProfileStack.Navigator
|
2022-08-08 21:02:08 +00:00
|
|
|
screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...StackAnimation } as StackNavigationOptions}
|
|
|
|
>
|
2021-09-13 20:41:05 +00:00
|
|
|
<ProfileStack.Screen name='ProfileView' component={ProfileView} options={ProfileView.navigationOptions} />
|
2021-12-03 19:27:57 +00:00
|
|
|
<ProfileStack.Screen name='UserPreferencesView' component={UserPreferencesView} />
|
2022-09-22 21:31:23 +00:00
|
|
|
<ProfileStack.Screen name='UserNotificationPrefView' component={UserNotificationPrefView} />
|
2021-09-13 20:41:05 +00:00
|
|
|
<ProfileStack.Screen name='PickerView' component={PickerView} options={PickerView.navigationOptions} />
|
2020-06-15 14:00:46 +00:00
|
|
|
</ProfileStack.Navigator>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
// SettingsStackNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const SettingsStack = createStackNavigator<SettingsStackParamList>();
|
2020-06-15 14:00:46 +00:00
|
|
|
const SettingsStackNavigator = () => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
|
|
|
|
return (
|
2021-12-03 19:27:57 +00:00
|
|
|
<SettingsStack.Navigator
|
2022-08-08 21:02:08 +00:00
|
|
|
screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...StackAnimation } as StackNavigationOptions}
|
|
|
|
>
|
2021-09-13 20:41:05 +00:00
|
|
|
<SettingsStack.Screen name='SettingsView' component={SettingsView} options={SettingsView.navigationOptions} />
|
2021-12-03 19:27:57 +00:00
|
|
|
<SettingsStack.Screen name='SecurityPrivacyView' component={SecurityPrivacyView} />
|
2020-10-30 18:31:04 +00:00
|
|
|
<SettingsStack.Screen
|
|
|
|
name='E2EEncryptionSecurityView'
|
|
|
|
component={E2EEncryptionSecurityView}
|
|
|
|
options={E2EEncryptionSecurityView.navigationOptions}
|
|
|
|
/>
|
2022-09-22 21:40:32 +00:00
|
|
|
<SettingsStack.Screen name='LanguageView' component={LanguageView} />
|
2022-05-05 15:24:36 +00:00
|
|
|
<SettingsStack.Screen name='ThemeView' component={ThemeView} />
|
2022-08-19 13:46:58 +00:00
|
|
|
<SettingsStack.Screen name='DefaultBrowserView' component={DefaultBrowserView} />
|
2020-06-15 14:00:46 +00:00
|
|
|
<SettingsStack.Screen
|
|
|
|
name='ScreenLockConfigView'
|
|
|
|
component={ScreenLockConfigView}
|
|
|
|
options={ScreenLockConfigView.navigationOptions}
|
|
|
|
/>
|
|
|
|
</SettingsStack.Navigator>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
// AdminPanelStackNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const AdminPanelStack = createStackNavigator<AdminPanelStackParamList>();
|
2020-06-15 14:00:46 +00:00
|
|
|
const AdminPanelStackNavigator = () => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
|
|
|
|
return (
|
2021-12-03 19:27:57 +00:00
|
|
|
<AdminPanelStack.Navigator
|
2022-08-08 21:02:08 +00:00
|
|
|
screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...StackAnimation } as StackNavigationOptions}
|
|
|
|
>
|
2022-05-11 16:33:27 +00:00
|
|
|
<AdminPanelStack.Screen name='AdminPanelView' component={AdminPanelView} />
|
2020-06-15 14:00:46 +00:00
|
|
|
</AdminPanelStack.Navigator>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2021-10-06 20:30:10 +00:00
|
|
|
// DisplayPreferenceNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const DisplayPrefStack = createStackNavigator<DisplayPrefStackParamList>();
|
2021-10-06 20:30:10 +00:00
|
|
|
const DisplayPrefStackNavigator = () => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
|
|
|
|
return (
|
2021-12-03 19:27:57 +00:00
|
|
|
<DisplayPrefStack.Navigator
|
2022-08-08 21:02:08 +00:00
|
|
|
screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...StackAnimation } as StackNavigationOptions}
|
|
|
|
>
|
2021-10-06 20:30:10 +00:00
|
|
|
<DisplayPrefStack.Screen name='DisplayPrefsView' component={DisplayPrefsView} />
|
|
|
|
</DisplayPrefStack.Navigator>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2020-06-15 14:00:46 +00:00
|
|
|
// DrawerNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const Drawer = createDrawerNavigator<DrawerParamList>();
|
2021-02-19 18:05:47 +00:00
|
|
|
const DrawerNavigator = () => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Drawer.Navigator
|
2022-05-07 01:19:27 +00:00
|
|
|
// @ts-ignore
|
2021-02-19 18:05:47 +00:00
|
|
|
drawerContent={({ navigation, state }) => <Sidebar navigation={navigation} state={state} />}
|
2022-06-01 19:46:37 +00:00
|
|
|
useLegacyImplementation={true}
|
|
|
|
screenOptions={{
|
|
|
|
swipeEnabled: false,
|
|
|
|
headerShown: false,
|
|
|
|
drawerPosition: I18nManager.isRTL ? 'right' : 'left',
|
|
|
|
drawerType: 'back',
|
|
|
|
overlayColor: `rgba(0,0,0,${themes[theme].backdropOpacity})`
|
2022-08-08 21:02:08 +00:00
|
|
|
}}
|
|
|
|
>
|
2021-02-19 18:05:47 +00:00
|
|
|
<Drawer.Screen name='ChatsStackNavigator' component={ChatsStackNavigator} />
|
|
|
|
<Drawer.Screen name='ProfileStackNavigator' component={ProfileStackNavigator} />
|
|
|
|
<Drawer.Screen name='SettingsStackNavigator' component={SettingsStackNavigator} />
|
|
|
|
<Drawer.Screen name='AdminPanelStackNavigator' component={AdminPanelStackNavigator} />
|
2021-10-06 20:30:10 +00:00
|
|
|
<Drawer.Screen name='DisplayPrefStackNavigator' component={DisplayPrefStackNavigator} />
|
2021-02-19 18:05:47 +00:00
|
|
|
</Drawer.Navigator>
|
|
|
|
);
|
|
|
|
};
|
2020-06-15 14:00:46 +00:00
|
|
|
|
|
|
|
// NewMessageStackNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const NewMessageStack = createStackNavigator<NewMessageStackParamList>();
|
2020-06-15 14:00:46 +00:00
|
|
|
const NewMessageStackNavigator = () => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
|
|
|
|
return (
|
2021-12-03 19:27:57 +00:00
|
|
|
<NewMessageStack.Navigator
|
2022-08-08 21:02:08 +00:00
|
|
|
screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...StackAnimation } as StackNavigationOptions}
|
|
|
|
>
|
2022-08-26 19:16:45 +00:00
|
|
|
<NewMessageStack.Screen name='NewMessageView' component={NewMessageView} />
|
2021-09-13 20:41:05 +00:00
|
|
|
<NewMessageStack.Screen name='SelectedUsersViewCreateChannel' component={SelectedUsersView} />
|
2022-08-26 19:16:45 +00:00
|
|
|
<NewMessageStack.Screen name='CreateChannelView' component={CreateChannelView} />
|
2021-09-13 20:41:05 +00:00
|
|
|
<NewMessageStack.Screen name='CreateDiscussionView' component={CreateDiscussionView} />
|
2020-06-15 14:00:46 +00:00
|
|
|
</NewMessageStack.Navigator>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2020-09-11 14:31:38 +00:00
|
|
|
// E2ESaveYourPasswordStackNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const E2ESaveYourPasswordStack = createStackNavigator<E2ESaveYourPasswordStackParamList>();
|
2020-09-11 14:31:38 +00:00
|
|
|
const E2ESaveYourPasswordStackNavigator = () => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
|
|
|
|
return (
|
2021-12-03 19:27:57 +00:00
|
|
|
<E2ESaveYourPasswordStack.Navigator
|
2022-08-08 21:02:08 +00:00
|
|
|
screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...StackAnimation } as StackNavigationOptions}
|
|
|
|
>
|
2022-08-17 13:51:40 +00:00
|
|
|
<E2ESaveYourPasswordStack.Screen name='E2ESaveYourPasswordView' component={E2ESaveYourPasswordView} />
|
2022-08-11 14:50:03 +00:00
|
|
|
<E2ESaveYourPasswordStack.Screen name='E2EHowItWorksView' component={E2EHowItWorksView} />
|
2020-09-11 14:31:38 +00:00
|
|
|
</E2ESaveYourPasswordStack.Navigator>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
// E2EEnterYourPasswordStackNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const E2EEnterYourPasswordStack = createStackNavigator<E2EEnterYourPasswordStackParamList>();
|
2020-09-11 14:31:38 +00:00
|
|
|
const E2EEnterYourPasswordStackNavigator = () => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
|
|
|
|
return (
|
2021-12-03 19:27:57 +00:00
|
|
|
<E2EEnterYourPasswordStack.Navigator
|
2022-08-08 21:02:08 +00:00
|
|
|
screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...StackAnimation } as StackNavigationOptions}
|
|
|
|
>
|
2022-08-11 14:59:40 +00:00
|
|
|
<E2EEnterYourPasswordStack.Screen name='E2EEnterYourPasswordView' component={E2EEnterYourPasswordView} />
|
2020-09-11 14:31:38 +00:00
|
|
|
</E2EEnterYourPasswordStack.Navigator>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2020-06-15 14:00:46 +00:00
|
|
|
// InsideStackNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const InsideStack = createStackNavigator<InsideStackParamList>();
|
2020-06-15 14:00:46 +00:00
|
|
|
const InsideStackNavigator = () => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
|
|
|
|
return (
|
2022-06-01 19:46:37 +00:00
|
|
|
<InsideStack.Navigator
|
2022-08-08 21:02:08 +00:00
|
|
|
screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...ModalAnimation, presentation: 'transparentModal' }}
|
|
|
|
>
|
2021-09-13 20:41:05 +00:00
|
|
|
<InsideStack.Screen name='DrawerNavigator' component={DrawerNavigator} options={{ headerShown: false }} />
|
|
|
|
<InsideStack.Screen name='NewMessageStackNavigator' component={NewMessageStackNavigator} options={{ headerShown: false }} />
|
2020-09-11 14:31:38 +00:00
|
|
|
<InsideStack.Screen
|
|
|
|
name='E2ESaveYourPasswordStackNavigator'
|
|
|
|
component={E2ESaveYourPasswordStackNavigator}
|
|
|
|
options={{ headerShown: false }}
|
|
|
|
/>
|
|
|
|
<InsideStack.Screen
|
|
|
|
name='E2EEnterYourPasswordStackNavigator'
|
|
|
|
component={E2EEnterYourPasswordStackNavigator}
|
|
|
|
options={{ headerShown: false }}
|
|
|
|
/>
|
2021-09-13 20:41:05 +00:00
|
|
|
<InsideStack.Screen name='AttachmentView' component={AttachmentView} />
|
|
|
|
<InsideStack.Screen name='StatusView' component={StatusView} />
|
|
|
|
<InsideStack.Screen name='ShareView' component={ShareView} />
|
|
|
|
<InsideStack.Screen name='ModalBlockView' component={ModalBlockView} options={ModalBlockView.navigationOptions} />
|
2020-06-15 14:00:46 +00:00
|
|
|
</InsideStack.Navigator>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2020-06-16 20:32:30 +00:00
|
|
|
export default InsideStackNavigator;
|