2021-12-28 14:35:21 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { useTranslation } from 'react-i18next';
|
2022-09-13 07:36:00 +00:00
|
|
|
import { makeStyles } from 'tss-react/mui';
|
2018-10-30 05:02:23 +00:00
|
|
|
|
2022-11-22 13:56:37 +00:00
|
|
|
import TimelineAxis from './TimelineAxis';
|
2017-02-17 00:59:30 +00:00
|
|
|
|
2022-11-15 07:50:22 +00:00
|
|
|
const useStyles = makeStyles()(theme => {
|
2021-12-28 14:35:21 +00:00
|
|
|
return {
|
|
|
|
labels: {
|
|
|
|
padding: '22px 0 7px 0',
|
2022-11-22 13:56:37 +00:00
|
|
|
height: 20,
|
|
|
|
'& .avatar-placeholder': {
|
|
|
|
width: '32px',
|
|
|
|
marginRight: theme.spacing(3)
|
|
|
|
|
|
|
|
}
|
2021-12-28 14:35:21 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2017-02-17 00:59:30 +00:00
|
|
|
/**
|
2018-10-30 05:02:23 +00:00
|
|
|
* The type of the React {@code Component} props of {@link SpeakerStatsLabels}.
|
2017-02-17 00:59:30 +00:00
|
|
|
*/
|
2022-11-03 08:35:51 +00:00
|
|
|
interface IProps {
|
2018-10-30 05:02:23 +00:00
|
|
|
|
2021-11-17 14:33:03 +00:00
|
|
|
/**
|
2022-04-06 09:10:31 +00:00
|
|
|
* True if the face expressions detection is not disabled.
|
2021-11-17 14:33:03 +00:00
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
showFaceExpressions: boolean;
|
2022-11-03 08:35:51 +00:00
|
|
|
}
|
2017-02-17 00:59:30 +00:00
|
|
|
|
2022-11-03 08:35:51 +00:00
|
|
|
const SpeakerStatsLabels = (props: IProps) => {
|
2021-12-28 14:35:21 +00:00
|
|
|
const { t } = useTranslation();
|
2022-09-13 07:36:00 +00:00
|
|
|
const { classes } = useStyles();
|
2021-12-28 14:35:21 +00:00
|
|
|
const nameTimeClass = `name-time${
|
2022-11-22 13:56:37 +00:00
|
|
|
props.showFaceExpressions ? ' expressions-on' : ''
|
2021-12-28 14:35:21 +00:00
|
|
|
}`;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className = { `row ${classes.labels}` }>
|
2022-11-22 13:56:37 +00:00
|
|
|
<div className = 'avatar-placeholder' />
|
2021-12-28 14:35:21 +00:00
|
|
|
|
|
|
|
<div className = { nameTimeClass }>
|
|
|
|
<div>
|
2017-02-17 00:59:30 +00:00
|
|
|
{ t('speakerStats.name') }
|
|
|
|
</div>
|
2021-12-28 14:35:21 +00:00
|
|
|
<div>
|
2017-02-17 00:59:30 +00:00
|
|
|
{ t('speakerStats.speakerTime') }
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-11-22 13:56:37 +00:00
|
|
|
{props.showFaceExpressions && <TimelineAxis />}
|
2021-12-28 14:35:21 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
2017-02-17 00:59:30 +00:00
|
|
|
|
2021-12-28 14:35:21 +00:00
|
|
|
export default SpeakerStatsLabels;
|