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
164f6615
Commit
164f6615
authored
3 years ago
by
Albin Henriksson
Browse files
Options
Downloads
Patches
Plain Diff
Scale slide and time left text
parent
41d0b8e1
No related branches found
Branches containing commit
No related tags found
1 merge request
!146
Scale slide and time left text
Pipeline
#45620
passed with warnings
3 years ago
Stage: setup
Stage: test
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
client/src/pages/presentationEditor/components/SlideDisplay.tsx
+6
-6
6 additions, 6 deletions
.../src/pages/presentationEditor/components/SlideDisplay.tsx
client/src/pages/presentationEditor/components/styled.tsx
+13
-0
13 additions, 0 deletions
client/src/pages/presentationEditor/components/styled.tsx
with
19 additions
and
6 deletions
client/src/pages/presentationEditor/components/SlideDisplay.tsx
+
6
−
6
View file @
164f6615
...
...
@@ -5,7 +5,7 @@ import { useAppDispatch, useAppSelector } from '../../../hooks'
import
PresentationComponent
from
'
../../views/components/PresentationComponent
'
import
Timer
from
'
../../views/components/Timer
'
import
RndComponent
from
'
./RndComponent
'
import
{
Center
,
SlideEditorContainer
,
SlideEditorContainerRatio
,
SlideEditorPaper
}
from
'
./styled
'
import
{
Center
,
SlideDisplayText
,
SlideEditorContainer
,
SlideEditorContainerRatio
,
SlideEditorPaper
}
from
'
./styled
'
type
SlideDisplayProps
=
{
//Prop to distinguish between editor and active competition
...
...
@@ -59,13 +59,13 @@ const SlideDisplay = ({ variant, activeViewTypeId, currentSlideId }: SlideDispla
<
SlideEditorContainer
>
<
SlideEditorContainerRatio
>
<
SlideEditorPaper
ref
=
{
editorPaperRef
}
>
<
Typography
variant
=
"h3"
style
=
{
{
position
:
'
absolute
'
,
left
:
5
,
top
:
5
}
}
>
{
variant
===
'
editor
'
&&
`Tid kvar:
${
slide
?.
timer
}
`
}
<
SlideDisplayText
scale
=
{
scale
}
>
{
variant
===
'
editor
'
&&
slide
?.
timer
?
`Tid kvar:
${
slide
?.
timer
}
`
:
''
}
{
variant
===
'
presentation
'
&&
<
Timer
/>
}
</
Typography
>
<
Typography
variant
=
"h3"
style
=
{
{
position
:
'
absolute
'
,
right
:
5
,
top
:
5
}
}
>
</
SlideDisplayText
>
<
SlideDisplayText
scale
=
{
scale
}
right
>
{
slide
&&
`Sida:
${
slide
?.
order
+
1
}
/
${
totalSlides
}
`
}
</
Typography
>
</
SlideDisplayText
>
{
(
competitionBackgroundImage
||
slideBackgroundImage
)
&&
(
<
img
src
=
{
`/static/images/
${
...
...
This diff is collapsed.
Click to expand it.
client/src/pages/presentationEditor/components/styled.tsx
+
13
−
0
View file @
164f6615
...
...
@@ -145,3 +145,16 @@ export const QuestionComponent = styled.div`
export
const
SettingsItemContainer
=
styled
.
div
`
padding: 5px;
`
interface
SlideDisplayTextProps
{
scale
:
number
right
?:
boolean
}
export
const
SlideDisplayText
=
styled
(
Typography
)
<
SlideDisplayTextProps
>
`
position: absolute;
top: 5px;
left:
${(
props
)
=>
(
props
.
right
?
undefined
:
5
)}
px;
right:
${(
props
)
=>
(
props
.
right
?
5
:
undefined
)}
px;
font-size:
${(
props
)
=>
24
*
props
.
scale
}
px;
`
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