forked from jitsi/jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(visitors) add info dialog (jitsi#14926)
- Loading branch information
Showing
10 changed files
with
191 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as JoinMeetingDialog } from './native/JoinMeetingDialog'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as JoinMeetingDialog } from './web/JoinMeetingDialog'; |
40 changes: 40 additions & 0 deletions
40
react/features/visitors/components/native/JoinMeetingDialog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React, { useCallback, useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { View, ViewStyle } from 'react-native'; | ||
import Dialog from 'react-native-dialog'; | ||
|
||
import { StandaloneRaiseHandButton as RaiseHandButton } from '../../../reactions/components/native/RaiseHandButton'; | ||
import styles from '../../components/native/styles'; | ||
|
||
/** | ||
* Component that renders the join meeting dialog for visitors. | ||
* | ||
* @returns {JSX.Element} | ||
*/ | ||
export default function JoinMeetingDialog() { | ||
const { t } = useTranslation(); | ||
const [ visible, setVisible ] = useState(true); | ||
|
||
const closeDialog = useCallback(() => { | ||
setVisible(false); | ||
}, []); | ||
|
||
return ( | ||
<Dialog.Container | ||
coverScreen = { false } | ||
visible = { visible }> | ||
<Dialog.Title>{ t('visitors.joinMeeting.title') }</Dialog.Title> | ||
<Dialog.Description> | ||
{ t('visitors.joinMeeting.description') } | ||
<View style = { styles.raiseHandButton as ViewStyle }> | ||
{/* @ts-ignore */} | ||
<RaiseHandButton disableClick = { true } /> | ||
</View> | ||
</Dialog.Description> | ||
<Dialog.Description>{t('visitors.joinMeeting.wishToSpeak')}</Dialog.Description> | ||
<Dialog.Button | ||
label = { t('dialog.Understood') } | ||
onPress = { closeDialog } /> | ||
</Dialog.Container> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* The styles of the feature visitors. | ||
*/ | ||
export default { | ||
|
||
raiseHandButton: { | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
width: '100%' | ||
} | ||
}; |
75 changes: 75 additions & 0 deletions
75
react/features/visitors/components/web/JoinMeetingDialog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import { noop } from 'lodash'; | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { makeStyles } from 'tss-react/mui'; | ||
|
||
import { IconArrowUp } from '../../../base/icons/svg'; | ||
import ToolboxButtonWithPopup from '../../../base/toolbox/components/web/ToolboxButtonWithPopup'; | ||
import Dialog from '../../../base/ui/components/web/Dialog'; | ||
import { RaiseHandButton } from '../../../reactions/components/web/RaiseHandButton'; | ||
|
||
const useStyles = makeStyles()(theme => { | ||
return { | ||
raiseHand: { | ||
alignItems: 'center', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
marginTop: theme.spacing(3), | ||
marginBottom: theme.spacing(3), | ||
pointerEvents: 'none' | ||
}, | ||
raiseHandTooltip: { | ||
border: '1px solid #444', | ||
borderRadius: theme.shape.borderRadius, | ||
paddingBottom: theme.spacing(1), | ||
paddingTop: theme.spacing(1), | ||
paddingLeft: theme.spacing(2), | ||
paddingRight: theme.spacing(2) | ||
}, | ||
raiseHandButton: { | ||
display: 'inline-block', | ||
marginTop: theme.spacing(2), | ||
marginBottom: theme.spacing(2), | ||
position: 'relative' | ||
} | ||
}; | ||
}); | ||
|
||
/** | ||
* Component that renders the join meeting dialog for visitors. | ||
* | ||
* @returns {JSX.Element} | ||
*/ | ||
export default function JoinMeetingDialog() { | ||
const { t } = useTranslation(); | ||
const { classes } = useStyles(); | ||
|
||
return ( | ||
<Dialog | ||
cancel = {{ hidden: true }} | ||
ok = {{ translationKey: 'dialog.Understood' }} | ||
titleKey = 'visitors.joinMeeting.title'> | ||
<div className = 'join-meeting-dialog'> | ||
<p>{t('visitors.joinMeeting.description')}</p> | ||
<div className = { classes.raiseHand }> | ||
<p className = { classes.raiseHandTooltip }>{t('visitors.joinMeeting.raiseHand')}</p> | ||
<div className = { classes.raiseHandButton }> | ||
<ToolboxButtonWithPopup | ||
icon = { IconArrowUp } | ||
iconDisabled = { false } | ||
onPopoverClose = { noop } | ||
onPopoverOpen = { noop } | ||
popoverContent = { null } | ||
visible = { false }> | ||
{/* @ts-ignore */} | ||
<RaiseHandButton | ||
disableClick = { true } | ||
raisedHand = { true } /> | ||
</ToolboxButtonWithPopup> | ||
</div> | ||
</div> | ||
<p>{t('visitors.joinMeeting.wishToSpeak')}</p> | ||
</div> | ||
</Dialog> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters