Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
teknikattan-scoring-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tddd96-grupp1
teknikattan-scoring-system
Commits
0a9db5c9
Commit
0a9db5c9
authored
3 years ago
by
Albin Henriksson
Browse files
Options
Downloads
Patches
Plain Diff
Improve styling
parent
2dd5052a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
client/src/pages/views/OperatorViewPage.tsx
+42
-44
42 additions, 44 deletions
client/src/pages/views/OperatorViewPage.tsx
client/src/pages/views/styled.tsx
+17
-7
17 additions, 7 deletions
client/src/pages/views/styled.tsx
with
59 additions
and
51 deletions
client/src/pages/views/OperatorViewPage.tsx
+
42
−
44
View file @
0a9db5c9
...
@@ -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"
>
<
Operator
Quit
Button
onClick
=
{
handleVerifyExit
}
variant
=
"contained"
color
=
"secondary"
>
<
BackspaceIcon
fontSize
=
"small"
/>
<
BackspaceIcon
fontSize
=
"small"
/>
</
OperatorButton
>
</
Operator
Quit
Button
>
</
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
=
"h
3
"
>
{
presentation
.
competition
.
name
}
</
Typography
>
<
Typography
variant
=
"h
4
"
>
{
presentation
.
competition
.
name
}
</
Typography
>
</
OperatorHeaderItem
>
</
OperatorHeaderItem
>
<
OperatorHeaderItem
>
<
OperatorHeaderItem
>
<
Typography
variant
=
"h
3
"
>
<
Typography
variant
=
"h
4
"
>
{
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
...
...
This diff is collapsed.
Click to expand it.
client/src/pages/views/styled.tsx
+
17
−
7
View file @
0a9db5c9
...
@@ -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 -
2
60px) / 9) * 16);
max-width: calc(((100vh -
1
60px) / 9) * 16);
`
`
export
const
PresentationContainer
=
styled
.
div
`
export
const
PresentationContainer
=
styled
.
div
`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment