Skip to content
Snippets Groups Projects
Commit 0a9db5c9 authored by Albin Henriksson's avatar Albin Henriksson
Browse files

Improve styling

parent 2dd5052a
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ import { ...@@ -41,7 +41,7 @@ import {
OperatorHeader, OperatorHeader,
OperatorHeaderItem, OperatorHeaderItem,
OperatorInnerContent, OperatorInnerContent,
ToolBarContainer, OperatorQuitButton,
} from './styled' } from './styled'
/** /**
...@@ -246,11 +246,11 @@ const OperatorViewPage: React.FC = () => { ...@@ -246,11 +246,11 @@ const OperatorViewPage: React.FC = () => {
</Button> </Button>
</DialogActions> </DialogActions>
</Dialog> </Dialog>
<OperatorHeader color="primary" position="relative"> <OperatorHeader color="primary" position="fixed">
<Tooltip title="Avsluta tävling" arrow> <Tooltip title="Avsluta tävling" arrow>
<OperatorButton onClick={handleVerifyExit} variant="contained" color="secondary"> <OperatorQuitButton onClick={handleVerifyExit} variant="contained" color="secondary">
<BackspaceIcon fontSize="small" /> <BackspaceIcon fontSize="small" />
</OperatorButton> </OperatorQuitButton>
</Tooltip> </Tooltip>
<Dialog open={openAlert} onClose={handleClose} aria-labelledby="responsive-dialog-title"> <Dialog open={openAlert} onClose={handleClose} aria-labelledby="responsive-dialog-title">
...@@ -270,62 +270,60 @@ const OperatorViewPage: React.FC = () => { ...@@ -270,62 +270,60 @@ const OperatorViewPage: React.FC = () => {
</DialogActions> </DialogActions>
</Dialog> </Dialog>
<OperatorHeaderItem> <OperatorHeaderItem>
<Typography variant="h3">{presentation.competition.name}</Typography> <Typography variant="h4">{presentation.competition.name}</Typography>
</OperatorHeaderItem> </OperatorHeaderItem>
<OperatorHeaderItem> <OperatorHeaderItem>
<Typography variant="h3"> <Typography variant="h4">
{activeSlideOrder !== undefined && activeSlideOrder + 1} / {presentation.competition.slides.length} {activeSlideOrder !== undefined && activeSlideOrder + 1} / {presentation.competition.slides.length}
</Typography> </Typography>
</OperatorHeaderItem> </OperatorHeaderItem>
</OperatorHeader> </OperatorHeader>
{/* <div style={{ minHeight: 64 }} /> */} {<div style={{ minHeight: 64 }} />}
<OperatorContent> <OperatorContent>
<OperatorInnerContent> <OperatorInnerContent>
{activeViewTypeId && <SlideDisplay variant="presentation" activeViewTypeId={activeViewTypeId} />} {activeViewTypeId && <SlideDisplay variant="presentation" activeViewTypeId={activeViewTypeId} />}
</OperatorInnerContent> </OperatorInnerContent>
</OperatorContent> </OperatorContent>
{/* <div style={{ minHeight: 96 }} /> */} {<div style={{ minHeight: 96 }} />}
<OperatorFooter color="primary" position="fixed"> <OperatorFooter position="fixed">
<ToolBarContainer> <Tooltip title="Föregående sida" arrow>
<Tooltip title="Föregående sida" arrow> <OperatorButton onClick={handleSetPrevSlide} variant="contained" disabled={isFirstSlide} color="primary">
<OperatorButton onClick={handleSetPrevSlide} variant="contained" disabled={isFirstSlide} color="secondary"> <ChevronLeftIcon fontSize="small" />
<ChevronLeftIcon fontSize="small" /> </OperatorButton>
</OperatorButton> </Tooltip>
</Tooltip>
{slideTimer && (
<Tooltip title="Starta timer" arrow>
<OperatorButton
onClick={handleStartTimer}
variant="contained"
disabled={timer.value !== null && !timer.enabled}
color="secondary"
>
<TimerIcon fontSize="small" />
<Timer disableText />
</OperatorButton>
</Tooltip>
)}
<Tooltip title="Visa ställning för publik" arrow> {slideTimer !== null && (
<OperatorButton onClick={() => socketSync({ show_scoreboard: true })} variant="contained" color="secondary"> <Tooltip title="Starta timer" arrow>
<AssignmentIcon fontSize="small" /> <OperatorButton
onClick={handleStartTimer}
variant="contained"
disabled={timer.value !== null && !timer.enabled}
color="primary"
>
<TimerIcon fontSize="small" />
<Timer disableText />
</OperatorButton> </OperatorButton>
</Tooltip> </Tooltip>
{showScoreboard && <Scoreboard isOperator />} )}
<Tooltip title="Visa koder" arrow> <Tooltip title="Visa ställning för publik" arrow>
<OperatorButton onClick={handleOpenCodes} variant="contained" color="secondary"> <OperatorButton onClick={() => socketSync({ show_scoreboard: true })} variant="contained" color="primary">
<SupervisorAccountIcon fontSize="small" /> <AssignmentIcon fontSize="small" />
</OperatorButton> </OperatorButton>
</Tooltip> </Tooltip>
{showScoreboard && <Scoreboard isOperator />}
<Tooltip title="Nästa sida" arrow> <Tooltip title="Visa koder" arrow>
<OperatorButton onClick={handleSetNextSlide} variant="contained" disabled={isLastSlide} color="secondary"> <OperatorButton onClick={handleOpenCodes} variant="contained" color="primary">
<ChevronRightIcon fontSize="small" /> <SupervisorAccountIcon fontSize="small" />
</OperatorButton> </OperatorButton>
</Tooltip> </Tooltip>
</ToolBarContainer>
<Tooltip title="Nästa sida" arrow>
<OperatorButton onClick={handleSetNextSlide} variant="contained" disabled={isLastSlide} color="primary">
<ChevronRightIcon fontSize="small" />
</OperatorButton>
</Tooltip>
</OperatorFooter> </OperatorFooter>
<Snackbar <Snackbar
......
...@@ -37,25 +37,36 @@ export const ViewSelectButtonGroup = styled.div` ...@@ -37,25 +37,36 @@ export const ViewSelectButtonGroup = styled.div`
export const OperatorHeader = styled(AppBar)` export const OperatorHeader = styled(AppBar)`
display: flex; display: flex;
flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-content: center; align-items: center;
height: 64px; height: 64px;
width: 100%; width: 100%;
` `
export const OperatorFooter = styled(AppBar)` export const OperatorFooter = styled(AppBar)`
background: white;
display: flex; display: flex;
justify-content: space-between; flex-direction: row;
align-content: center; justify-content: center;
align-items: center;
height: 96px; height: 96px;
top: auto; top: auto;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
` `
export const OperatorQuitButton = styled(Button)`
min-width: 48px;
min-height: 48px;
padding-top: 16px;
padding-bottom: 16px;
margin-left: 8px;
`
export const OperatorButton = styled(Button)` export const OperatorButton = styled(Button)`
width: 64px; min-width: 64px;
height: 64px; min-height: 64px;
margin-left: 16px; margin-left: 16px;
margin-right: 16px; margin-right: 16px;
` `
...@@ -63,7 +74,6 @@ export const OperatorButton = styled(Button)` ...@@ -63,7 +74,6 @@ export const OperatorButton = styled(Button)`
export const OperatorHeaderItem = styled.div` export const OperatorHeaderItem = styled.div`
margin-left: 16px; margin-left: 16px;
margin-right: 16px; margin-right: 16px;
margin-top: 16px;
` `
export const OperatorContainer = styled.div` export const OperatorContainer = styled.div`
...@@ -140,7 +150,7 @@ export const OperatorInnerContent = styled.div` ...@@ -140,7 +150,7 @@ export const OperatorInnerContent = styled.div`
width: 100%; width: 100%;
/* Makes sure width is not bigger than where a 16:9 display can fit /* Makes sure width is not bigger than where a 16:9 display can fit
without overlapping with header and footer */ without overlapping with header and footer */
max-width: calc(((100vh - 260px) / 9) * 16); max-width: calc(((100vh - 160px) / 9) * 16);
` `
export const PresentationContainer = styled.div` export const PresentationContainer = styled.div`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment