diff --git a/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/component.jsx b/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/component.jsx index b80e617b4b..1438158fb2 100755 --- a/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/component.jsx @@ -4,8 +4,7 @@ import humanizeSeconds from '/imports/utils/humanizeSeconds'; import Tooltip from '/imports/ui/components/tooltip/component'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; -import cx from 'classnames'; -import { styles } from './styles'; +import Styled from './styles'; const intlMessages = defineMessages({ notificationRecordingStart: { @@ -138,7 +137,7 @@ class RecordingIndicator extends PureComponent { }; const recordingIndicatorIcon = ( - + - + ); const showButton = amIModerator && allowStartStopRecording; const recordMeetingButton = ( -
{recordingIndicatorIcon} -
- + + {`${title} ${recording ? humanizeSeconds(time) : ''}`} - + {recording ? {humanizeSeconds(time)} : {recordTitle}} -
-
+ + ); const recordMeetingButtonWithTooltip = ( @@ -195,9 +194,9 @@ class RecordingIndicator extends PureComponent { return ( {record - ? | + ? | : null} -
+ {showButton ? recordingButton : null} @@ -208,20 +207,19 @@ class RecordingIndicator extends PureComponent { ? intlMessages.notificationRecordingStart : intlMessages.notificationRecordingStop)}`} > -
{recordingIndicatorIcon} {recording - ?
{humanizeSeconds(time)}
: null} -
+ ? {humanizeSeconds(time)} : null} + )} -
+
); } diff --git a/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/styles.js b/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/styles.js new file mode 100644 index 0000000000..08449901ff --- /dev/null +++ b/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/styles.js @@ -0,0 +1,138 @@ +import styled from 'styled-components'; +import { fontSizeLarge, fontSizeBase } from '/imports/ui/stylesheets/styled-components/typography'; +import { + smPaddingX, + borderSize, + borderSizeLarge, + borderSizeSmall, +} from '/imports/ui/stylesheets/styled-components/general'; +import { colorWhite, colorPrimary, colorGray } from '/imports/ui/stylesheets/styled-components/palette'; + +const RecordingIndicatorIcon = styled.span` + width: ${fontSizeLarge}; + height: ${fontSizeLarge}; + font-size: ${fontSizeBase}; + + ${({ titleMargin }) => titleMargin && ` + [dir="ltr"] & { + margin-right: ${smPaddingX}; + } + `} +`; + +const RecordingControl = styled.div` + display: flex; + border-radius: 2em 2em; + align-items: center; + + span { + border: none; + box-shadow: none; + background-color: transparent !important; + color: ${colorWhite} !important; + } + + &:hover { + color: ${colorWhite} !important; + cursor: pointer; + } + + &:focus { + outline: none; + box-shadow: 0 0 0 ${borderSize} ${colorPrimary}; + } + + ${({ recording }) => recording && ` + padding: 5px; + background-color: ${colorPrimary}; + border: ${borderSizeLarge} solid ${colorPrimary}; + + &:focus { + background-clip: padding-box; + border: ${borderSizeLarge} solid transparent; + } + `} + + ${({ recording }) => !recording && ` + padding: 7px; + border: ${borderSizeSmall} solid ${colorWhite}; + + &:focus { + padding: 5px; + border: ${borderSizeLarge} solid ${colorWhite}; + box-shadow: none; + } + `} +`; + +const PresentationTitle = styled.div` + display: flex; + flex-direction: column; + justify-content: center; + font-weight: 200; + color: ${colorWhite}; + font-size: ${fontSizeBase}; + padding: 0; + margin-right: 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 30vw; + + [dir="rtl"] & { + margin-left: 0; + margin-right: ${smPaddingX}; + } + + & > [class^="icon-bbb-"] { + font-size: 75%; + } + + span { + vertical-align: middle; + } +`; + +const VisuallyHidden = styled.span` + position: absolute; + overflow: hidden; + clip: rect(0 0 0 0); + height: 1px; width: 1px; + margin: -1px; padding: 0; border: 0; +`; + +const PresentationTitleSeparator = styled.span` + color: ${colorGray}; + font-size: ${fontSizeBase}; + margin: 0 1rem; +`; + +const RecordingIndicator = styled.div` + &:hover { + outline: transparent; + outline-style: dotted; + outline-width: ${borderSize}; + } + + &:active, + &:focus, + &:focus-within { + outline: transparent; + outline-width: ${borderSize}; + outline-style: solid; + } +`; + +const RecordingStatusViewOnly = styled.div` + display: flex; +`; + +export default { + RecordingIndicatorIcon, + RecordingControl, + PresentationTitle, + VisuallyHidden, + PresentationTitleSeparator, + RecordingIndicator, + RecordingStatusViewOnly, +}; diff --git a/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/styles.scss b/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/styles.scss deleted file mode 100755 index ba86dce484..0000000000 --- a/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/styles.scss +++ /dev/null @@ -1,122 +0,0 @@ -@import '/imports/ui/stylesheets/mixins/_indicators'; -@import "/imports/ui/stylesheets/variables/placeholders"; - -.visuallyHidden { - position: absolute; - overflow: hidden; - clip: rect(0 0 0 0); - height: 1px; width: 1px; - margin: -1px; padding: 0; border: 0; -} - -%recordingControl { - display: flex; - border-radius: 2em 2em; - align-items: center; - - span { - border: none; - box-shadow: none; - background-color: transparent !important; - color: var(--color-white) !important; - } - - &:hover { - color: var(--color-white) !important; - cursor: pointer; - } - - &:focus { - outline: none; - box-shadow: 0 0 0 var(--border-size) var(--color-primary); - } -} - -.recordingControlON { - @extend %recordingControl; - - padding: 5px; - background-color: var(--color-primary); - border: var(--border-size-large) solid var(--color-primary); - - &:focus { - background-clip: padding-box; - border: var(--border-size-large) solid transparent; - } -} - -.recordingControlOFF { - @extend %recordingControl; - - padding: 7px; - border: var(--border-size-small) solid var(--color-white); - - &:focus { - padding: 5px; - border: var(--border-size-large) solid var(--color-white); - box-shadow: none; - } -} - -.presentationTitle { - display: flex; - flex-direction: column; - justify-content: center; - font-weight: 200; - color: var(--color-white); - font-size: var(--font-size-base); - padding: 0; - margin-right: 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - max-width: 30vw; - - [dir="rtl"] & { - margin-left: 0; - margin-right: var(--sm-padding-x); - } - - > [class^="icon-bbb-"] { - font-size: 75%; - } - - span { - vertical-align: middle; - } -} - -.presentationTitleMargin { - [dir="ltr"] & { - margin-right: var(--sm-padding-x); - } -} - -.recordingStatusViewOnly { - display: flex; -} - -.recordingIndicatorIcon { - width: var(--font-size-large); - height: var(--font-size-large); - font-size: var(--font-size-base); -} - -.recordingIndicator { - &:hover { - @extend %highContrastOutline; - } - - &:active, - &:focus, - &:focus-within { - @extend %highContrastOutline; - outline-style: solid; - } -} - -.presentationTitleSeparator { - color: var(--color-gray); - font-size: var(--font-size-base); - margin: 0 1rem; -}