diff --git a/src/frontend/components/Button/ButtonLayout/index.tsx b/src/frontend/components/Button/ButtonLayout/index.tsx
index d07c4a01c4..7db514285a 100644
--- a/src/frontend/components/Button/ButtonLayout/index.tsx
+++ b/src/frontend/components/Button/ButtonLayout/index.tsx
@@ -20,6 +20,12 @@ const IconBox = styled(Box)`
text-align: center;
`;
+const BadgeBox = styled(Box)`
+ bottom: 15px;
+ left: 25px;
+ position: relative;
+`;
+
const TextBox = styled(Box)`
display: flex;
margin-top: 6px;
@@ -77,7 +83,9 @@ export const ButtonLayout = ({
{Icon && (
- {badge}
+
+ {badge}
+
)}
diff --git a/src/frontend/components/LiveControls/BadgeNotification/index.tsx b/src/frontend/components/LiveControls/BadgeNotification/index.tsx
new file mode 100644
index 0000000000..515f8bc596
--- /dev/null
+++ b/src/frontend/components/LiveControls/BadgeNotification/index.tsx
@@ -0,0 +1,33 @@
+import { Box, Text } from 'grommet';
+import React from 'react';
+import styled from 'styled-components';
+
+const StyledText = styled(Text)`
+ font-family: 'Roboto-Bold';
+`;
+
+interface BadgeNotificationProps {
+ color: string;
+ nbrOfNotifications: number;
+}
+export const BadgeNotification = ({
+ color,
+ nbrOfNotifications,
+}: BadgeNotificationProps) => {
+ return (
+
+
+ {nbrOfNotifications}
+
+
+ );
+};
diff --git a/src/frontend/components/LiveControls/ViewersWrapper/StudentHideViewersButton/__image_snapshots__/index-spec-tsx-student-hide-viewers-button-closes-the-panel-and-select-viewers-item-1-snap.png b/src/frontend/components/LiveControls/ViewersWrapper/StudentHideViewersButton/__image_snapshots__/index-spec-tsx-student-hide-viewers-button-closes-the-panel-and-select-viewers-item-1-snap.png
new file mode 100644
index 0000000000..29d2e18fc0
Binary files /dev/null and b/src/frontend/components/LiveControls/ViewersWrapper/StudentHideViewersButton/__image_snapshots__/index-spec-tsx-student-hide-viewers-button-closes-the-panel-and-select-viewers-item-1-snap.png differ
diff --git a/src/frontend/components/LiveControls/ViewersWrapper/StudentHideViewersButton/index.tsx b/src/frontend/components/LiveControls/ViewersWrapper/StudentHideViewersButton/index.tsx
index 71309827c4..123b9bd4a5 100644
--- a/src/frontend/components/LiveControls/ViewersWrapper/StudentHideViewersButton/index.tsx
+++ b/src/frontend/components/LiveControls/ViewersWrapper/StudentHideViewersButton/index.tsx
@@ -2,6 +2,7 @@ import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import { Button } from 'components/Button';
+import { BadgeNotification } from 'components/LiveControls/BadgeNotification';
import { ViewersSVG } from 'components/SVGIcons/ViewersSVG';
import { useLivePanelState } from 'data/stores/useLivePanelState';
@@ -18,7 +19,13 @@ const messages = defineMessages({
},
});
-export const StudentHideViewersButton = () => {
+interface StudentHideViewersButtonProps {
+ nbrOfOnStageRequests?: number;
+}
+
+export const StudentHideViewersButton = ({
+ nbrOfOnStageRequests,
+}: StudentHideViewersButtonProps) => {
const intl = useIntl();
const { setPanelVisibility } = useLivePanelState((state) => ({
setPanelVisibility: state.setPanelVisibility,
@@ -27,6 +34,14 @@ export const StudentHideViewersButton = () => {
return (
+ ) : undefined
+ }
Icon={ViewersSVG}
onClick={() => {
setPanelVisibility(false);
diff --git a/src/frontend/components/LiveControls/ViewersWrapper/StudentShowViewersButton/index.tsx b/src/frontend/components/LiveControls/ViewersWrapper/StudentShowViewersButton/index.tsx
index 817c441c88..2a5770405b 100644
--- a/src/frontend/components/LiveControls/ViewersWrapper/StudentShowViewersButton/index.tsx
+++ b/src/frontend/components/LiveControls/ViewersWrapper/StudentShowViewersButton/index.tsx
@@ -2,6 +2,7 @@ import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import { Button } from 'components/Button';
+import { BadgeNotification } from 'components/LiveControls/BadgeNotification';
import { ViewersSVG } from 'components/SVGIcons/ViewersSVG';
import {
LivePanelItem,
@@ -21,7 +22,12 @@ const messages = defineMessages({
},
});
-export const StudentShowViewersButton = () => {
+interface StudentShowViewersButtonProps {
+ nbrOfOnStageRequests?: number;
+}
+export const StudentShowViewersButton = ({
+ nbrOfOnStageRequests,
+}: StudentShowViewersButtonProps) => {
const intl = useIntl();
const { setPanelVisibility } = useLivePanelState((state) => ({
setPanelVisibility: state.setPanelVisibility,
@@ -29,6 +35,14 @@ export const StudentShowViewersButton = () => {
return (
+ ) : undefined
+ }
label={intl.formatMessage(messages.viewers)}
Icon={ViewersSVG}
onClick={() => {
diff --git a/src/frontend/components/LiveControls/ViewersWrapper/index.tsx b/src/frontend/components/LiveControls/ViewersWrapper/index.tsx
index e9c8786732..d363234cad 100644
--- a/src/frontend/components/LiveControls/ViewersWrapper/index.tsx
+++ b/src/frontend/components/LiveControls/ViewersWrapper/index.tsx
@@ -4,19 +4,30 @@ import {
LivePanelItem,
useLivePanelState,
} from 'data/stores/useLivePanelState';
-
+import { Video } from 'types/tracks';
import { StudentHideViewersButton } from './StudentHideViewersButton';
import { StudentShowViewersButton } from './StudentShowViewersButton';
-export const ViewersWrapper = () => {
+interface ViewersWrapperProps {
+ video?: Video;
+}
+
+export const ViewersWrapper = ({ video }: ViewersWrapperProps) => {
const { currentItem, isPanelVisible } = useLivePanelState((state) => ({
currentItem: state.currentItem,
isPanelVisible: state.isPanelVisible,
}));
+ const nbrOfOnStageRequests =
+ video && video.participants_asking_to_join.length;
+
if (currentItem === LivePanelItem.VIEWERS_LIST && isPanelVisible) {
- return ;
+ return (
+
+ );
} else {
- return ;
+ return (
+
+ );
}
};
diff --git a/src/frontend/components/SVGIcons/__image_snapshots__/join-discussion-svg-spec-tsx-join-discussion-svg-renders-join-discussion-svg-focus-2-snap.png b/src/frontend/components/SVGIcons/__image_snapshots__/join-discussion-svg-spec-tsx-join-discussion-svg-renders-join-discussion-svg-focus-2-snap.png
new file mode 100644
index 0000000000..9e5e96a430
Binary files /dev/null and b/src/frontend/components/SVGIcons/__image_snapshots__/join-discussion-svg-spec-tsx-join-discussion-svg-renders-join-discussion-svg-focus-2-snap.png differ
diff --git a/src/frontend/components/SVGIcons/__image_snapshots__/viewers-svg-spec-tsx-viewers-svg-renders-viewers-svg-focus-2-snap.png b/src/frontend/components/SVGIcons/__image_snapshots__/viewers-svg-spec-tsx-viewers-svg-renders-viewers-svg-focus-2-snap.png
new file mode 100644
index 0000000000..7ba55661bb
Binary files /dev/null and b/src/frontend/components/SVGIcons/__image_snapshots__/viewers-svg-spec-tsx-viewers-svg-renders-viewers-svg-focus-2-snap.png differ
diff --git a/src/frontend/components/SVGIcons/__image_snapshots__/waiting-join-discussion-svg-spec-tsx-waiting-join-discussion-svg-renders-waiting-join-discussion-svg-focus-2-snap.png b/src/frontend/components/SVGIcons/__image_snapshots__/waiting-join-discussion-svg-spec-tsx-waiting-join-discussion-svg-renders-waiting-join-discussion-svg-focus-2-snap.png
new file mode 100644
index 0000000000..62accbfa5f
Binary files /dev/null and b/src/frontend/components/SVGIcons/__image_snapshots__/waiting-join-discussion-svg-spec-tsx-waiting-join-discussion-svg-renders-waiting-join-discussion-svg-focus-2-snap.png differ
diff --git a/src/frontend/components/TeacherLiveControlBar/index.tsx b/src/frontend/components/TeacherLiveControlBar/index.tsx
index 108dc8822c..b6fcf07eaa 100644
--- a/src/frontend/components/TeacherLiveControlBar/index.tsx
+++ b/src/frontend/components/TeacherLiveControlBar/index.tsx
@@ -65,7 +65,7 @@ export const TeacherLiveControlBar = ({
{availableItems.includes(LivePanelItem.VIEWERS_LIST) && (
-
+
)}