-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6562d9a
commit 151eb9c
Showing
6 changed files
with
115 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.hangup-modal-select { | ||
@include centered-content; | ||
flex-direction: column; | ||
justify-content: center; | ||
min-width: 360px; | ||
text-align: center; | ||
width: 100%; | ||
|
||
.content { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
} | ||
|
||
.footer { | ||
align-items: center; | ||
display: flex; | ||
padding: 24px; | ||
justify-content: center; | ||
width: 100%; | ||
} | ||
|
||
.hangup-button { | ||
display: block; | ||
font-size: 19px; | ||
} | ||
|
||
.description { | ||
font-size: 19px; | ||
} | ||
} |
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
72 changes: 72 additions & 0 deletions
72
spot-client/src/spot-remote/ui/components/meeting-toolbar/buttons/HangupModal.js
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,72 @@ | ||
import { hideModal, hangUp } from 'common/app-state'; | ||
import { Button, Modal } from 'common/ui'; | ||
|
||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
import { withTranslation } from 'react-i18next'; | ||
import { connect } from 'react-redux'; | ||
|
||
/** | ||
* Implements a modal to adjust the volume of the spot tv remotely. | ||
*/ | ||
export class HangupModal extends React.Component { | ||
static propTypes = { | ||
onClose: PropTypes.func, | ||
t: PropTypes.func | ||
}; | ||
|
||
/** | ||
* Implements React's {@link Component#render()}. | ||
* | ||
* @inheritdoc | ||
* @returns {ReactElement} | ||
*/ | ||
render() { | ||
const { t } = this.props; | ||
|
||
return ( | ||
<Modal | ||
onClose = { this.props.onClose } | ||
qaId = 'hangup-modal'> | ||
<div className = 'hangup-modal-select'> | ||
<div className = 'content'> | ||
<div className = 'description'> | ||
{ t('hangup.confirmation') } | ||
</div> | ||
</div> | ||
<div className = 'footer'> | ||
<Button | ||
appearance = 'primary' | ||
className = 'hangup-button' | ||
color='secondary' | ||
Check failure on line 41 in spot-client/src/spot-remote/ui/components/meeting-toolbar/buttons/HangupModal.js GitHub Actions / Unit-tests
|
||
onClick = { this.props.onHangup } | ||
qaId = 'hangup-button'> | ||
{ t('hangup.button') } | ||
Check failure on line 44 in spot-client/src/spot-remote/ui/components/meeting-toolbar/buttons/HangupModal.js GitHub Actions / Unit-tests
|
||
</Button> | ||
</div> | ||
</div> | ||
</Modal> | ||
); | ||
} | ||
} | ||
|
||
/** | ||
* Creates actions which can update Redux state. | ||
* | ||
* @param {Function} dispatch - The Redux dispatch function to update state. | ||
* @private | ||
* @returns {Object} | ||
*/ | ||
function mapDispatchToProps(dispatch) { | ||
return { | ||
onClose() { | ||
dispatch(hideModal()); | ||
}, | ||
onHangup() { | ||
dispatch(hangUp()); | ||
dispatch(hideModal()); | ||
} | ||
}; | ||
} | ||
|
||
export default connect(null, mapDispatchToProps)(withTranslation()(HangupModal)); | ||