Skip to content

Commit

Permalink
Merge pull request #197 from BinaryStudioAcademy/task/OV-194-fix-styl…
Browse files Browse the repository at this point in the history
…ing-studio-page

OV-194: Fix styling studio page
  • Loading branch information
nikita-remeslov authored Sep 9, 2024
2 parents bd52f85 + 4e0260d commit 529b0f6
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const LandscapeStyle = {
width: '40%',
minWidth: '400px',
objectFit: 'contain',
maxHeight: '100%',
} as const;

export { LandscapeStyle };
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const PortraitStyle = {
width: '10%',
minWidth: '200px',
objectFit: 'contain',
maxHeight: '100%',
} as const;

export { PortraitStyle };
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const Menu: React.FC<Properties> = ({
color: 'white',
borderTopRightRadius: 'xl',
borderBottomRightRadius: 'xl',
zIndex: 100,
}}
>
<VStack spacing={1} align="stretch" p={2} w="100%">
Expand Down
25 changes: 16 additions & 9 deletions frontend/src/bundles/studio/pages/studio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
VideoMenu,
} from '../components/components.js';
import { actions as studioActionCreator } from '../store/studio.js';
import styles from './styles.module.css';

const initialRange: Range = {
start: minutesToMilliseconds(0),
Expand All @@ -41,7 +40,13 @@ const Studio: React.FC = () => {
}, [dispatch]);

return (
<Box minHeight="100vh" height="100%" position="relative">
<Box
minHeight="100vh"
height="100%"
position="relative"
display="flex"
flexDirection="column"
>
<Header
center={
<Button
Expand All @@ -61,18 +66,20 @@ const Studio: React.FC = () => {
/>

<VideoMenu />
<VStack className={styles['timeline']} alignItems={'stretch'}>
<Box flex="1 1 auto">
<Player
VideoComponent={VideoComponent}
playerRef={playerReference}
durationInFrames={300}
/>
</Box>

<VStack alignItems={'stretch'}>
<PlayerControls />
<Box>
<Timeline initialRange={initialRange} />
</Box>
</VStack>

<Player
VideoComponent={VideoComponent}
playerRef={playerReference}
durationInFrames={300}
/>
</Box>
);
};
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/bundles/studio/pages/styles.module.css

This file was deleted.

6 changes: 3 additions & 3 deletions frontend/src/routes/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ const routes = [
path: AppRoute.ROOT,
element: (
<ProtectedRoute>
<Home />,
<Home />
</ProtectedRoute>
),
},
{
path: AppRoute.STUDIO,
element: (
<ProtectedRoute>
<Studio />,
<Studio />
</ProtectedRoute>
),
},
{
path: AppRoute.MY_AVATAR,
element: (
<ProtectedRoute>
<MyAvatar />,
<MyAvatar />
</ProtectedRoute>
),
},
Expand Down

0 comments on commit 529b0f6

Please sign in to comment.