style(##2572): fix style for highlights video and add demo video

keep-around/af97087ab78c2ed15d86ddf963fb78f0946962ba
Andrei Dekterev 3 years ago
parent aba2bc10f9
commit af97087ab7
  1. 2
      src/features/Common/Input/styled.tsx
  2. 4
      src/pages/HighlightsPage/components/FormHighlights/hooks.tsx
  3. 4
      src/pages/HighlightsPage/components/FormHighlights/styled.tsx
  4. 4
      src/pages/HighlightsPage/components/PriceInfo/styled.tsx
  5. 16
      src/pages/HighlightsPage/components/VideoHighlight/index.tsx
  6. 17
      src/pages/HighlightsPage/components/VideoHighlight/styled.tsx
  7. 2
      src/pages/HighlightsPage/index.tsx
  8. 12
      src/pages/HighlightsPage/styled.tsx

@ -216,6 +216,6 @@ export const LabelAfter = styled.span<TitleProps>`
` `
export const LabelBefore = styled(LabelAfter)` export const LabelBefore = styled(LabelAfter)`
margin-left: -40px; margin-left: -30px;
padding-top: 5px; padding-top: 5px;
` `

@ -180,6 +180,10 @@ export const useHighlightsForm = () => {
} }
const onChangeTeam = (e: ChangeEvent<HTMLInputElement>) => { const onChangeTeam = (e: ChangeEvent<HTMLInputElement>) => {
if (!e.target.value) {
setTeams([])
}
setFormState((state: FormType) => ({ setFormState((state: FormType) => ({
...state, ...state,
selectedTeam: null, selectedTeam: null,

@ -97,11 +97,11 @@ export const ScForm = styled.form`
.FormHighlights__input__sound { .FormHighlights__input__sound {
& input { & input {
margin-left: 33px; margin-left: 25px;
${isMobileDevice ${isMobileDevice
? css` ? css`
margin-left: 20px; margin-left: 10px;
` `
: ''}; : ''};
} }

@ -10,14 +10,14 @@ export const ScPriceInfo = styled.div`
justify-content: center; justify-content: center;
align-content: center; align-content: center;
color: #FFFFFF; color: #FFFFFF;
padding: 21px 21px 21px 40px; padding: 10px 21px;
font-weight: 600; font-weight: 600;
font-size: 20px; font-size: 20px;
line-height: 28px; line-height: 28px;
> * { > * {
margin: 15px 0; margin: 10px 0;
${isMobileDevice ${isMobileDevice
? css` ? css`

@ -1,10 +1,13 @@
import { useRef } from 'react' import { useRef } from 'react'
import { VideoPlayer } from 'features/VideoPlayer' import { VideoPlayer } from 'features/VideoPlayer'
import { Icon } from 'features/Icon'
import { readToken } from 'helpers' import { readToken } from 'helpers'
import { ScModal } from './styled' import { isProduction } from 'config/env'
import { ScModal, ScCloseButton } from './styled'
interface VideoPropsType { interface VideoPropsType {
isOpenPopupVideo: boolean, isOpenPopupVideo: boolean,
@ -15,29 +18,30 @@ const urls = {
production: 'https://instat-stream-production.s3.eu-west-1.amazonaws.com/media/highlights/demo/demohighlight.mp4', production: 'https://instat-stream-production.s3.eu-west-1.amazonaws.com/media/highlights/demo/demohighlight.mp4',
stage: 'https://instat-stream-staging.s3.eu-west-1.amazonaws.com/media/highlights/demo/demohighlight.mp4', stage: 'https://instat-stream-staging.s3.eu-west-1.amazonaws.com/media/highlights/demo/demohighlight.mp4',
} }
export const VideoHighlight = ({ export const VideoHighlight = ({
isOpenPopupVideo, isOpenPopupVideo,
setIsOpenPopupVideo, setIsOpenPopupVideo,
} :VideoPropsType) => { } :VideoPropsType) => {
const videoRef = useRef<HTMLVideoElement>(null) const videoRef = useRef<HTMLVideoElement>(null)
return ( return (
// eslint-disable-next-line
<ScModal <ScModal
isOpen={isOpenPopupVideo} isOpen={isOpenPopupVideo}
close={() => setIsOpenPopupVideo(false)} close={() => setIsOpenPopupVideo(false)}
withCloseButton={false} withCloseButton={false}
> >
<VideoPlayer <VideoPlayer
width='100%' src={`${isProduction ? urls.production : urls.stage}?access_token=${readToken()}`}
height='100%'
src={`${urls.stage}?access_token=${readToken()}`}
ref={videoRef} ref={videoRef}
playing={Boolean(true)} playing={Boolean(true)}
muted={false} muted={false}
isFullscreen={false} isFullscreen={false}
controls={Boolean(true)} controls={Boolean(true)}
// crossOrigin='use-credentials'
/> />
<ScCloseButton onClick={() => setIsOpenPopupVideo(false)}>
<Icon refIcon='Close' styles={{ marginTop: '3px' }} />
</ScCloseButton>
</ScModal> </ScModal>
) )
} }

@ -9,7 +9,8 @@ export const ScModal = styled(BaseModal)`
background-color: rgba(0, 0, 0, 0.7); background-color: rgba(0, 0, 0, 0.7);
${ModalWindow} { ${ModalWindow} {
background-color: #333333; position: relative;
background-color: transparent;
border-radius: 5px; border-radius: 5px;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -35,3 +36,17 @@ export const ScModal = styled(BaseModal)`
: ''}; : ''};
} }
` `
export const ScCloseButton = styled.div`
position: absolute;
width: 30px;
height: 30px;
right: -40px;
top: 0;
background: rgba(255, 255, 255, 0.15);
border-radius: 21px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
`

@ -74,7 +74,7 @@ const HighlightsPage = () => {
<ScButton> <ScButton>
<T9n t='order_and_buy' /> <T9n t='order_and_buy' />
<ScPrice> <ScPrice>
{` | $${price}`} &nbsp;${price}
</ScPrice> </ScPrice>
</ScButton> </ScButton>
</ScButtonWrap> </ScButtonWrap>

@ -57,7 +57,15 @@ export const ScButtonWrap = styled.div<{disabled: boolean}>`
` `
export const ScPrice = styled.span` export const ScPrice = styled.span`
font-weight: 400; font-weight: 600;
font-size: 14px; font-size: 20px;
line-height: 50px;
margin: auto 0; margin: auto 0;
${isMobileDevice
? css`
font-size: 22px;
line-height: 16px;
`
: ''};
` `

Loading…
Cancel
Save