diff --git a/bigbluebutton-html5/imports/ui/components/banner-bar/component.jsx b/bigbluebutton-html5/imports/ui/components/banner-bar/component.jsx
new file mode 100644
index 0000000000..eee30910d8
--- /dev/null
+++ b/bigbluebutton-html5/imports/ui/components/banner-bar/component.jsx
@@ -0,0 +1,21 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import NotificationsBar from '/imports/ui/components/notifications-bar/component';
+import { styles } from './styles';
+
+const BannerBar = ({ text, color }) => text && (
+
+
+ {text}
+
+
+);
+
+BannerBar.propTypes = {
+ text: PropTypes.string.isRequired,
+ color: PropTypes.string.isRequired,
+};
+
+export default BannerBar;
diff --git a/bigbluebutton-html5/imports/ui/components/banner-bar/container.jsx b/bigbluebutton-html5/imports/ui/components/banner-bar/container.jsx
new file mode 100644
index 0000000000..df1ba9f41f
--- /dev/null
+++ b/bigbluebutton-html5/imports/ui/components/banner-bar/container.jsx
@@ -0,0 +1,8 @@
+import { Session } from 'meteor/session';
+import { withTracker } from 'meteor/react-meteor-data';
+import BannerComponent from './component';
+
+export default withTracker(() => ({
+ color: Session.get('bannerColor') || '#0F70D7',
+ text: Session.get('bannerText') || '',
+}))(BannerComponent);
diff --git a/bigbluebutton-html5/imports/ui/components/banner-bar/styles.scss b/bigbluebutton-html5/imports/ui/components/banner-bar/styles.scss
new file mode 100644
index 0000000000..3421702e34
--- /dev/null
+++ b/bigbluebutton-html5/imports/ui/components/banner-bar/styles.scss
@@ -0,0 +1,6 @@
+@import "/imports/ui/stylesheets/variables/_all";
+
+.bannerTextColor {
+ @extend %text-elipsis;
+ color: var(--color-white);
+}
\ No newline at end of file
diff --git a/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx b/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx
index 9c140bdc89..5153b6c819 100644
--- a/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx
+++ b/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx
@@ -111,6 +111,12 @@ class JoinHandler extends Component {
resolve(true);
});
};
+
+ const setBannerProps = (resp) => {
+ Session.set('bannerText', resp.bannerText);
+ Session.set('bannerColor', resp.bannerColor);
+ };
+
// use enter api to get params for the client
const url = `/bigbluebutton/api/enter?sessionToken=${sessionToken}`;
const fetchContent = await fetch(url, { credentials: 'same-origin' });
@@ -122,6 +128,8 @@ class JoinHandler extends Component {
if (response.returncode !== 'FAILED') {
await setAuth(response);
await setCustomData(response);
+
+ setBannerProps(response);
setLogoURL(response);
logUserInfo();
diff --git a/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx b/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx
index 57d08d3e70..74551cded1 100755
--- a/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx
+++ b/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx
@@ -176,7 +176,7 @@ class NavBar extends PureComponent {
if (!userOnMeeting) return;
- if ((!didSendBreakoutInvite && !isBreakoutRoom) ) {
+ if ((!didSendBreakoutInvite && !isBreakoutRoom)) {
this.inviteUserToBreakout(breakout);
}
});
diff --git a/bigbluebutton-html5/imports/ui/components/notifications-bar/component.jsx b/bigbluebutton-html5/imports/ui/components/notifications-bar/component.jsx
index 04a9e71c6c..2d80bdfab2 100644
--- a/bigbluebutton-html5/imports/ui/components/notifications-bar/component.jsx
+++ b/bigbluebutton-html5/imports/ui/components/notifications-bar/component.jsx
@@ -9,7 +9,7 @@ const COLORS = [
];
const propTypes = {
- color: PropTypes.oneOf(COLORS),
+ color: PropTypes.string,
};
const defaultProps = {
@@ -17,13 +17,24 @@ const defaultProps = {
};
const NotificationsBar = (props) => {
- const { color, children } = props;
+ const {
+ color,
+ children,
+ alert,
+ } = props;
+
+ const hasColor = COLORS.includes(color);
return (
{children}
diff --git a/bigbluebutton-html5/imports/ui/components/notifications-bar/container.jsx b/bigbluebutton-html5/imports/ui/components/notifications-bar/container.jsx
index 2a4e285883..655b53243d 100644
--- a/bigbluebutton-html5/imports/ui/components/notifications-bar/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/notifications-bar/container.jsx
@@ -63,11 +63,11 @@ const intlMessages = defineMessages({
});
const NotificationsBarContainer = (props) => {
- if (_.isEmpty(props.message)) {
+ const { message, color } = props;
+ if (_.isEmpty(message)) {
return null;
}
- const { message, color } = props;
return (
@@ -144,7 +144,9 @@ export default injectIntl(withTracker(({ intl }) => {
breakoutRoom={currentBreakout}
messageDuration={intlMessages.breakoutTimeRemaining}
timeEndedMessage={intlMessages.breakoutWillClose}
- alertMessageUnderOneMinute={intl.formatMessage(intlMessages.alertBreakoutEndsUnderOneMinute)}
+ alertMessageUnderOneMinute={
+ intl.formatMessage(intlMessages.alertBreakoutEndsUnderOneMinute)
+ }
/>
);
}
@@ -164,13 +166,15 @@ export default injectIntl(withTracker(({ intl }) => {
breakoutRoom={Meeting.durationProps}
messageDuration={intlMessages.meetingTimeRemaining}
timeEndedMessage={intlMessages.meetingWillClose}
- alertMessageUnderOneMinute={intl.formatMessage(intlMessages.alertMeetingEndsUnderOneMinute)}
+ alertMessageUnderOneMinute={
+ intl.formatMessage(intlMessages.alertMeetingEndsUnderOneMinute)
+ }
/>
);
}
}
-
+ data.alert = true;
data.color = 'primary';
return data;
})(NotificationsBarContainer));