Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

SettingsView.tsx 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. /* eslint-disable lines-around-comment */
  2. import _ from 'lodash';
  3. import React, { Component } from 'react';
  4. import { WithTranslation } from 'react-i18next';
  5. import {
  6. Alert,
  7. Linking,
  8. NativeModules,
  9. Platform,
  10. ScrollView,
  11. Text,
  12. View
  13. } from 'react-native';
  14. import { Divider } from 'react-native-paper';
  15. import { getDefaultURL } from '../../../app/functions.native';
  16. import { IReduxState } from '../../../app/types';
  17. // @ts-ignore
  18. import { Avatar } from '../../../base/avatar';
  19. import { getLegalUrls } from '../../../base/config/functions.native';
  20. import { translate } from '../../../base/i18n/functions';
  21. // @ts-ignore
  22. import JitsiScreen from '../../../base/modal/components/JitsiScreen';
  23. import { getLocalParticipant } from '../../../base/participants/functions';
  24. import { connect } from '../../../base/redux/functions';
  25. import { updateSettings } from '../../../base/settings/actions';
  26. import Button from '../../../base/ui/components/native/Button';
  27. import Input from '../../../base/ui/components/native/Input';
  28. import Switch from '../../../base/ui/components/native/Switch';
  29. // @ts-ignore
  30. import { BUTTON_TYPES } from '../../../base/ui/constants.any';
  31. // @ts-ignore
  32. import { AVATAR_SIZE } from '../../../welcome/components/styles';
  33. import { isServerURLChangeEnabled, normalizeUserInputURL } from '../../functions.native';
  34. // @ts-ignore
  35. import FormRow from './FormRow';
  36. // @ts-ignore
  37. import FormSection from './FormSection';
  38. // @ts-ignore
  39. import styles from './styles';
  40. /**
  41. * Application information module.
  42. */
  43. const { AppInfo } = NativeModules;
  44. interface IState {
  45. /**
  46. * State variable for the disable call integration switch.
  47. */
  48. disableCallIntegration: boolean;
  49. /**
  50. * State variable for the disable crash reporting switch.
  51. */
  52. disableCrashReporting: boolean;
  53. /**
  54. * State variable for the disable p2p switch.
  55. */
  56. disableP2P: boolean;
  57. /**
  58. * Whether the self view is disabled or not.
  59. */
  60. disableSelfView: boolean;
  61. /**
  62. * State variable for the display name field.
  63. */
  64. displayName: string;
  65. /**
  66. * State variable for the email field.
  67. */
  68. email: string;
  69. /**
  70. * State variable for the server URL field.
  71. */
  72. serverURL: string;
  73. /**
  74. * State variable for start car mode.
  75. */
  76. startCarMode: boolean;
  77. /**
  78. * State variable for the start with audio muted switch.
  79. */
  80. startWithAudioMuted: boolean;
  81. /**
  82. * State variable for the start with video muted switch.
  83. */
  84. startWithVideoMuted: boolean;
  85. }
  86. /**
  87. * The type of the React {@code Component} props of
  88. * {@link SettingsView}.
  89. */
  90. interface IProps extends WithTranslation {
  91. /**
  92. * The legal URL's.
  93. */
  94. _legalUrls: {
  95. helpCentre: string;
  96. privacy: string;
  97. terms: string;
  98. };
  99. /**
  100. * The ID of the local participant.
  101. */
  102. _localParticipantId: string;
  103. /**
  104. * The default URL for when there is no custom URL set in the settings.
  105. *
  106. * @protected
  107. */
  108. _serverURL: string;
  109. /**
  110. * Flag indicating if URL can be changed by user.
  111. *
  112. * @protected
  113. */
  114. _serverURLChangeEnabled: boolean;
  115. /**
  116. * The current settings object.
  117. */
  118. _settings: {
  119. disableCallIntegration: boolean;
  120. disableCrashReporting: boolean;
  121. disableP2P: boolean;
  122. disableSelfView: boolean;
  123. displayName: string;
  124. email: string;
  125. serverURL: string;
  126. startCarMode: boolean;
  127. startWithAudioMuted: boolean;
  128. startWithVideoMuted: boolean;
  129. };
  130. /**
  131. * Whether {@link SettingsView} is visible.
  132. *
  133. * @protected
  134. */
  135. _visible: boolean;
  136. /**
  137. * Add bottom padding to the screen.
  138. */
  139. addBottomInset?: boolean;
  140. /**
  141. * Redux store dispatch function.
  142. */
  143. dispatch: Function;
  144. /**
  145. * Default prop for navigating between screen components(React Navigation).
  146. */
  147. navigation: Object;
  148. /**
  149. * Bounce when scrolling.
  150. */
  151. scrollBounces?: boolean;
  152. }
  153. /**
  154. * The native container rendering the app settings page.
  155. */
  156. class SettingsView extends Component<IProps, IState> {
  157. _urlField: Object;
  158. /**
  159. *
  160. * Initializes a new {@code SettingsView} instance.
  161. *
  162. * @inheritdoc
  163. */
  164. constructor(props: IProps) {
  165. super(props);
  166. const {
  167. disableCallIntegration,
  168. disableCrashReporting,
  169. disableP2P,
  170. disableSelfView,
  171. displayName,
  172. email,
  173. serverURL,
  174. startCarMode,
  175. startWithAudioMuted,
  176. startWithVideoMuted
  177. } = props._settings || {};
  178. this.state = {
  179. disableCallIntegration,
  180. disableCrashReporting,
  181. disableP2P,
  182. disableSelfView,
  183. displayName: displayName || '',
  184. email: email || '',
  185. serverURL: serverURL || '',
  186. startCarMode,
  187. startWithAudioMuted,
  188. startWithVideoMuted
  189. };
  190. // Bind event handlers so they are only bound once per instance.
  191. this._onBlurServerURL = this._onBlurServerURL.bind(this);
  192. this._onChangeDisplayName = this._onChangeDisplayName.bind(this);
  193. this._onChangeEmail = this._onChangeEmail.bind(this);
  194. this._onChangeServerURL = this._onChangeServerURL.bind(this);
  195. this._onClose = this._onClose.bind(this);
  196. this._onDisableCallIntegration = this._onDisableCallIntegration.bind(this);
  197. this._onDisableCrashReporting = this._onDisableCrashReporting.bind(this);
  198. this._onDisableP2P = this._onDisableP2P.bind(this);
  199. this._onDisableSelfView = this._onDisableSelfView.bind(this);
  200. this._onStartAudioMutedChange
  201. = this._onStartAudioMutedChange.bind(this);
  202. this._onStartCarmodeInLowBandwidthMode
  203. = this._onStartCarmodeInLowBandwidthMode.bind(this);
  204. this._onStartVideoMutedChange
  205. = this._onStartVideoMutedChange.bind(this);
  206. this._setURLFieldReference = this._setURLFieldReference.bind(this);
  207. this._onShowHelpPressed = this._onShowHelpPressed.bind(this);
  208. this._onShowPrivacyPressed = this._onShowPrivacyPressed.bind(this);
  209. this._onShowTermsPressed = this._onShowTermsPressed.bind(this);
  210. this._showURLAlert = this._showURLAlert.bind(this);
  211. }
  212. /**
  213. * Updates and syncs settings.
  214. *
  215. * @inheritdoc
  216. * @returns {void}
  217. */
  218. componentDidUpdate(prevProps: IProps) {
  219. const { _settings } = this.props;
  220. if (!_.isEqual(prevProps._settings, _settings)) {
  221. // @ts-ignore
  222. // eslint-disable-next-line react/no-did-update-set-state
  223. this.setState(_settings);
  224. }
  225. }
  226. /**
  227. * Implements React's {@link Component#render()}, renders the settings page.
  228. *
  229. * @inheritdoc
  230. * @returns {ReactElement}
  231. */
  232. render() {
  233. const {
  234. disableCallIntegration,
  235. disableCrashReporting,
  236. disableP2P,
  237. disableSelfView,
  238. displayName,
  239. email,
  240. serverURL,
  241. startCarMode,
  242. startWithAudioMuted,
  243. startWithVideoMuted
  244. } = this.state;
  245. const {
  246. addBottomInset = false,
  247. scrollBounces = false,
  248. t
  249. } = this.props;
  250. return (
  251. <JitsiScreen
  252. disableForcedKeyboardDismiss = { true }
  253. safeAreaInsets = { [ addBottomInset && 'bottom', 'left', 'right' ].filter(Boolean) }
  254. style = { styles.settingsViewContainer }>
  255. <ScrollView bounces = { scrollBounces }>
  256. <View style = { styles.avatarContainer }>
  257. <Avatar
  258. participantId = { this.props._localParticipantId }
  259. size = { AVATAR_SIZE } />
  260. </View>
  261. {/* @ts-ignore */}
  262. <FormSection
  263. label = 'settingsView.profileSection'>
  264. <Input
  265. // @ts-ignore
  266. customStyles = {{ container: styles.customContainer }}
  267. label = { t('settingsView.displayName') }
  268. onChange = { this._onChangeDisplayName }
  269. placeholder = { t('settingsView.displayNamePlaceholderText') }
  270. textContentType = { 'name' } // iOS only
  271. value = { displayName } />
  272. {/* @ts-ignore */}
  273. <Divider style = { styles.fieldSeparator } />
  274. <Input
  275. // @ts-ignore
  276. autoCapitalize = 'none'
  277. customStyles = {{ container: styles.customContainer }}
  278. keyboardType = { 'email-address' }
  279. label = { t('settingsView.email') }
  280. onChange = { this._onChangeEmail }
  281. placeholder = { t('settingsView.emailPlaceholderText') }
  282. textContentType = { 'emailAddress' } // iOS only
  283. value = { email } />
  284. </FormSection>
  285. {/* @ts-ignore */}
  286. <FormSection
  287. label = 'settingsView.conferenceSection'>
  288. <Input
  289. // @ts-ignore
  290. autoCapitalize = 'none'
  291. customStyles = {{ container: styles.customContainer }}
  292. editable = { this.props._serverURLChangeEnabled }
  293. keyboardType = { 'url' }
  294. label = { t('settingsView.serverURL') }
  295. onBlur = { this._onBlurServerURL }
  296. onChange = { this._onChangeServerURL }
  297. placeholder = { this.props._serverURL }
  298. textContentType = { 'URL' } // iOS only
  299. value = { serverURL } />
  300. {/* @ts-ignore */}
  301. <Divider style = { styles.fieldSeparator } />
  302. <FormRow label = 'settingsView.startCarModeInLowBandwidthMode'>
  303. <Switch
  304. checked = { startCarMode }
  305. // @ts-ignore
  306. onChange = { this._onStartCarmodeInLowBandwidthMode } />
  307. </FormRow>
  308. {/* @ts-ignore */}
  309. <Divider style = { styles.fieldSeparator } />
  310. <FormRow
  311. label = 'settingsView.startWithAudioMuted'>
  312. <Switch
  313. checked = { startWithAudioMuted }
  314. // @ts-ignore
  315. onChange = { this._onStartAudioMutedChange } />
  316. </FormRow>
  317. {/* @ts-ignore */}
  318. <Divider style = { styles.fieldSeparator } />
  319. <FormRow label = 'settingsView.startWithVideoMuted'>
  320. <Switch
  321. checked = { startWithVideoMuted }
  322. // @ts-ignore
  323. onChange = { this._onStartVideoMutedChange } />
  324. </FormRow>
  325. {/* @ts-ignore */}
  326. <Divider style = { styles.fieldSeparator } />
  327. <FormRow label = 'videothumbnail.hideSelfView'>
  328. <Switch
  329. checked = { disableSelfView }
  330. // @ts-ignore
  331. onChange = { this._onDisableSelfView } />
  332. </FormRow>
  333. </FormSection>
  334. {/* @ts-ignore */}
  335. <FormSection
  336. label = 'settingsView.links'>
  337. <Button
  338. accessibilityLabel = 'settingsView.help'
  339. labelKey = 'settingsView.help'
  340. onClick = { this._onShowHelpPressed }
  341. type = { BUTTON_TYPES.TERTIARY } />
  342. {/* @ts-ignore */}
  343. <Divider style = { styles.fieldSeparator } />
  344. <Button
  345. accessibilityLabel = 'settingsView.terms'
  346. labelKey = 'settingsView.terms'
  347. onClick = { this._onShowTermsPressed }
  348. type = { BUTTON_TYPES.TERTIARY } />
  349. {/* @ts-ignore */}
  350. <Divider style = { styles.fieldSeparator } />
  351. <Button
  352. accessibilityLabel = 'settingsView.privacy'
  353. labelKey = 'settingsView.privacy'
  354. onClick = { this._onShowPrivacyPressed }
  355. type = { BUTTON_TYPES.TERTIARY } />
  356. </FormSection>
  357. {/* @ts-ignore */}
  358. <FormSection
  359. label = 'settingsView.buildInfoSection'>
  360. {/* @ts-ignore */}
  361. <FormRow
  362. label = 'settingsView.version'>
  363. <Text style = { styles.text }>
  364. {`${AppInfo.version} build ${AppInfo.buildNumber}`}
  365. </Text>
  366. </FormRow>
  367. </FormSection>
  368. {/* @ts-ignore */}
  369. <FormSection
  370. label = 'settingsView.advanced'>
  371. { Platform.OS === 'android' && (
  372. <>
  373. <FormRow
  374. label = 'settingsView.disableCallIntegration'>
  375. <Switch
  376. checked = { disableCallIntegration }
  377. // @ts-ignore
  378. onChange = { this._onDisableCallIntegration } />
  379. </FormRow>
  380. {/* @ts-ignore */}
  381. <Divider style = { styles.fieldSeparator } />
  382. </>
  383. )}
  384. <FormRow
  385. label = 'settingsView.disableP2P'>
  386. <Switch
  387. checked = { disableP2P }
  388. // @ts-ignore
  389. onChange = { this._onDisableP2P } />
  390. </FormRow>
  391. {/* @ts-ignore */}
  392. <Divider style = { styles.fieldSeparator } />
  393. {AppInfo.GOOGLE_SERVICES_ENABLED && (
  394. <FormRow
  395. fieldSeparator = { true }
  396. label = 'settingsView.disableCrashReporting'>
  397. <Switch
  398. checked = { disableCrashReporting }
  399. // @ts-ignore
  400. onChange = { this._onDisableCrashReporting } />
  401. </FormRow>
  402. )}
  403. </FormSection>
  404. </ScrollView>
  405. </JitsiScreen>
  406. );
  407. }
  408. /**
  409. * Handler the server URL lose focus event. Here we validate the server URL
  410. * and update it to the normalized version, or show an error if incorrect.
  411. *
  412. * @private
  413. * @returns {void}
  414. */
  415. _onBlurServerURL() {
  416. this._processServerURL(false /* hideOnSuccess */);
  417. }
  418. /**
  419. * Handles the display name field value change.
  420. *
  421. * @param {string} displayName - The value typed in the name field.
  422. * @protected
  423. * @returns {void}
  424. */
  425. _onChangeDisplayName(displayName: string) {
  426. this.setState({
  427. displayName
  428. });
  429. this._updateSettings({
  430. displayName
  431. });
  432. }
  433. /**
  434. * Handles the email field value change.
  435. *
  436. * @param {string} email - The value typed in the email field.
  437. * @protected
  438. * @returns {void}
  439. */
  440. _onChangeEmail(email: string) {
  441. this.setState({
  442. email
  443. });
  444. this._updateSettings({
  445. email
  446. });
  447. }
  448. /**
  449. * Handles the server name field value change.
  450. *
  451. * @param {string} serverURL - The server URL typed in the server field.
  452. * @protected
  453. * @returns {void}
  454. */
  455. _onChangeServerURL(serverURL: string) {
  456. this.setState({
  457. serverURL
  458. });
  459. this._updateSettings({
  460. serverURL
  461. });
  462. }
  463. /**
  464. * Handles the disable call integration change event.
  465. *
  466. * @param {boolean} disableCallIntegration - The new value
  467. * option.
  468. * @private
  469. * @returns {void}
  470. */
  471. _onDisableCallIntegration(disableCallIntegration: boolean) {
  472. this.setState({
  473. disableCallIntegration
  474. });
  475. this._updateSettings({
  476. disableCallIntegration
  477. });
  478. }
  479. /**
  480. * Handles the disable P2P change event.
  481. *
  482. * @param {boolean} disableP2P - The new value
  483. * option.
  484. * @private
  485. * @returns {void}
  486. */
  487. _onDisableP2P(disableP2P: boolean) {
  488. this.setState({
  489. disableP2P
  490. });
  491. this._updateSettings({
  492. disableP2P
  493. });
  494. }
  495. /** .
  496. * Handles the disable self view change event.
  497. *
  498. * @param {boolean} disableSelfView - The new value.
  499. * @private
  500. * @returns {void}
  501. */
  502. _onDisableSelfView(disableSelfView: boolean) {
  503. this.setState({
  504. disableSelfView
  505. });
  506. this._updateSettings({
  507. disableSelfView
  508. });
  509. }
  510. /** .
  511. * Handles car mode in low bandwidth mode.
  512. *
  513. * @param {boolean} startCarMode - The new value.
  514. * @private
  515. * @returns {void}
  516. */
  517. _onStartCarmodeInLowBandwidthMode(startCarMode: boolean) {
  518. this.setState({
  519. startCarMode
  520. });
  521. this._updateSettings({
  522. startCarMode
  523. });
  524. }
  525. /**
  526. * Handles the disable crash reporting change event.
  527. *
  528. * @param {boolean} disableCrashReporting - The new value
  529. * option.
  530. * @private
  531. * @returns {void}
  532. */
  533. _onDisableCrashReporting(disableCrashReporting: boolean) {
  534. if (disableCrashReporting) {
  535. this._showCrashReportingDisableAlert();
  536. } else {
  537. this._disableCrashReporting(disableCrashReporting);
  538. }
  539. }
  540. /**
  541. * Callback to be invoked on closing the modal. Also invokes normalizeUserInputURL to validate
  542. * the URL entered by the user.
  543. *
  544. * @returns {boolean} - True if the modal can be closed.
  545. */
  546. _onClose() {
  547. return this._processServerURL(true /* hideOnSuccess */);
  548. }
  549. /**
  550. * Handles the start audio muted change event.
  551. *
  552. * @param {boolean} startWithAudioMuted - The new value for the start audio muted
  553. * option.
  554. * @protected
  555. * @returns {void}
  556. */
  557. _onStartAudioMutedChange(startWithAudioMuted: boolean) {
  558. this.setState({
  559. startWithAudioMuted
  560. });
  561. this._updateSettings({
  562. startWithAudioMuted
  563. });
  564. }
  565. /**
  566. * Handles the start video muted change event.
  567. *
  568. * @param {boolean} startWithVideoMuted - The new value for the start video muted
  569. * option.
  570. * @protected
  571. * @returns {void}
  572. */
  573. _onStartVideoMutedChange(startWithVideoMuted: boolean) {
  574. this.setState({
  575. startWithVideoMuted
  576. });
  577. this._updateSettings({
  578. startWithVideoMuted
  579. });
  580. }
  581. /**
  582. * Processes the server URL. It normalizes it and an error alert is
  583. * displayed in case it's incorrect.
  584. *
  585. * @param {boolean} hideOnSuccess - True if the dialog should be hidden if
  586. * normalization / validation succeeds, false otherwise.
  587. * @private
  588. * @returns {void}
  589. */
  590. _processServerURL(hideOnSuccess: boolean) {
  591. // @ts-ignore
  592. const { serverURL } = this.props._settings;
  593. const normalizedURL = normalizeUserInputURL(serverURL);
  594. if (normalizedURL === null) {
  595. this._showURLAlert();
  596. return false;
  597. }
  598. this._onChangeServerURL(normalizedURL);
  599. return hideOnSuccess;
  600. }
  601. /**
  602. * Stores a reference to the URL field for later use.
  603. *
  604. * @param {Object} component - The field component.
  605. * @protected
  606. * @returns {void}
  607. */
  608. _setURLFieldReference(component: object) {
  609. this._urlField = component;
  610. }
  611. /**
  612. * Shows an alert telling the user that the URL he/she entered was invalid.
  613. *
  614. * @returns {void}
  615. */
  616. _showURLAlert() {
  617. const { t } = this.props;
  618. Alert.alert(
  619. t('settingsView.alertTitle'),
  620. t('settingsView.alertURLText'),
  621. [
  622. {
  623. // @ts-ignore
  624. onPress: () => this._urlField.focus(),
  625. text: t('settingsView.alertOk')
  626. }
  627. ]
  628. );
  629. }
  630. /**
  631. * Opens the help url into the browser.
  632. *
  633. * @returns {void}
  634. */
  635. _onShowHelpPressed() {
  636. Linking.openURL(this.props._legalUrls.helpCentre);
  637. }
  638. /**
  639. * Opens the privacy url into the browser.
  640. *
  641. * @returns {void}
  642. */
  643. _onShowPrivacyPressed() {
  644. Linking.openURL(this.props._legalUrls.privacy);
  645. }
  646. /**
  647. * Opens the terms url into the browser.
  648. *
  649. * @returns {void}
  650. */
  651. _onShowTermsPressed() {
  652. Linking.openURL(this.props._legalUrls.terms);
  653. }
  654. /**
  655. * Shows an alert warning the user about disabling crash reporting.
  656. *
  657. * @returns {void}
  658. */
  659. _showCrashReportingDisableAlert() {
  660. const { t } = this.props;
  661. Alert.alert(
  662. t('settingsView.alertTitle'),
  663. t('settingsView.disableCrashReportingWarning'),
  664. [
  665. {
  666. onPress: () => this._disableCrashReporting(true),
  667. text: t('settingsView.alertOk')
  668. },
  669. {
  670. text: t('settingsView.alertCancel')
  671. }
  672. ]
  673. );
  674. }
  675. /**
  676. * Updates the settings and sets state for disableCrashReporting.
  677. *
  678. * @param {boolean} disableCrashReporting - Whether crash reporting is disabled or not.
  679. * @returns {void}
  680. */
  681. _disableCrashReporting(disableCrashReporting: boolean) {
  682. this.setState({
  683. disableCrashReporting
  684. });
  685. this._updateSettings({
  686. disableCrashReporting
  687. });
  688. }
  689. /**
  690. * Updates the persisted settings on any change.
  691. *
  692. * @param {Object} updateObject - The partial update object for the
  693. * settings.
  694. * @private
  695. * @returns {void}
  696. */
  697. _updateSettings(updateObject: Object) {
  698. const { dispatch } = this.props;
  699. dispatch(updateSettings(updateObject));
  700. }
  701. }
  702. /**
  703. * Maps part of the Redux state to the props of this component.
  704. *
  705. * @param {Object} state - The Redux state.
  706. * @returns {IProps}
  707. */
  708. function _mapStateToProps(state: IReduxState) {
  709. const localParticipant = getLocalParticipant(state);
  710. return {
  711. _legalUrls: getLegalUrls(state),
  712. _localParticipantId: localParticipant?.id,
  713. _serverURL: getDefaultURL(state),
  714. _serverURLChangeEnabled: isServerURLChangeEnabled(state),
  715. _settings: state['features/base/settings'],
  716. _visible: state['features/settings'].visible
  717. };
  718. }
  719. export default translate(connect(_mapStateToProps)(SettingsView));