You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

actions.web.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // @flow
  2. import { maybeRedirectToWelcomePage } from '../app/actions';
  3. import { hideDialog, openDialog } from '../base/dialog/actions';
  4. import {
  5. CANCEL_LOGIN
  6. } from './actionTypes';
  7. import { WaitForOwnerDialog, LoginDialog } from './components';
  8. /**
  9. * Cancels {@ink LoginDialog}.
  10. *
  11. * @returns {{
  12. * type: CANCEL_LOGIN
  13. * }}
  14. */
  15. export function cancelLogin() {
  16. return {
  17. type: CANCEL_LOGIN
  18. };
  19. }
  20. /**
  21. * Cancels authentication, closes {@link WaitForOwnerDialog}
  22. * and navigates back to the welcome page.
  23. *
  24. * @returns {Function}
  25. */
  26. export function cancelWaitForOwner() {
  27. return (dispatch: Function) => {
  28. dispatch(maybeRedirectToWelcomePage());
  29. };
  30. }
  31. /**
  32. * Hides a authentication dialog where the local participant
  33. * should authenticate.
  34. *
  35. * @returns {Function}.
  36. */
  37. export function hideLoginDialog() {
  38. return hideDialog(LoginDialog);
  39. }
  40. /**
  41. * Shows a authentication dialog where the local participant
  42. * should authenticate.
  43. *
  44. * @returns {Function}.
  45. */
  46. export function openLoginDialog() {
  47. return openDialog(LoginDialog);
  48. }
  49. /**
  50. * Shows a notification dialog that authentication is required to create the.
  51. * Conference, so the local participant should authenticate or wait for a
  52. * host.
  53. *
  54. * @returns {Function}.
  55. */
  56. export function openWaitForOwnerDialog() {
  57. return openDialog(WaitForOwnerDialog);
  58. }