Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
motion-grammar-example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JastAdd
motion-grammar-example
Commits
a7a9cd8e
Commit
a7a9cd8e
authored
2 years ago
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
dashboard with context
parent
c85cc13d
No related branches found
No related tags found
1 merge request
!1
festival updatesfestival updatesfestival updatesfestival updatesfestival
Pipeline
#14743
passed
2 years ago
Stage: build
Stage: test
Stage: ragdoc
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dashboard/src/App.css
+37
-29
37 additions, 29 deletions
dashboard/src/App.css
dashboard/src/App.js
+16
-8
16 additions, 8 deletions
dashboard/src/App.js
with
53 additions
and
37 deletions
dashboard/src/App.css
+
37
−
29
View file @
a7a9cd8e
.App
{
background-color
:
#282c34
;
text-align
:
left
;
background-color
:
#282c34
;
text-align
:
left
;
}
.App-logo
{
height
:
40vmin
;
pointer-events
:
none
;
height
:
40vmin
;
pointer-events
:
none
;
}
@media
(
prefers-reduced-motion
:
no-preference
)
{
.App-logo
{
animation
:
App-logo-spin
infinite
20s
linear
;
}
.App-logo
{
animation
:
App-logo-spin
infinite
20s
linear
;
}
}
.App-header
{
background-color
:
#282c34
;
min-height
:
40px
;
/*100vmin*/
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
calc
(
10px
+
2vmin
);
color
:
white
;
background-color
:
#282c34
;
min-height
:
40px
;
/*100vmin*/
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
calc
(
10px
+
2vmin
);
color
:
white
;
}
.CurrentContext
{
height
:
50vh
;
width
:
100vw
;
object-fit
:
contain
;
/*object-fit: scale-down;*/
object-position
:
right
;
}
.CurrentAst
{
height
:
50vh
;
width
:
100vw
;
object-fit
:
cover
;
object-position
:
right
;
height
:
50vh
;
width
:
100vw
;
object-fit
:
cover
;
object-position
:
right
;
}
.AstInTimeline
{
max-width
:
100%
;
max-width
:
100%
;
}
.App-link
{
color
:
#61dafb
;
color
:
#61dafb
;
}
.MG-Timeline
{
max-width
:
4000px
!important
;
max-width
:
4000px
!important
;
}
@keyframes
App-logo-spin
{
from
{
transform
:
rotate
(
0deg
);
}
to
{
transform
:
rotate
(
360deg
);
}
from
{
transform
:
rotate
(
0deg
);
}
to
{
transform
:
rotate
(
360deg
);
}
}
This diff is collapsed.
Click to expand it.
dashboard/src/App.js
+
16
−
8
View file @
a7a9cd8e
...
...
@@ -70,20 +70,20 @@ function App() {
/
>
<
/header
>
<
main
>
<
CurrentState
<
Current
Context
State
diagram
=
{
context
?
context
.
diagram
:
''
}
label
=
''
/>
<
CurrentState
diagram
=
{
ast
?
ast
.
diagram
:
''
}
label
=
{
ast
?
ast
.
parseRule
:
''
}
/
>
<
Current
AST
State
diagram
=
{
ast
?
ast
.
diagram
:
''
}
label
=
{
ast
?
ast
.
parseRule
:
''
}
/
>
<
/main
>
<
/div
>
);
}
function
CurrentState
(
props
)
{
function
Current
AST
State
(
props
)
{
return
(
<
div
className
=
"
curent-state
"
>
<
img
className
=
"
CurrentAst
"
src
=
{
`data:image/svg+xml;utf8,
${
encodeURIComponent
(
props
.
diagram
)}
`
}
alt
=
{
props
.
label
}
/
>
...
...
@@ -91,11 +91,19 @@ function CurrentState(props) {
)
}
function
CurrentContextState
(
props
)
{
return
(
<
div
className
=
"
curent-state
"
>
<
img
className
=
"
CurrentContext
"
src
=
{
`data:image/svg+xml;utf8,
${
encodeURIComponent
(
props
.
diagram
)}
`
}
alt
=
{
props
.
label
}
/
>
<
/div
>
)
}
function
ControlPanel
(
props
)
{
return
(
<
div
className
=
'
ControlPanel
'
>
<
button
onClick
=
{()
=>
{
props
.
ws
.
current
.
send
(
"
parse
"
)
}}
>
start
parsing
<
/button
>
<
button
onClick
=
{()
=>
{
props
.
ws
.
current
.
send
(
"
reset
"
)
}}
>
reset
selections
<
/button
>
<
button
onClick
=
{()
=>
{
props
.
ws
.
current
.
send
(
"
cell1
parse
"
)
}}
>
start
parsing
in
cell
1
<
/button
>
<
button
onClick
=
{()
=>
{
props
.
ws
.
current
.
send
(
"
cell1
reset
"
)
}}
>
reset
selections
<
/button
>
<
/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