Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

refactor(speaker-stats) use jss instead of sass in SpeakerStats (#11121)

Shahab320aeaa4df0d
diff --git a/css/main.scss b/css/main.scss
index 3aa7ab140b..26726ef406 100644
--- a/css/main.scss
+++ b/css/main.scss
@@ -42,7 +42,6 @@ $flagsImagePath: "../images/";
@import 'modals/settings/settings';
@import 'modals/screen-share/share-audio';
@import 'modals/screen-share/share-screen-warning';
-@import 'modals/speaker_stats/speaker_stats';
@import 'modals/virtual-background/virtual-background';
@import 'modals/local-recording/local-recording';
@import 'videolayout_default';
diff --git a/css/modals/speaker_stats/_speaker_stats.scss b/css/modals/speaker_stats/_speaker_stats.scss
deleted file mode 100644
index 51e037564d..0000000000
--- a/css/modals/speaker_stats/_speaker_stats.scss
+++ /dev/null
@@ -1,30 +0,0 @@
-.speaker-stats {
- list-style: none;
- .row{
- display: flex;
- align-items: center;
- .avatar {
- width: 32px;
- margin-right: 16px;
- }
- .name-time {
- width: calc(100% - 48px);
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- }
- .name-time_expressions-on {
- width: calc(47% - 48px);
- }
- .expressions {
- width: calc(53% - 29px);
- display: flex;
- justify-content: space-between;
- .expression {
- width: 30px;
- text-align: center;
- }
- }
- }
-}
diff --git a/react/features/speaker-stats/components/web/SpeakerStats.js b/react/features/speaker-stats/components/web/SpeakerStats.js
index 28892389b0..e9a1ccc5ec 100644
--- a/react/features/speaker-stats/components/web/SpeakerStats.js
+++ b/react/features/speaker-stats/components/web/SpeakerStats.js
@@ -20,6 +20,39 @@ import SpeakerStatsSearch from './SpeakerStatsSearch';
const useStyles = makeStyles(theme => {
return {
+ speakerStats: {
+ '& .row': {
+ display: 'flex',
+ alignItems: 'center',
+
+ '& .avatar': {
+ width: '32px',
+ marginRight: theme.spacing(3)
+ },
+
+ '& .name-time': {
+ width: 'calc(100% - 48px)',
+ display: 'flex',
+ justifyContent: 'space-between',
+ alignItems: 'center'
+ },
+
+ '& .name-time_expressions-on': {
+ width: 'calc(47% - 48px)'
+ },
+
+ '& .expressions': {
+ width: 'calc(53% - 29px)',
+ display: 'flex',
+ justifyContent: 'space-between',
+
+ '& .expression': {
+ width: '30px',
+ textAlign: 'center'
+ }
+ }
+ }
+ },
footer: {
display: 'none !important'
},
@@ -85,7 +118,7 @@ const SpeakerStats = () => {
submitDisabled = { true }
titleKey = 'speakerStats.speakerStats'
width = { showFacialExpressions ? '664px' : 'small' }>
- <div className = 'speaker-stats'>
+ <div className = { classes.speakerStats }>
<div
className = {
`${classes.searchSwitchContainer}
diff --git a/react/features/speaker-stats/components/web/SpeakerStatsItem.js b/react/features/speaker-stats/components/web/SpeakerStatsItem.js
index bfcac544d0..d3b85bbee0 100644
--- a/react/features/speaker-stats/components/web/SpeakerStatsItem.js
+++ b/react/features/speaker-stats/components/web/SpeakerStatsItem.js
@@ -67,12 +67,6 @@ type Props = {
}
const SpeakerStatsItem = (props: Props) => {
- /**
- * Implements React's {@link Component#render()}.
- *
- * @inheritdoc
- * @returns {ReactElement}
- */
const hasLeftClass = props.hasLeft ? props.styles.hasLeft : '';
const rowDisplayClass = `row ${hasLeftClass} ${props.styles.item}`;
const expressionClass = 'expression';