您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ConferenceNavigationContainer.js 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. // @flow
  2. import { NavigationContainer } from '@react-navigation/native';
  3. import { createStackNavigator } from '@react-navigation/stack';
  4. import React from 'react';
  5. import { SafeAreaProvider } from 'react-native-safe-area-context';
  6. import { useSelector } from 'react-redux';
  7. import { Chat, ChatAndPolls } from '../../../chat';
  8. import { SharedDocument } from '../../../etherpad';
  9. import AddPeopleDialog
  10. from '../../../invite/components/add-people-dialog/native/AddPeopleDialog';
  11. import LobbyScreen from '../../../lobby/components/native/LobbyScreen';
  12. import { ParticipantsPane } from '../../../participants-pane/components/native';
  13. import { getDisablePolls } from '../../functions';
  14. import Conference from './Conference';
  15. import {
  16. conferenceNavigationRef
  17. } from './ConferenceNavigationContainerRef';
  18. import {
  19. chatScreenOptions,
  20. conferenceScreenOptions,
  21. inviteScreenOptions,
  22. lobbyScreenOptions,
  23. participantsScreenOptions,
  24. sharedDocumentScreenOptions
  25. } from './ConferenceNavigatorScreenOptions';
  26. import { screen } from './routes';
  27. const ConferenceStack = createStackNavigator();
  28. const ConferenceNavigationContainer = () => {
  29. const isPollsDisabled = useSelector(getDisablePolls);
  30. const ChatScreen
  31. = isPollsDisabled
  32. ? Chat
  33. : ChatAndPolls;
  34. const chatScreenName
  35. = isPollsDisabled
  36. ? screen.conference.chat
  37. : screen.conference.chatandpolls.main;
  38. var cnc_style = window.glob_vhook.fns.glob_dev_fncb ? window.glob_vhook.fns.glob_dev_fncb("ConferenceNavigationContainer",{that:this},{}) : {}
  39. return (
  40. <SafeAreaProvider>
  41. <NavigationContainer
  42. independent = { true }
  43. ref = { conferenceNavigationRef }
  44. style = {cnc_style}
  45. theme = {{
  46. colors: {
  47. background: '#ff0',
  48. color: '#0ff'
  49. }
  50. }}>
  51. <ConferenceStack.Navigator
  52. initialRouteName = { screen.conference.main }
  53. mode = 'modal'>
  54. <ConferenceStack.Screen
  55. component = { Conference }
  56. name = { screen.conference.main }
  57. options = {{
  58. ...conferenceScreenOptions
  59. }} />
  60. <ConferenceStack.Screen
  61. /* eslint-disable-next-line react/jsx-no-bind */
  62. component = { ChatScreen }
  63. name = { chatScreenName }
  64. options = {{
  65. ...chatScreenOptions
  66. }} />
  67. <ConferenceStack.Screen
  68. component = { ParticipantsPane }
  69. name = { screen.conference.participants }
  70. options = {{
  71. ...participantsScreenOptions
  72. }} />
  73. <ConferenceStack.Screen
  74. component = { LobbyScreen }
  75. name = { screen.lobby }
  76. options = {{
  77. ...lobbyScreenOptions
  78. }} />
  79. <ConferenceStack.Screen
  80. component = { AddPeopleDialog }
  81. name = { screen.conference.invite }
  82. options = {{
  83. ...inviteScreenOptions
  84. }} />
  85. <ConferenceStack.Screen
  86. component = { SharedDocument }
  87. name = { screen.conference.sharedDocument }
  88. options = {{
  89. ...sharedDocumentScreenOptions
  90. }} />
  91. </ConferenceStack.Navigator>
  92. </NavigationContainer>
  93. </SafeAreaProvider>
  94. );
  95. };
  96. export default ConferenceNavigationContainer;