fix(#2399): redesign match page for mobile

keep-around/f8f8ce5f5085edde7169b2bf4c778be264fcc9b4
Rakov Roman 3 years ago
parent c3f590729a
commit f8f8ce5f50
  1. 10
      package-lock.json
  2. 7
      src/features/MatchPage/components/FinishedMatch/index.tsx
  3. 2
      src/features/MatchPage/components/MatchProfileCardMobile/components/MatchDate/index.tsx
  4. 2
      src/features/MatchSidePlaylists/components/TabVideo/styled.tsx
  5. 1
      src/features/ProfileHeader/index.tsx
  6. 6
      src/features/ProfileHeader/styled.tsx
  7. 2
      src/features/StreamPlayer/styled.tsx

10
package-lock.json generated

@ -10866,6 +10866,7 @@
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"devOptional": true,
"engines": { "engines": {
"node": ">=8" "node": ">=8"
} }
@ -11765,6 +11766,7 @@
"version": "3.5.2", "version": "3.5.2",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
"integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
"devOptional": true,
"dependencies": { "dependencies": {
"anymatch": "~3.1.2", "anymatch": "~3.1.2",
"braces": "~3.0.2", "braces": "~3.0.2",
@ -18750,6 +18752,7 @@
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"devOptional": true,
"dependencies": { "dependencies": {
"binary-extensions": "^2.0.0" "binary-extensions": "^2.0.0"
}, },
@ -27128,6 +27131,7 @@
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"devOptional": true,
"dependencies": { "dependencies": {
"picomatch": "^2.2.1" "picomatch": "^2.2.1"
}, },
@ -41695,7 +41699,8 @@
"binary-extensions": { "binary-extensions": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"devOptional": true
}, },
"bindings": { "bindings": {
"version": "1.5.0", "version": "1.5.0",
@ -42409,6 +42414,7 @@
"version": "3.5.2", "version": "3.5.2",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
"integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
"devOptional": true,
"requires": { "requires": {
"anymatch": "~3.1.2", "anymatch": "~3.1.2",
"braces": "~3.0.2", "braces": "~3.0.2",
@ -47861,6 +47867,7 @@
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"devOptional": true,
"requires": { "requires": {
"binary-extensions": "^2.0.0" "binary-extensions": "^2.0.0"
} }
@ -54355,6 +54362,7 @@
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"devOptional": true,
"requires": { "requires": {
"picomatch": "^2.2.1" "picomatch": "^2.2.1"
} }

@ -64,12 +64,11 @@ export const FinishedMatch = ({
onPlayingChange={onPlayingChange} onPlayingChange={onPlayingChange}
profile={profile} profile={profile}
/> />
<MatchDescription {isMobileDevice
profile={profile} ? <MatchProfileCardMobile profile={profile} /> : (
/> <MatchDescription profile={profile} />)}
</Fragment> </Fragment>
)} )}
{isMobileDevice ? <MatchProfileCardMobile profile={profile} /> : null}
</Container> </Container>
<MatchSidePlaylists <MatchSidePlaylists

@ -16,7 +16,7 @@ export const MatchDate = ({ profile }: Props) => {
} = { ...profile! } } = { ...profile! }
const month = useMemo(() => ( const month = useMemo(() => (
format(parseISO(date), 'MMM MM,') format(parseISO(date), 'MMM dd,')
), [date]) ), [date])
const hour = useMemo(() => ( const hour = useMemo(() => (

@ -5,7 +5,7 @@ export const MatchesWrapper = styled.div`
overflow-y: scroll; overflow-y: scroll;
max-height: calc(100vh - 170px); max-height: calc(100vh - 170px);
> :not(:last-child) { > * {
margin-bottom: 15px; margin-bottom: 15px;
} }

@ -59,6 +59,7 @@ export const ProfileHeader = ({
headerImage={imageHeader} headerImage={imageHeader}
color={headerColor || color} color={headerColor || color}
height={height} height={height}
isMatchPage={isMatchPage()}
> >
<Position <Position
isMatchPage={isMatchPage()} isMatchPage={isMatchPage()}

@ -46,6 +46,7 @@ type HeaderProps = {
color?: string, color?: string,
headerImage?: string | null, headerImage?: string | null,
height?: number, height?: number,
isMatchPage?: boolean,
} }
export const HeaderStyled = styled.header<HeaderProps>` export const HeaderStyled = styled.header<HeaderProps>`
@ -62,12 +63,15 @@ export const HeaderStyled = styled.header<HeaderProps>`
` : '' ` : ''
)} )}
${({ isMatchPage }) => css`
${isMobileDevice ${isMobileDevice
? css` ? css`
height: 40px; height: ${(isMatchPage ? '40px' : '124px')};
padding: 8px; padding: 8px;
` `
: ''} : ''}
`}
` `
type Props = { type Props = {

@ -14,7 +14,7 @@ export const ControlsGradient = styled.div<{ isVisible?: boolean }>`
? css` ? css`
height: 100%; height: 100%;
background: ${(isVisible background: ${(isVisible
? 'linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(255,255,255,0) 25%, rgba(255,255,255,0) 75%, rgba(0,0,0,0.7) 100%)' ? 'linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 75%, rgba(0,0,0,0.7) 100%)'
: 'initial')} : 'initial')}
` : '')} ` : '')}
` `

Loading…
Cancel
Save