Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
de1ab8fc
Commit
de1ab8fc
authored
Dec 06, 2017
by
serapath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ADD settings option always-use-vm
parent
04aab0cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
run-tab.js
src/app/tabs/run-tab.js
+9
-0
settings-tab.js
src/app/tabs/settings-tab.js
+10
-0
No files found.
src/app/tabs/run-tab.js
View file @
de1ab8fc
...
...
@@ -570,6 +570,15 @@ function settings (container, appAPI, appEvents) {
</div>
`
setTimeout
(
function
()
{
var
select
=
document
.
querySelector
(
'#selectExEnvOptions'
)
var
optionVMindex
=
0
if
(
appAPI
.
config
.
get
(
'settings/always-use-vm'
))
{
// select.options[optionVMindex].selected = true
select
.
selectedIndex
=
optionVMindex
}
},
0
)
// EVENTS
appEvents
.
udapp
.
register
(
'transactionExecuted'
,
(
error
,
from
,
to
,
data
,
lookupOnly
,
txResult
)
=>
{
if
(
error
)
return
...
...
src/app/tabs/settings-tab.js
View file @
de1ab8fc
...
...
@@ -43,6 +43,7 @@ function SettingsTab (container, appAPI, appEvents, opts) {
var
queryParams
=
new
QueryParams
()
var
optionVM
=
yo
`<input class="
${
css
.
col1
}
" id="alwaysUseVM" type="checkbox">`
var
el
=
yo
`
<div class="
${
css
.
settingsTabView
}
"id="settingsView">
<div class="
${
css
.
info
}
">
...
...
@@ -57,6 +58,10 @@ function SettingsTab (container, appAPI, appEvents, opts) {
<span class="
${
css
.
checkboxText
}
">Text Wrap</span>
</div>
<div class="
${
css
.
crow
}
">
<div>
${
optionVM
}
</div>
<span class="
${
css
.
checkboxText
}
">Always use VM</span>
</div>
<div class="
${
css
.
crow
}
">
<div><input class="
${
css
.
col1
}
" id="optimize" type="checkbox"></div>
<span class="
${
css
.
checkboxText
}
">Enable Optimization</span>
</div>
...
...
@@ -67,6 +72,11 @@ function SettingsTab (container, appAPI, appEvents, opts) {
setVersionText
(
version
,
el
)
})
optionVM
.
checked
=
appAPI
.
config
.
get
(
'settings/always-use-vm'
)
||
false
optionVM
.
addEventListener
(
'change'
,
event
=>
{
appAPI
.
config
.
set
(
'settings/always-use-vm'
,
!
appAPI
.
config
.
get
(
'settings/always-use-vm'
))
})
var
optimize
=
el
.
querySelector
(
'#optimize'
)
if
((
queryParams
.
get
().
optimize
===
'true'
))
{
optimize
.
setAttribute
(
'checked'
,
true
)
...
...
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