Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

middleware.web.ts 4.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* eslint-disable lines-around-comment */
  2. import LoginDialog from '../../authentication/components/web/LoginDialog';
  3. import WaitForOwnerDialog from '../../authentication/components/web/WaitForOwnerDialog';
  4. import ChatPrivacyDialog from '../../chat/components/web/ChatPrivacyDialog';
  5. import DesktopPicker from '../../desktop-picker/components/DesktopPicker';
  6. import DisplayNamePrompt from '../../display-name/components/web/DisplayNamePrompt';
  7. import ParticipantVerificationDialog from '../../e2ee/components/ParticipantVerificationDialog';
  8. import EmbedMeetingDialog from '../../embed-meeting/components/EmbedMeetingDialog';
  9. // @ts-ignore
  10. import FeedbackDialog from '../../feedback/components/FeedbackDialog.web';
  11. import AddPeopleDialog from '../../invite/components/add-people-dialog/web/AddPeopleDialog';
  12. import PremiumFeatureDialog from '../../jaas/components/web/PremiumFeatureDialog';
  13. import KeyboardShortcutsDialog from '../../keyboard-shortcuts/components/web/KeyboardShortcutsDialog';
  14. // @ts-ignore
  15. import StartLiveStreamDialog from '../../recording/components/LiveStream/web/StartLiveStreamDialog';
  16. // @ts-ignore
  17. import StopLiveStreamDialog from '../../recording/components/LiveStream/web/StopLiveStreamDialog';
  18. // @ts-ignore
  19. import StartRecordingDialog from '../../recording/components/Recording/web/StartRecordingDialog';
  20. // @ts-ignore
  21. import StopRecordingDialog from '../../recording/components/Recording/web/StopRecordingDialog';
  22. // @ts-ignore
  23. import RemoteControlAuthorizationDialog from '../../remote-control/components/RemoteControlAuthorizationDialog';
  24. import PasswordRequiredPrompt from '../../room-lock/components/PasswordRequiredPrompt.web';
  25. import SalesforceLinkDialog from '../../salesforce/components/web/SalesforceLinkDialog';
  26. import ShareAudioDialog from '../../screen-share/components/web/ShareAudioDialog';
  27. import ShareScreenWarningDialog from '../../screen-share/components/web/ShareScreenWarningDialog';
  28. import SecurityDialog from '../../security/components/security-dialog/web/SecurityDialog';
  29. import LogoutDialog from '../../settings/components/web/LogoutDialog';
  30. import SharedVideoDialog from '../../shared-video/components/web/SharedVideoDialog';
  31. import SpeakerStats from '../../speaker-stats/components/web/SpeakerStats';
  32. import LanguageSelectorDialog from '../../subtitles/components/LanguageSelectorDialog.web';
  33. import GrantModeratorDialog from '../../video-menu/components/web/GrantModeratorDialog';
  34. import KickRemoteParticipantDialog from '../../video-menu/components/web/KickRemoteParticipantDialog';
  35. import MuteEveryoneDialog from '../../video-menu/components/web/MuteEveryoneDialog';
  36. import MuteEveryonesVideoDialog from '../../video-menu/components/web/MuteEveryonesVideoDialog';
  37. import MuteRemoteParticipantsVideoDialog from '../../video-menu/components/web/MuteRemoteParticipantsVideoDialog';
  38. // @ts-ignore
  39. import VideoQualityDialog from '../../video-quality/components/VideoQualityDialog.web';
  40. import VirtualBackgroundDialog from '../../virtual-background/components/VirtualBackgroundDialog';
  41. import MiddlewareRegistry from '../redux/MiddlewareRegistry';
  42. import { OPEN_DIALOG } from './actionTypes';
  43. // ! IMPORTANT - This whole middleware is only needed for the transition from from @atlaskit dialog to our component.
  44. // ! It should be removed when the transition is over.
  45. const NEW_DIALOG_LIST = [ KeyboardShortcutsDialog, ChatPrivacyDialog, DisplayNamePrompt, EmbedMeetingDialog,
  46. FeedbackDialog, AddPeopleDialog, PremiumFeatureDialog, StartLiveStreamDialog, StopLiveStreamDialog,
  47. StartRecordingDialog, StopRecordingDialog, ShareAudioDialog, ShareScreenWarningDialog, SecurityDialog,
  48. SharedVideoDialog, SpeakerStats, LanguageSelectorDialog, MuteEveryoneDialog, MuteEveryonesVideoDialog,
  49. GrantModeratorDialog, KickRemoteParticipantDialog, MuteRemoteParticipantsVideoDialog, VideoQualityDialog,
  50. VirtualBackgroundDialog, LoginDialog, WaitForOwnerDialog, DesktopPicker, RemoteControlAuthorizationDialog,
  51. LogoutDialog, SalesforceLinkDialog, ParticipantVerificationDialog, PasswordRequiredPrompt ];
  52. // This function is necessary while the transition from @atlaskit dialog to our component is ongoing.
  53. const isNewDialog = (component: any) => NEW_DIALOG_LIST.some(comp => comp === component);
  54. /**
  55. * Implements the entry point of the middleware of the feature base/media.
  56. *
  57. * @param {IStore} store - The redux store.
  58. * @returns {Function}
  59. */
  60. MiddlewareRegistry.register(() => (next: Function) => (action: any) => {
  61. switch (action.type) {
  62. case OPEN_DIALOG: {
  63. action.isNewDialog = isNewDialog(action.component);
  64. }
  65. }
  66. return next(action);
  67. });