From 0203ce0dbada0b5b3a38a7ddddf2bbce8c7a40e2 Mon Sep 17 00:00:00 2001 From: Farber Denis <42491613+Bombamuerta@users.noreply.github.com> Date: Thu, 2 Sep 2021 17:21:48 +0300 Subject: [PATCH] Ott 1442 videoplayer fix (#452) * style(#1442): video player iphone SE styles fix * style(#1442): style fixes * style(#1442): players styles fix * style(#1442): tabs font size fix * style(#1442): stylelint fixes * style(#1442): another iphone videoplayer fix Co-authored-by: Farber Denis --- .../components/SubscriptionsList/styled.tsx | 2 +- src/features/BuyMatchPopup/styled.tsx | 6 +-- .../Combobox/components/Arrow/index.tsx | 9 +++- src/features/Common/Input/styled.tsx | 1 + src/features/Common/NewInput/styled.tsx | 1 - src/features/Common/Tabs/index.tsx | 3 ++ src/features/MatchCard/styled.tsx | 2 - src/features/MatchPage/styled.tsx | 8 ++- src/features/MatchSidePlaylists/styled.tsx | 16 +++++- .../components/Settings/styled.tsx | 5 +- src/features/MultiSourcePlayer/index.tsx | 18 +++++-- src/features/MultiSourcePlayer/styled.tsx | 8 +-- .../components/ProgressBar/styled.tsx | 2 +- .../components/VolumeBar/styled.tsx | 7 ++- src/features/StreamPlayer/index.tsx | 5 +- src/features/StreamPlayer/styled.tsx | 50 +++++++++-------- .../components/BankCard/styled.tsx | 9 +++- .../components/PageBankCards/styled.tsx | 19 ++++++- .../components/PagePaymentsHistory/styled.tsx | 22 +++++++- .../components/PageSubscriptions/styled.tsx | 18 +++++++ .../components/ScoreSwitch/index.tsx | 14 +++-- .../UserSubscriptionsList/styled.tsx | 54 ++++++++++++++++++- src/features/UserAccount/styled.tsx | 24 +++++++++ 23 files changed, 247 insertions(+), 56 deletions(-) diff --git a/src/features/BuyMatchPopup/components/SubscriptionsList/styled.tsx b/src/features/BuyMatchPopup/components/SubscriptionsList/styled.tsx index beb007d6..6c8b24ac 100644 --- a/src/features/BuyMatchPopup/components/SubscriptionsList/styled.tsx +++ b/src/features/BuyMatchPopup/components/SubscriptionsList/styled.tsx @@ -15,7 +15,7 @@ export const List = styled.ul` display: flex; flex-direction: column; overflow-y: auto; - margin-top: 25px; + margin-top: 15px; padding: 0 40px; ${popupScrollbarStyles} diff --git a/src/features/BuyMatchPopup/styled.tsx b/src/features/BuyMatchPopup/styled.tsx index d38a6c32..0baf9ecd 100644 --- a/src/features/BuyMatchPopup/styled.tsx +++ b/src/features/BuyMatchPopup/styled.tsx @@ -83,9 +83,8 @@ export const Wrapper = styled.div` position: relative; height: ${({ height }) => (height ? `${height}px` : 'auto')}; width: ${({ width }) => (width ? `${width}px` : '830px')}; - padding: 40px 0 41px; + padding: 20px 0 20px; - ${isMobileDevice ? css` @@ -97,6 +96,7 @@ export const Wrapper = styled.div` @media (max-width: 1370px) { max-width: 743px; max-height: 650px; + } @media (max-width: 650px){ width: 100%; @@ -146,7 +146,7 @@ export const Footer = styled.div` margin-top: 40px; @media (max-width: 1370px) { - margin-top: 15px; + margin-top: 0px; } ${isMobileDevice ? css` diff --git a/src/features/Combobox/components/Arrow/index.tsx b/src/features/Combobox/components/Arrow/index.tsx index d87dbc94..c6047950 100644 --- a/src/features/Combobox/components/Arrow/index.tsx +++ b/src/features/Combobox/components/Arrow/index.tsx @@ -1,4 +1,5 @@ -import styled from 'styled-components/macro' +import styled, { css } from 'styled-components/macro' +import { isMobileDevice } from 'config/userAgent' type Props = { isExpanded: boolean, @@ -23,6 +24,12 @@ const Wrapper = styled.div<{ isExpanded: boolean }>` :hover { cursor: pointer; } + + ${isMobileDevice + ? css` + right: 11px; + ` + : ''}; ` export const Arrow = ({ isExpanded, toggle }: Props) => ( diff --git a/src/features/Common/Input/styled.tsx b/src/features/Common/Input/styled.tsx index 2505947c..b3ee3387 100644 --- a/src/features/Common/Input/styled.tsx +++ b/src/features/Common/Input/styled.tsx @@ -200,6 +200,7 @@ export const Icon = styled.div<{ image: string }>` ? css` width: 18px; height: 18px; + right: 11px; ` : ''} ` diff --git a/src/features/Common/NewInput/styled.tsx b/src/features/Common/NewInput/styled.tsx index 0932d26f..1d7ab203 100644 --- a/src/features/Common/NewInput/styled.tsx +++ b/src/features/Common/NewInput/styled.tsx @@ -64,7 +64,6 @@ export const InputStyled = styled.input` width: 100%; color: ${({ theme }) => theme.colors.text100}; font-style: normal; - font-weight: normal; font-size: 0.755rem; letter-spacing: 0.1px; ${isMobileDevice diff --git a/src/features/Common/Tabs/index.tsx b/src/features/Common/Tabs/index.tsx index 767c676a..dc1f7bfa 100644 --- a/src/features/Common/Tabs/index.tsx +++ b/src/features/Common/Tabs/index.tsx @@ -57,6 +57,9 @@ export const Tab = styled.button.attrs(({ selected }: TabProps) => ({ ${isMobileDevice ? css` font-size: 10px; + @media (orientation: landscape){ + font-size: 9px; + } ` : ''}; ` diff --git a/src/features/MatchCard/styled.tsx b/src/features/MatchCard/styled.tsx index b85622bd..ca839c3d 100644 --- a/src/features/MatchCard/styled.tsx +++ b/src/features/MatchCard/styled.tsx @@ -18,7 +18,6 @@ export const CardWrapperOuter = styled.li.attrs({ height: 90px; margin-bottom: 10px; - @media screen and (orientation: landscape){ width: 49%; :nth-child(odd){ @@ -32,7 +31,6 @@ export const CardWrapperOuter = styled.li.attrs({ export const CardWrapper = styled.li.attrs({ tabIndex: 0, })` - position: absolute; position: absolute; top: 0; left: 0; diff --git a/src/features/MatchPage/styled.tsx b/src/features/MatchPage/styled.tsx index a4467182..426615c2 100644 --- a/src/features/MatchPage/styled.tsx +++ b/src/features/MatchPage/styled.tsx @@ -25,6 +25,7 @@ export const Wrapper = styled.div` justify-content: space-between; margin-left: 10px; margin-top: 55px; + width: 100vw; } ` : ''}; @@ -47,8 +48,13 @@ export const Container = styled.div` max-width: 100%; margin-right: 0; padding: 0; + margin-bottom: 15px; + min-height: 32vh; + @media screen and (orientation: landscape){ - flex: 2; + display: block; + width: 100%; + margin-bottom: 0; } ` : ''}; diff --git a/src/features/MatchSidePlaylists/styled.tsx b/src/features/MatchSidePlaylists/styled.tsx index b2bca5d5..db186ccd 100644 --- a/src/features/MatchSidePlaylists/styled.tsx +++ b/src/features/MatchSidePlaylists/styled.tsx @@ -5,7 +5,18 @@ import { isMobileDevice } from 'config/userAgent' import { customScrollbar } from 'features/Common' -export const Wrapper = styled.div`` +export const Wrapper = styled.div` +${isMobileDevice + ? css` + @media (orientation: landscape){ + min-width: 250px; + } + @media (max-width: 569px) and (orientation: landscape){ + min-width: 200px; + } + ` + : ''}; +` export const TabsWrapper = styled.div` padding-left: 14px; @@ -31,6 +42,9 @@ export const Container = styled.div` @media (max-width: 750px){ width: 100%; } + @media (orientation: landscape){ + width: 100%; + } ` : ''}; ` diff --git a/src/features/MultiSourcePlayer/components/Settings/styled.tsx b/src/features/MultiSourcePlayer/components/Settings/styled.tsx index 4db62dfc..b00e418a 100644 --- a/src/features/MultiSourcePlayer/components/Settings/styled.tsx +++ b/src/features/MultiSourcePlayer/components/Settings/styled.tsx @@ -10,9 +10,10 @@ export const SettingsButton = styled(ButtonBase)` ${isMobileDevice ? css` - width: 17px; - height: 15px; + width: 20px; + height: 18px; margin-left: 8px; + cursor: pointer; ` : ''}; ` diff --git a/src/features/MultiSourcePlayer/index.tsx b/src/features/MultiSourcePlayer/index.tsx index ac30ad00..753b8d65 100644 --- a/src/features/MultiSourcePlayer/index.tsx +++ b/src/features/MultiSourcePlayer/index.tsx @@ -17,6 +17,7 @@ import { VideoPlayer } from 'features/VideoPlayer' import { secondsToHms } from 'helpers' +import { isMobileDevice } from 'config/userAgent' import { HOUR_IN_MILLISECONDS, REWIND_SECONDS } from './config' import { ProgressBar } from './components/ProgressBar' @@ -172,12 +173,23 @@ export const MultiSourcePlayer = (props: Props) => { {' / '} {secondsToHms(duration / 1000)} - {REWIND_SECONDS} - {REWIND_SECONDS} + {REWIND_SECONDS} + + {REWIND_SECONDS} + - + ` ${isMobileDevice ? css` - width: 11px; - height: 11px; + width: 20px; + height: 20px; ` : ''}; ` export const Next = styled(Prev)` - margin-right: 24px; + margin-right: 10px; transform: rotate(180deg); ` diff --git a/src/features/StreamPlayer/components/ProgressBar/styled.tsx b/src/features/StreamPlayer/components/ProgressBar/styled.tsx index 9496127b..980dfa0c 100644 --- a/src/features/StreamPlayer/components/ProgressBar/styled.tsx +++ b/src/features/StreamPlayer/components/ProgressBar/styled.tsx @@ -15,7 +15,7 @@ export const ProgressBarList = styled.div` export const LoadedProgress = styled.div` position: absolute; z-index: 1; - background-color: rgba(255, 255, 255, 0.6);; + background-color: rgba(255, 255, 255, 0.6); height: 100%; ` diff --git a/src/features/StreamPlayer/components/VolumeBar/styled.tsx b/src/features/StreamPlayer/components/VolumeBar/styled.tsx index 85b0a66b..93b37b8a 100644 --- a/src/features/StreamPlayer/components/VolumeBar/styled.tsx +++ b/src/features/StreamPlayer/components/VolumeBar/styled.tsx @@ -38,7 +38,7 @@ export const VolumeButton = styled.button` ${isMobileDevice ? css` - width: 15px; + width: 20px; background-size: contain; margin-right: 3px; ` @@ -55,6 +55,9 @@ export const VolumeProgressList = styled.div` ${isMobileDevice ? css` display: none; + @media (orientation: landscape){ + display: block; + } ` : ''}; ` @@ -74,7 +77,7 @@ export const Scrubber = styled.button` outline: none; width: 13px; height: 13px; - left: ${({ value }) => value}%;; + left: ${({ value }) => value}%; position: absolute; border-radius: 50%; background-color: #fff; diff --git a/src/features/StreamPlayer/index.tsx b/src/features/StreamPlayer/index.tsx index dfc4b5e2..5be669e4 100644 --- a/src/features/StreamPlayer/index.tsx +++ b/src/features/StreamPlayer/index.tsx @@ -122,7 +122,10 @@ export const StreamPlayer = (props: Props) => { - + ` : '1' )}; } - ${isMobileDevice - ? css` - padding-top: 0; - margin-bottom: 17px; - min-height: 32vh; - height: 100%; - background: transparent; - width: 100%; - ` - : ''}; ` export const LoaderWrapper = styled.div` @@ -151,14 +147,12 @@ export const PlayStop = styled(ButtonBase)` ` )}; - @media ${devices.mobile} { - - } ${isMobileDevice ? css` - width: 10%; - height: 40%; - margin-right: 5px; + width: 20%; + height: 60%; + margin-right: 0; + padding: 0; ` : ''}; ` @@ -186,14 +180,15 @@ export const Fullscreen = styled(ButtonBase)` ${isMobileDevice ? css` - width: 17px; - height: 15px; - margin-left: 0; + width: 20px; + height: 18px; + margin-left: 0; ` : ''}; ` type ButtonProps = { + isHidden?: boolean, size?: 'sm' | 'lg', } @@ -222,12 +217,14 @@ export const Backward = styled(ButtonBase)` font-size: ${rewindButtonSizes.fontSizes[size]}px; ` )} + display: ${({ isHidden }) => (isHidden ? 'none' : 'block')}; ${isMobileDevice ? css` - width: 10%; + width: 20%; height: 40%; - font-size: 10px; + font-size: 14px; + margin-right: 0; ` : ''}; ` @@ -249,6 +246,7 @@ export const PlaybackTime = styled.span` ${isMobileDevice ? css` font-size: 10px; + width: 130px; ` : ''}; ` diff --git a/src/features/UserAccount/components/BankCard/styled.tsx b/src/features/UserAccount/components/BankCard/styled.tsx index 031097ae..9fdde1f6 100644 --- a/src/features/UserAccount/components/BankCard/styled.tsx +++ b/src/features/UserAccount/components/BankCard/styled.tsx @@ -1,6 +1,7 @@ -import styled from 'styled-components/macro' +import styled, { css } from 'styled-components/macro' import { devices } from 'config/devices' +import { isMobileDevice } from 'config/userAgent' import { Label } from 'features/Common/Radio/styled' import { RadioSvg } from 'features/Common/Radio/Icon' @@ -23,6 +24,12 @@ export const CardNumberWrapper = styled.div` :hover ${InlineButton} { transform: translateX(0); } + + ${isMobileDevice + ? css` + height: 39px; + ` + : ''}; ` export const CustomRadio = styled(Radio)` diff --git a/src/features/UserAccount/components/PageBankCards/styled.tsx b/src/features/UserAccount/components/PageBankCards/styled.tsx index 4ee9e8dc..81cdfa36 100644 --- a/src/features/UserAccount/components/PageBankCards/styled.tsx +++ b/src/features/UserAccount/components/PageBankCards/styled.tsx @@ -1,12 +1,18 @@ -import styled from 'styled-components/macro' +import styled, { css } from 'styled-components/macro' import { devices } from 'config' +import { isMobileDevice } from 'config/userAgent' import { Modal as ModalBase } from 'features/Modal' import { ModalWindow } from 'features/Modal/styled' export const Wrapper = styled.div` margin-top: 28px; + ${isMobileDevice + ? css` + width: 100%; + ` + : ''}; ` export const FormWrapper = styled.div` @@ -16,6 +22,12 @@ export const FormWrapper = styled.div` @media ${devices.tablet} { max-width: auto; } + ${isMobileDevice + ? css` + width: 100%; + margin: 20px 0; + ` + : ''}; ` export const PaymentInfoText = styled.span` @@ -25,6 +37,11 @@ export const PaymentInfoText = styled.span` font-size: 16px; line-height: 24px; color: rgba(255, 255, 255, 0.3); + ${isMobileDevice + ? css` + font-size: 10px; + ` + : ''}; ` export const Modal = styled(ModalBase)` diff --git a/src/features/UserAccount/components/PagePaymentsHistory/styled.tsx b/src/features/UserAccount/components/PagePaymentsHistory/styled.tsx index a2c2dd51..76a9f6e8 100644 --- a/src/features/UserAccount/components/PagePaymentsHistory/styled.tsx +++ b/src/features/UserAccount/components/PagePaymentsHistory/styled.tsx @@ -1,6 +1,7 @@ -import styled from 'styled-components/macro' +import styled, { css } from 'styled-components/macro' import { devices } from 'config' +import { isMobileDevice } from 'config/userAgent' export const Wrapper = styled.div` margin-top: 26px; @@ -46,6 +47,15 @@ export const Th = styled.th` width: 150px; } } + ${isMobileDevice + ? css` + font-size: 12px; + vertical-align: baseline; + :not(:nth-child(1)){ + padding-right: 5px; + } + ` + : ''} ` export const TBody = styled.tbody`` @@ -59,4 +69,14 @@ export const Td = styled.td` line-height: 22px; text-align: start; color: #FFFFFF; + ${isMobileDevice + ? css` + font-size: 12px; + line-height: 17px; + vertical-align: baseline; + :not(:nth-child(1)){ + padding-right: 5px; + } + ` + : ''} ` diff --git a/src/features/UserAccount/components/PageSubscriptions/styled.tsx b/src/features/UserAccount/components/PageSubscriptions/styled.tsx index 686953b7..4383289c 100644 --- a/src/features/UserAccount/components/PageSubscriptions/styled.tsx +++ b/src/features/UserAccount/components/PageSubscriptions/styled.tsx @@ -1,5 +1,7 @@ import styled, { css } from 'styled-components/macro' +import { isMobileDevice } from 'config/userAgent' + import { popupScrollbarStyles } from 'features/PopupComponents' export const Wrapper = styled.div` @@ -18,6 +20,11 @@ export const SubscriptionsWrapper = styled.div` export const Tabs = styled.div` display: flex; margin-bottom: 40px; + ${isMobileDevice + ? css` + margin-top: 15px; + ` + : ''} ` type TabProps = { @@ -52,4 +59,15 @@ export const Tab = styled.button` } ` : '')} + + ${isMobileDevice + ? css` + font-size: 14px; + line-height: 14px; + ::after { + bottom: -15px; + height: 2px; + } + ` + : ''} ` diff --git a/src/features/UserAccount/components/ScoreSwitch/index.tsx b/src/features/UserAccount/components/ScoreSwitch/index.tsx index 9cad67c8..7995de3a 100644 --- a/src/features/UserAccount/components/ScoreSwitch/index.tsx +++ b/src/features/UserAccount/components/ScoreSwitch/index.tsx @@ -8,11 +8,16 @@ import { Title as TitleBase, } from 'features/MatchSwitches/styled' -const Wrapper = styled.div` +type TWrapper = { + isHidden?: boolean, +} + +const Wrapper = styled.div` margin-top: 90px; + display: ${({ isHidden }) => (isHidden ? 'none' : 'block')}; ${isMobileDevice ? css` - margin-top: 0; + margin-top: 0; ` : ''}; ` @@ -33,7 +38,10 @@ export const ScoreSwitch = ({ className }: Props) => { const { isScoreHidden, toggleScore } = useMatchSwitchesStore() return ( - +