mirror of https://github.com/jitsi/jitsi-meet
parent
63761d515a
commit
02f0057578
@ -1,21 +0,0 @@ |
||||
#e2ee-section { |
||||
display: flex; |
||||
flex-direction: column; |
||||
|
||||
.description { |
||||
font-size: 13px; |
||||
margin: 15px 0; |
||||
} |
||||
|
||||
.control-row { |
||||
display: flex; |
||||
flex-direction: row; |
||||
justify-content: space-between; |
||||
margin-top: 15px; |
||||
|
||||
label { |
||||
font-size: 14px; |
||||
font-weight: bold; |
||||
} |
||||
} |
||||
} |
@ -1,15 +0,0 @@ |
||||
.notice { |
||||
position: absolute; |
||||
left: 50%; |
||||
z-index: $zindex3; |
||||
margin-top: 6px; |
||||
|
||||
@include transform(translateX(-50%)); |
||||
|
||||
&__message { |
||||
background-color: #000000; |
||||
color: white; |
||||
padding: 3px; |
||||
border-radius: 5px; |
||||
} |
||||
} |
@ -1,43 +1,43 @@ |
||||
import React from 'react'; |
||||
import { connect } from 'react-redux'; |
||||
import { useSelector } from 'react-redux'; |
||||
import { makeStyles } from 'tss-react/mui'; |
||||
|
||||
import { IReduxState } from '../../../app/types'; |
||||
|
||||
interface IProps { |
||||
_message?: string; |
||||
} |
||||
const useStyles = makeStyles()(theme => { |
||||
return { |
||||
notice: { |
||||
position: 'absolute', |
||||
left: '50%', |
||||
zIndex: 3, |
||||
marginTop: theme.spacing(2), |
||||
transform: 'translateX(-50%)' |
||||
}, |
||||
|
||||
message: { |
||||
backgroundColor: theme.palette.uiBackground, |
||||
color: theme.palette.text01, |
||||
padding: '3px', |
||||
borderRadius: '5px' |
||||
} |
||||
}; |
||||
}); |
||||
|
||||
const Notice = () => { |
||||
const message = useSelector((state: IReduxState) => state['features/base/config'].noticeMessage); |
||||
const { classes } = useStyles(); |
||||
|
||||
const Notice = ({ _message }: IProps) => { |
||||
if (!_message) { |
||||
if (!message) { |
||||
return null; |
||||
} |
||||
|
||||
return ( |
||||
<div className = 'notice'> |
||||
<span className = 'notice__message' > |
||||
{_message} |
||||
<div className = { classes.notice }> |
||||
<span className = { classes.message } > |
||||
{message} |
||||
</span> |
||||
</div> |
||||
); |
||||
}; |
||||
|
||||
/** |
||||
* Maps (parts of) the Redux state to the associated |
||||
* {@code Notice}'s props. |
||||
* |
||||
* @param {Object} state - The Redux state. |
||||
* @private |
||||
* @returns {{ |
||||
* _message: string, |
||||
* }} |
||||
*/ |
||||
function _mapStateToProps(state: IReduxState) { |
||||
const { |
||||
noticeMessage |
||||
} = state['features/base/config']; |
||||
|
||||
return { |
||||
_message: noticeMessage |
||||
}; |
||||
} |
||||
export default connect(_mapStateToProps)(Notice); |
||||
export default Notice; |
||||
|
Loading…
Reference in new issue