Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Studio and Editor look alike #1035

Merged
merged 4 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions public/opencast-editor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import React from 'react';
import Body from './main/Body';
import Header from './main/Header';
import { GlobalStyle } from './cssStyles';
import { useSelector } from 'react-redux';
import { selectThemeState } from './redux/themeSlice';

function App() {
const theme = useSelector(selectThemeState);

return (
<div className="App" css={theme}>
<GlobalStyle />
<Header />
<Body />
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/main/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Body: React.FC<{}> = () => {
const bodyStyle = css({
display: 'flex',
flexDirection: 'row',
height: '100%',
height: 'calc(100% - 48px)',
});

return (
Expand Down
32 changes: 32 additions & 0 deletions src/main/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';

import { useSelector } from "react-redux"
import { selectThemeState } from "../redux/themeSlice"
import { css } from '@emotion/react'

function Header() {
const themeState = useSelector(selectThemeState);

const header = themeState.startsWith('high-contrast-')
? css({
height: '46px',
backgroundColor: '#000',
borderBottom: '2px solid white'
})
: css({
height: '48px',
backgroundColor: '#333333',
})

const logo = css({
height: '48px',
})

return (
<div css={header}>
<img src="opencast-editor.svg" css={logo} alt="Opencast Editor" />
</div>
);
}

export default Header;
2 changes: 1 addition & 1 deletion src/main/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Timeline: React.FC<{
setCurrentlyAt: ActionCreatorWithPayload<number, string>,
setIsPlaying: ActionCreatorWithPayload<boolean, string>,
}> = ({
timelineHeight = 250,
timelineHeight = 200,
Arnei marked this conversation as resolved.
Show resolved Hide resolved
styleByActiveSegment = true,
selectCurrentlyAt,
selectIsPlaying,
Expand Down