Skip to content

Commit

Permalink
fix(dynamic-branding) fix permissions screen not accounting for custo…
Browse files Browse the repository at this point in the history
…m backgrounds
  • Loading branch information
quitrk committed Mar 9, 2022
1 parent c60a51e commit 276cda9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
10 changes: 8 additions & 2 deletions react/features/overlay/components/web/OverlayFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ type Props = {
* Indicates the css style of the overlay. If true, then lighter; darker,
* otherwise.
*/
isLightOverlay?: boolean
isLightOverlay?: boolean,

/**
* The style property.
*/
style: Object
};

/**
Expand All @@ -35,7 +40,8 @@ export default class OverlayFrame extends Component<Props> {
return (
<div
className = { this.props.isLightOverlay ? 'overlay__container-light' : 'overlay__container' }
id = 'overlay'>
id = 'overlay'
style = { this.props.style }>
<div className = { 'overlay__content' }>
{
this.props.children
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ class UserMediaPermissionsOverlay extends AbstractUserMediaPermissionsOverlay {
* @returns {ReactElement}
*/
render() {
const { browser, t } = this.props;
const { _premeetingBackground, browser, t } = this.props;
const style = _premeetingBackground ? {
background: _premeetingBackground,
backgroundPosition: 'center',
backgroundSize: 'cover'
} : {};

return (
<OverlayFrame>
<OverlayFrame style = { style }>
<div className = 'inlay'>
<span className = 'inlay__icon icon-microphone' />
<span className = 'inlay__icon icon-camera' />
Expand Down Expand Up @@ -84,5 +89,21 @@ class UserMediaPermissionsOverlay extends AbstractUserMediaPermissionsOverlay {
}
}

/**
* Maps (parts of) the redux state to the React {@code Component} props.
*
* @param {Object} state - The redux state.
* @param {Object} ownProps - The props passed to the component.
* @returns {Object}
*/
function mapStateToProps(state): Object {
const { premeetingBackground } = state['features/dynamic-branding'];

return {
...abstractMapStateToProps,
_premeetingBackground: premeetingBackground
};
}

export default translate(
connect(abstractMapStateToProps)(UserMediaPermissionsOverlay));
connect(mapStateToProps)(UserMediaPermissionsOverlay));

0 comments on commit 276cda9

Please sign in to comment.