Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

actions.web.ts 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import { maybeRedirectToWelcomePage } from '../app/actions.web';
  2. import { IStore } from '../app/types';
  3. import { hideDialog, openDialog } from '../base/dialog/actions';
  4. import {
  5. CANCEL_LOGIN
  6. } from './actionTypes';
  7. import LoginDialog from './components/web/LoginDialog';
  8. import WaitForOwnerDialog from './components/web/WaitForOwnerDialog';
  9. export * from './actions.any';
  10. /**
  11. * Cancels {@ink LoginDialog}.
  12. *
  13. * @returns {{
  14. * type: CANCEL_LOGIN
  15. * }}
  16. */
  17. export function cancelLogin() {
  18. return {
  19. type: CANCEL_LOGIN
  20. };
  21. }
  22. /**
  23. * Cancels authentication, closes {@link WaitForOwnerDialog}
  24. * and navigates back to the welcome page.
  25. *
  26. * @returns {Function}
  27. */
  28. export function cancelWaitForOwner() {
  29. return (dispatch: IStore['dispatch']) => {
  30. dispatch(maybeRedirectToWelcomePage());
  31. };
  32. }
  33. /**
  34. * Hides a authentication dialog where the local participant
  35. * should authenticate.
  36. *
  37. * @returns {Function}.
  38. */
  39. export function hideLoginDialog() {
  40. return hideDialog(LoginDialog);
  41. }
  42. /**
  43. * Shows a notification dialog that authentication is required to create the.
  44. * Conference.
  45. * This is used for external auth.
  46. *
  47. * @param {string} room - The room name.
  48. * @param {Function} onAuthNow - The function to be invoked when external authentication.
  49. *
  50. * @returns {Function}.
  51. */
  52. export function openAuthDialog(room: String, onAuthNow?: Function) {
  53. return openDialog(WaitForOwnerDialog, {
  54. room,
  55. onAuthNow
  56. });
  57. }