bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/screenshare/styles.js

136 lines
2.8 KiB
JavaScript
Raw Normal View History

2021-11-06 00:36:03 +08:00
import styled from 'styled-components';
import {
colorWhite,
colorContentBackground,
} from '/imports/ui/stylesheets/styled-components/palette';
import SpinnerStyles from '/imports/ui/components/common/loading-screen/styles';
2021-11-06 00:36:03 +08:00
const ScreenshareContainerInside = styled.div`
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
text-align: center;
`;
const MainText = styled.h1`
color: ${colorWhite};
font-size: 1.3rem;
font-weight: 600;
`;
const ScreenshareVideo = styled.video`
2022-01-27 00:55:01 +08:00
${({ unhealthyStream }) => unhealthyStream && `
2021-11-06 00:36:03 +08:00
filter: grayscale(50%) opacity(50%);
`}
`;
const ScreenshareContainer = styled.div`
position: relative;
2021-11-06 00:36:03 +08:00
background-color: ${colorContentBackground};
width: 100%;
height: 100%;
${({ switched }) => !switched && `
2022-01-27 00:55:01 +08:00
display: flex;
align-items: center;
justify-content: center;
2021-11-06 00:36:03 +08:00
flex-direction: column;
`}
`;
const ScreenshareContainerDefault = styled.div`
position: absolute;
align-items: center;
justify-content: center;
padding-top: 4rem;
`;
const SpinnerWrapper = styled.div`
position: absolute;
display: flex;
align-items: center;
justify-content: center;
z-index: 1;
width: 100%;
height: 100%;
`;
const Spinner = styled(SpinnerStyles.Spinner)``;
const Bounce1 = styled(SpinnerStyles.Bounce1)``;
const Bounce2 = styled(SpinnerStyles.Bounce2)``;
const MobileControlsOverlay = styled.span`
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
background-color: transparent;
`;
const HoverToolbar = styled.div`
${({ toolbarStyle }) => toolbarStyle === 'hoverToolbar' && `
display: none;
2022-09-02 00:48:59 +08:00
#screenshareContainer:hover > & {
display: flex;
}
`}
${({ toolbarStyle }) => toolbarStyle === 'dontShowMobileHoverToolbar' && `
display: none;
`}
${({ toolbarStyle }) => toolbarStyle === 'showMobileHoverToolbar' && `
display: flex;
z-index: 2;
`}
`;
const ScreenshareButtonsContainterWrapper = styled.div`
position: absolute;
z-index: 2;
display: flex;
width: 50%;
${({ positionXAxis }) => positionXAxis === 'right' && `
right: 0;
flex-direction: row-reverse;
`}
${({ positionXAxis }) => positionXAxis === 'left' && `
left: 0;
`}
${({ positionYAxis }) => positionYAxis === 'top' && `
top: 0;
`}
${({ positionYAxis }) => positionYAxis === 'bottom' && `
bottom: 0;
`}
`;
const FullscreenButtonWrapperForScreenshare = styled.div`
& > * {
position: relative !important;
}
`;
2021-11-06 00:36:03 +08:00
export default {
FullscreenButtonWrapperForScreenshare,
ScreenshareButtonsContainterWrapper,
2021-11-06 00:36:03 +08:00
ScreenshareContainerInside,
MainText,
ScreenshareVideo,
ScreenshareContainer,
ScreenshareContainerDefault,
SpinnerWrapper,
Spinner,
Bounce1,
Bounce2,
MobileControlsOverlay,
HoverToolbar,
2022-01-27 00:55:01 +08:00
};