snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
44
react/features/conference/components/web/Notice.tsx
Normal file
44
react/features/conference/components/web/Notice.tsx
Normal file
@@ -0,0 +1,44 @@
|
||||
import React from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { makeStyles } from 'tss-react/mui';
|
||||
|
||||
import { IReduxState } from '../../../app/types';
|
||||
|
||||
const useStyles = makeStyles()(theme => {
|
||||
return {
|
||||
notice: {
|
||||
position: 'absolute',
|
||||
left: '50%',
|
||||
zIndex: 3,
|
||||
marginTop: theme.spacing(2),
|
||||
transform: 'translateX(-50%)'
|
||||
},
|
||||
|
||||
message: {
|
||||
backgroundColor: theme.palette.conferenceNoticeBackground,
|
||||
color: theme.palette.conferenceNoticeText,
|
||||
padding: '3px',
|
||||
borderRadius: '5px'
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
const Notice = () => {
|
||||
const message = useSelector((state: IReduxState) => state['features/base/config'].noticeMessage);
|
||||
const { reducedUI } = useSelector((state: IReduxState) => state['features/base/responsive-ui']);
|
||||
const { classes } = useStyles();
|
||||
|
||||
if (!message || reducedUI) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className = { classes.notice }>
|
||||
<span className = { classes.message } >
|
||||
{message}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Notice;
|
||||
Reference in New Issue
Block a user