"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7307/react/features/mobile/navigation/components/conference/components/ConferenceNavigationContainer.tsx" (30 May 2023, 8438 Bytes) of package /linux/misc/jitsi-meet-7307.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TSX (TypeScript with React) source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "ConferenceNavigationContainer.tsx": jitsi-meet_8319_vs_jitsi-meet_8615.

    1 /* eslint-disable lines-around-comment */
    2 
    3 import { NavigationContainer, Theme } from '@react-navigation/native';
    4 import { createStackNavigator } from '@react-navigation/stack';
    5 import React from 'react';
    6 import { useTranslation } from 'react-i18next';
    7 import { useSelector } from 'react-redux';
    8 
    9 // @ts-ignore
   10 import Chat from '../../../../../chat/components/native/Chat';
   11 // @ts-ignore
   12 import Conference from '../../../../../conference/components/native/Conference';
   13 // @ts-ignore
   14 import CarMode from '../../../../../conference/components/native/carmode/CarMode';
   15 // @ts-ignore
   16 import { getDisablePolls } from '../../../../../conference/functions';
   17 // @ts-ignore
   18 import SharedDocument from '../../../../../etherpad/components/native/SharedDocument';
   19 // @ts-ignore
   20 import GifsMenu from '../../../../../gifs/components/native/GifsMenu';
   21 import AddPeopleDialog
   22 // @ts-ignore
   23     from '../../../../../invite/components/add-people-dialog/native/AddPeopleDialog';
   24 // @ts-ignore
   25 import ParticipantsPane from '../../../../../participants-pane/components/native/ParticipantsPane';
   26 // @ts-ignore
   27 import StartLiveStreamDialog from '../../../../../recording/components/LiveStream/native/StartLiveStreamDialog';
   28 import StartRecordingDialog
   29 // @ts-ignore
   30     from '../../../../../recording/components/Recording/native/StartRecordingDialog';
   31 import SalesforceLinkDialog
   32 // @ts-ignore
   33     from '../../../../../salesforce/components/native/SalesforceLinkDialog';
   34 import SecurityDialog
   35 // @ts-ignore
   36     from '../../../../../security/components/security-dialog/native/SecurityDialog';
   37 import SpeakerStats
   38 // @ts-ignore
   39     from '../../../../../speaker-stats/components/native/SpeakerStats';
   40 import LanguageSelectorDialog
   41 // @ts-ignore
   42     from '../../../../../subtitles/components/native/LanguageSelectorDialog';
   43 // @ts-ignore
   44 import { screen } from '../../../routes';
   45 import {
   46     carmodeScreenOptions,
   47     chatScreenOptions,
   48     conferenceScreenOptions,
   49     gifsMenuOptions,
   50     inviteScreenOptions,
   51     liveStreamScreenOptions,
   52     lobbyNavigationContainerScreenOptions,
   53     navigationContainerTheme,
   54     participantsScreenOptions,
   55     recordingScreenOptions,
   56     salesforceScreenOptions,
   57     securityScreenOptions,
   58     settingsNavigationContainerScreenOptions,
   59     sharedDocumentScreenOptions,
   60     speakerStatsScreenOptions,
   61     subtitlesScreenOptions
   62     // @ts-ignore
   63 } from '../../../screenOptions';
   64 // @ts-ignore
   65 import ChatAndPollsNavigator from '../../chat/components/ChatAndPollsNavigator';
   66 // @ts-ignore
   67 import LobbyNavigationContainer from '../../lobby/components/LobbyNavigationContainer';
   68 // @ts-ignore
   69 import SettingsNavigationContainer from '../../settings/components/SettingsNavigationContainer';
   70 import {
   71     conferenceNavigationRef
   72     // @ts-ignore
   73 } from '../ConferenceNavigationContainerRef';
   74 
   75 const ConferenceStack = createStackNavigator();
   76 
   77 
   78 const ConferenceNavigationContainer = () => {
   79     const isPollsDisabled = useSelector(getDisablePolls);
   80     let ChatScreen;
   81     let chatScreenName;
   82     let chatTitleString;
   83 
   84     if (isPollsDisabled) {
   85         ChatScreen = Chat;
   86         chatScreenName = screen.conference.chat;
   87         chatTitleString = 'chat.title';
   88     } else {
   89         ChatScreen = ChatAndPollsNavigator;
   90         chatScreenName = screen.conference.chatandpolls.main;
   91         chatTitleString = 'chat.titleWithPolls';
   92     }
   93     const { t } = useTranslation();
   94 
   95     return (
   96         <NavigationContainer
   97             independent = { true }
   98             ref = { conferenceNavigationRef }
   99             theme = { navigationContainerTheme as Theme }>
  100             <ConferenceStack.Navigator
  101                 screenOptions = {{
  102                     presentation: 'modal'
  103                 }}>
  104                 <ConferenceStack.Screen
  105                     component = { Conference }
  106                     name = { screen.conference.main }
  107                     options = { conferenceScreenOptions } />
  108                 <ConferenceStack.Screen
  109                     component = { ChatScreen }
  110                     name = { chatScreenName }
  111                     options = {{
  112                         ...chatScreenOptions,
  113                         title: t(chatTitleString)
  114                     }} />
  115                 <ConferenceStack.Screen
  116                     component = { ParticipantsPane }
  117                     name = { screen.conference.participants }
  118                     options = {{
  119                         ...participantsScreenOptions,
  120                         title: t('participantsPane.title')
  121                     }} />
  122                 <ConferenceStack.Screen
  123                     component = { SecurityDialog }
  124                     name = { screen.conference.security }
  125                     options = {{
  126                         ...securityScreenOptions,
  127                         title: t('security.title')
  128                     }} />
  129                 <ConferenceStack.Screen
  130                     component = { StartRecordingDialog }
  131                     name = { screen.conference.recording }
  132                     options = {{
  133                         ...recordingScreenOptions,
  134                         title: t('recording.title')
  135                     }} />
  136                 <ConferenceStack.Screen
  137                     component = { StartLiveStreamDialog }
  138                     name = { screen.conference.liveStream }
  139                     options = {{
  140                         ...liveStreamScreenOptions,
  141                         title: t('liveStreaming.title')
  142                     }} />
  143                 <ConferenceStack.Screen
  144                     component = { SpeakerStats }
  145                     name = { screen.conference.speakerStats }
  146                     options = {{
  147                         ...speakerStatsScreenOptions,
  148                         title: t('speakerStats.speakerStats')
  149                     }} />
  150                 <ConferenceStack.Screen
  151                     component = { SalesforceLinkDialog }
  152                     name = { screen.conference.salesforce }
  153                     options = {{
  154                         ...salesforceScreenOptions,
  155                         title: t('notify.linkToSalesforce')
  156                     }} />
  157                 <ConferenceStack.Screen
  158                     component = { GifsMenu }
  159                     name = { screen.conference.gifsMenu }
  160                     options = {{
  161                         ...gifsMenuOptions,
  162                         title: t('notify.gifsMenu')
  163                     }} />
  164                 <ConferenceStack.Screen
  165                     component = { LobbyNavigationContainer }
  166                     name = { screen.lobby.root }
  167                     options = {{
  168                         ...lobbyNavigationContainerScreenOptions,
  169                         title: t('lobby.title')
  170                     }} />
  171                 <ConferenceStack.Screen
  172                     component = { AddPeopleDialog }
  173                     name = { screen.conference.invite }
  174                     options = {{
  175                         ...inviteScreenOptions,
  176                         title: t('addPeople.add')
  177                     }} />
  178                 <ConferenceStack.Screen
  179                     component = { SharedDocument }
  180                     name = { screen.conference.sharedDocument }
  181                     options = {{
  182                         ...sharedDocumentScreenOptions,
  183                         title: t('documentSharing.title')
  184                     }} />
  185                 <ConferenceStack.Screen
  186                     // @ts-ignore
  187                     component = { SettingsNavigationContainer }
  188                     name = { screen.settings.main }
  189                     options = { settingsNavigationContainerScreenOptions } />
  190                 <ConferenceStack.Screen
  191                     // @ts-ignore
  192                     component = { CarMode }
  193                     name = { screen.conference.carmode }
  194                     options = {{
  195                         ...carmodeScreenOptions,
  196                         title: t('carmode.labels.title')
  197                     }} />
  198                 <ConferenceStack.Screen
  199                     component = { LanguageSelectorDialog }
  200                     name = { screen.conference.subtitles }
  201                     options = {{
  202                         ...subtitlesScreenOptions,
  203                         title: t('transcribing.subtitles')
  204                     }} />
  205             </ConferenceStack.Navigator>
  206         </NavigationContainer>
  207     );
  208 };
  209 
  210 export default ConferenceNavigationContainer;