Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

CallingDialog.tsx 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /* eslint-disable lines-around-comment */
  2. import { Theme } from '@mui/material';
  3. import React from 'react';
  4. import { WithTranslation } from 'react-i18next';
  5. import { makeStyles } from 'tss-react/mui';
  6. // @ts-ignore
  7. import { Avatar } from '../../../base/avatar';
  8. import { translate } from '../../../base/i18n/functions';
  9. import Icon from '../../../base/icons/components/Icon';
  10. import { IconClose } from '../../../base/icons/svg';
  11. // @ts-ignore
  12. import Label from '../Label';
  13. interface IProps extends WithTranslation {
  14. /**
  15. * The phone number that is being called.
  16. */
  17. number: string;
  18. /**
  19. * Closes the dialog.
  20. */
  21. onClose: Function;
  22. /**
  23. * Handler used on hangup click.
  24. */
  25. onHangup: Function;
  26. /**
  27. * The status of the call.
  28. */
  29. status: string;
  30. }
  31. const useStyles = makeStyles()((theme: Theme) => {
  32. return {
  33. callingDialog: {
  34. padding: theme.spacing(3),
  35. textAlign: 'center',
  36. '& .prejoin-dialog-calling-header': {
  37. textAlign: 'right'
  38. },
  39. '& .prejoin-dialog-calling-label': {
  40. fontSize: '15px',
  41. margin: `${theme.spacing(2)} 0 ${theme.spacing(3)} 0`
  42. },
  43. '& .prejoin-dialog-calling-number': {
  44. fontSize: '19px',
  45. lineHeight: '28px',
  46. margin: `${theme.spacing(3)} 0`
  47. }
  48. }
  49. };
  50. });
  51. /**
  52. * Dialog displayed when the user gets called by the meeting.
  53. *
  54. * @param {IProps} props - The props of the component.
  55. * @returns {ReactElement}
  56. */
  57. function CallingDialog(props: IProps) {
  58. const { number, onClose, status, t } = props;
  59. const { classes } = useStyles();
  60. return (
  61. <div className = { classes.callingDialog }>
  62. <div className = 'prejoin-dialog-calling-header'>
  63. <Icon
  64. className = 'prejoin-dialog-icon'
  65. onClick = { onClose }
  66. role = 'button'
  67. size = { 24 }
  68. src = { IconClose } />
  69. </div>
  70. <Label className = 'prejoin-dialog-calling-label'>
  71. {t(status)}
  72. </Label>
  73. <Avatar size = { 72 } />
  74. <div className = 'prejoin-dialog-calling-number'>{number}</div>
  75. </div>
  76. );
  77. }
  78. export default translate(CallingDialog);