Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wacc_26_web_client
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rk4718
wacc_26_web_client
Commits
1804891e
Commit
1804891e
authored
Mar 13, 2020
by
Raghav Khanna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compile error so custom runtime variables are accisible in react
parent
5b15d3c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
public/index.html
public/index.html
+4
-4
src/App.js
src/App.js
+6
-5
No files found.
public/index.html
View file @
1804891e
...
...
@@ -9,16 +9,16 @@
name=
"description"
content=
"Web site created using create-react-app"
/>
<script>
var
EMULATOR_CONSOLE_READ
=
""
;
var
EMULATOR_IS_INPUT
=
false
;
</script>
<link
rel=
"apple-touch-icon"
href=
"%PUBLIC_URL%/logo192.png"
/>
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link
rel=
"manifest"
href=
"%PUBLIC_URL%/manifest.json"
/>
<script>
var
EMULATOR_CONSOLE_READ
=
""
;
var
EMULATOR_IS_INPUT
=
false
;
</script>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
...
...
src/App.js
View file @
1804891e
...
...
@@ -65,12 +65,12 @@ class App extends React.Component {
readInputCallBack
=
(
codeToEval
)
=>
{
console
.
log
(
test
);
if
(
!
EMULATOR_IS_INPUT
)
{
EMULATOR_CONSOLE_READ
=
window
.
prompt
()
if
(
!
window
.
EMULATOR_IS_INPUT
)
{
window
.
EMULATOR_CONSOLE_READ
=
window
.
prompt
()
}
eval
(
codeToEval
);
EMULATOR_CONSOLE_READ
=
""
;
EMULATOR_IS_INPUT
=
false
;
window
.
EMULATOR_CONSOLE_READ
=
""
;
window
.
EMULATOR_IS_INPUT
=
false
;
};
processWaccCode
=
async
(
code
)
=>
{
...
...
@@ -170,7 +170,8 @@ class App extends React.Component {
}}
>
<
Terminal
commandPassThrough
=
{
cmd
=>
{
test
=
cmd
[
0
]
window
.
EMULATOR_CONSOLE_READ
=
cmd
[
0
];
window
.
EMULATOR_IS_INPUT
=
true
;
}}
watchConsoleLogging
hideTopBar
allowTabs
=
{
false
}
/
>
<
/div
>
<
/CardBody
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment