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
3b922876
Commit
3b922876
authored
Aug 08, 2017
by
yann300
Committed by
GitHub
Aug 08, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #666 from ethereum/compileRunTab10
Compile run tab - 10
parents
6a527284
1feb575f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
59 deletions
+44
-59
debugger-tab.js
src/app/debugger-tab.js
+9
-1
files-tab.js
src/app/files-tab.js
+11
-4
righthand-panel.js
src/app/righthand-panel.js
+1
-3
settings-tab.js
src/app/settings-tab.js
+1
-41
staticAnalysisView.js
src/app/staticanalysis/staticAnalysisView.js
+22
-10
No files found.
src/app/debugger-tab.js
View file @
3b922876
...
@@ -2,16 +2,24 @@ var yo = require('yo-yo')
...
@@ -2,16 +2,24 @@ var yo = require('yo-yo')
// -------------- styling ----------------------
// -------------- styling ----------------------
var
csjs
=
require
(
'csjs-inject'
)
var
csjs
=
require
(
'csjs-inject'
)
var
styleGuide
=
require
(
'./style-guide'
)
var
styles
=
styleGuide
()
var
css
=
csjs
`
var
css
=
csjs
`
.debuggerTabView {
.debuggerTabView {
padding: 2%;
padding: 2%;
}
}
.debugger extends
${
styles
.
displayBox
}
{
margin-bottom: 1%;
}
`
`
module
.
exports
=
debuggerTab
module
.
exports
=
debuggerTab
function
debuggerTab
(
container
,
appAPI
,
events
,
opts
)
{
function
debuggerTab
(
container
,
appAPI
,
events
,
opts
)
{
var
el
=
yo
` <div class="
${
css
.
debuggerTabView
}
"id="debugView"><div id="debugger"></div></div>`
var
el
=
yo
`
<div class="
${
css
.
debuggerTabView
}
"id="debugView">
<div id="debugger" class="
${
css
.
debugger
}
"></div>
</div>`
container
.
appendChild
(
el
)
container
.
appendChild
(
el
)
}
}
src/app/files-tab.js
View file @
3b922876
...
@@ -14,13 +14,19 @@ var css = csjs`
...
@@ -14,13 +14,19 @@ var css = csjs`
.filesTabView {
.filesTabView {
padding: 2%;
padding: 2%;
}
}
.crow {
.crow
extends
${
styles
.
displayBox
}
{
margin-
top: 1em
;
margin-
bottom: 1%
;
display: flex;
display: flex;
flex-wrap: wrap;
}
}
.infoBox extends
${
styles
.
infoTextBox
}
{
.infoBox extends
${
styles
.
infoTextBox
}
{
margin-top: 2em;
margin-top: 2em;
}
}
.button extends
${
styles
.
button
}
{
background-color:
${
styles
.
colors
.
blue
}
;
margin-bottom: .5em;
margin-right: 1em;
}
`
`
module
.
exports
=
filesTab
module
.
exports
=
filesTab
...
@@ -29,14 +35,15 @@ function filesTab (container, appAPI, events, opts) {
...
@@ -29,14 +35,15 @@ function filesTab (container, appAPI, events, opts) {
var
el
=
yo
`
var
el
=
yo
`
<div class="
${
css
.
filesTabView
}
" id="publishView">
<div class="
${
css
.
filesTabView
}
" id="publishView">
<div class="
${
css
.
crow
}
">
<div class="
${
css
.
crow
}
">
<button id="gist" title="Publish all files as public gist on github.com">
<button
class="
${
css
.
button
}
"
id="gist" title="Publish all files as public gist on github.com">
<i class="fa fa-github"></i>
<i class="fa fa-github"></i>
Publish Gist
Publish Gist
</button>
</button>
Publish all open files to an anonymous github gist.<br>
Publish all open files to an anonymous github gist.<br>
</div>
</div>
<div class="
${
css
.
crow
}
">
<div class="
${
css
.
crow
}
">
<button id="copyOver" title="Copy all files to another instance of browser-solidity.">
<button class="
${
css
.
button
}
" id="copyOver" title="Copy all files to another instance of browser-solidity.">
<i class="fa fa-files-o" aria-hidden="true"></i>
Copy files
Copy files
</button>
</button>
Copy all files to another instance of Browser-solidity.
Copy all files to another instance of Browser-solidity.
...
...
src/app/righthand-panel.js
View file @
3b922876
...
@@ -99,9 +99,7 @@ function RighthandPanel (appAPI, events, opts) {
...
@@ -99,9 +99,7 @@ function RighthandPanel (appAPI, events, opts) {
;[...
options
.
children
].
forEach
((
el
)
=>
{
el
.
classList
.
add
(
css
.
options
)
})
;[...
options
.
children
].
forEach
((
el
)
=>
{
el
.
classList
.
add
(
css
.
options
)
})
// ----------------- tabbed menu -----------------
// ----------------- tabbed menu -----------------
var
tabbedMenuAPI
=
{
var
tabbedMenuAPI
=
{}
warnCompilerLoading
:
appAPI
.
warnCompilerLoading
}
// load tabbed menu component
// load tabbed menu component
var
tabEvents
=
{
compiler
:
events
.
compiler
,
app
:
events
.
app
}
var
tabEvents
=
{
compiler
:
events
.
compiler
,
app
:
events
.
app
}
tabbedMenu
(
options
,
tabbedMenuAPI
,
tabEvents
,
{})
tabbedMenu
(
options
,
tabbedMenuAPI
,
tabEvents
,
{})
...
...
src/app/settings-tab.js
View file @
3b922876
...
@@ -12,6 +12,7 @@ var css = csjs`
...
@@ -12,6 +12,7 @@ var css = csjs`
}
}
.info extends
${
styles
.
infoTextBox
}
{
.info extends
${
styles
.
infoTextBox
}
{
margin-bottom: 2em;
margin-bottom: 2em;
word-break: break-word;
}
}
.crow {
.crow {
margin-top: 1em;
margin-top: 1em;
...
@@ -21,23 +22,6 @@ var css = csjs`
...
@@ -21,23 +22,6 @@ var css = csjs`
float: left;
float: left;
max-width: 90%;
max-width: 90%;
}
}
.button extends
${
styles
.
button
}
{
background-color: #C6CFF7;
width: 100%;
align-self: center;
text-align: -webkit-center;
}
.col1 extends
${
styles
.
titleL
}
{
float: left;
align-self: center;
}
.checkboxText {
margin-left: 3px;
}
.compilationWarning extends
${
styles
.
warningTextBox
}
{
margin-top: 1em;
margin-left: 0.5em;
}
}
}
`
`
module
.
exports
=
SettingsTab
module
.
exports
=
SettingsTab
...
@@ -46,21 +30,6 @@ function SettingsTab (container, appAPI, appEvents, opts) {
...
@@ -46,21 +30,6 @@ function SettingsTab (container, appAPI, appEvents, opts) {
if
(
typeof
container
===
'string'
)
container
=
document
.
querySelector
(
container
)
if
(
typeof
container
===
'string'
)
container
=
document
.
querySelector
(
container
)
if
(
!
container
)
throw
new
Error
(
'no container given'
)
if
(
!
container
)
throw
new
Error
(
'no container given'
)
var
warnCompilationSlow
=
yo
`<div id="warnCompilationSlow"></div>`
warnCompilationSlow
.
className
=
css
.
compilationWarning
appEvents
.
compiler
.
register
(
'compilationDuration'
,
function
tabHighlighting
(
speed
)
{
var
settingsView
=
document
.
querySelector
(
'#header #menu .settingsView'
)
if
(
speed
>
1000
)
{
warnCompilationSlow
.
innerHTML
=
`Last compilation took
${
speed
}
ms. We suggest to turn off autocompilation.`
warnCompilationSlow
.
style
.
visibility
=
'visible'
settingsView
.
style
.
color
=
'#FF8B8B'
}
else
{
warnCompilationSlow
.
innerHTML
=
''
warnCompilationSlow
.
style
.
visibility
=
'hidden'
settingsView
.
style
.
color
=
''
}
})
var
el
=
yo
`
var
el
=
yo
`
<div class="
${
css
.
settingsTabView
}
"id="settingsView">
<div class="
${
css
.
settingsTabView
}
"id="settingsView">
<div class="
${
css
.
info
}
">
<div class="
${
css
.
info
}
">
...
@@ -78,15 +47,6 @@ function SettingsTab (container, appAPI, appEvents, opts) {
...
@@ -78,15 +47,6 @@ function SettingsTab (container, appAPI, appEvents, opts) {
<div><input class="
${
css
.
col1
}
" id="optimize" type="checkbox"></div>
<div><input class="
${
css
.
col1
}
" id="optimize" type="checkbox"></div>
<span class="
${
css
.
checkboxText
}
">Enable Optimization</span>
<span class="
${
css
.
checkboxText
}
">Enable Optimization</span>
</div>
</div>
<div class="
${
css
.
crow
}
">
<div><input class="
${
css
.
col1
}
" id="autoCompile" type="checkbox" checked></div>
<span class="
${
css
.
checkboxText
}
">Auto Compile</span>
</div>
</div>
<div class="
${
css
.
crow
}
">
<div class="
${
css
.
button
}
"id="compile" title="Compile source code">Compile</div>
</div>
${
warnCompilationSlow
}
</div>
</div>
`
`
container
.
appendChild
(
el
)
container
.
appendChild
(
el
)
...
...
src/app/staticanalysis/staticAnalysisView.js
View file @
3b922876
...
@@ -5,12 +5,26 @@ var $ = require('jquery')
...
@@ -5,12 +5,26 @@ var $ = require('jquery')
var
utils
=
require
(
'../utils'
)
var
utils
=
require
(
'../utils'
)
var
csjs
=
require
(
'csjs-inject'
)
var
csjs
=
require
(
'csjs-inject'
)
var
styleGuide
=
require
(
'../style-guide'
)
var
styles
=
styleGuide
()
var
css
=
csjs
`
var
css
=
csjs
`
.analysis {
.analysis {
font-height: 1.5em;
font-height: 1.5em;
}
}
.result {
.result {
margin-top: 1em;
margin-top: 1%;
}
.buttons extends
${
styles
.
displayBox
}
{
display: flex;
align-items: center;
}
.buttonRun extends
${
styles
.
button
}
{
background-color:
${
styles
.
colors
.
blue
}
;
margin-right: 1%;
}
.analysisModulesContainer extends
${
styles
.
displayBox
}
{
margin-bottom: 1%;
}
}
`
`
...
@@ -37,13 +51,12 @@ staticAnalysisView.prototype.render = function () {
...
@@ -37,13 +51,12 @@ staticAnalysisView.prototype.render = function () {
var
self
=
this
var
self
=
this
var
view
=
yo
`
var
view
=
yo
`
<div class="
${
css
.
analysis
}
">
<div class="
${
css
.
analysis
}
">
<strong class="
${
css
.
title
}
">Static Analysis</strong><br>
<label for="autorunstaticanalysis"><input id="autorunstaticanalysis" type="checkbox" style="vertical-align:bottom" checked="true">Auto run</label>
<div id="staticanalysismodules">
<div id="staticanalysismodules">
${
this
.
modulesView
}
${
this
.
modulesView
}
</div>
</div>
<div>
<div class="
${
css
.
buttons
}
">
<button onclick=
${
function
()
{
self
.
run
()
}
} >Run</button>
<button class=
${
css
.
buttonRun
}
onclick=
${
function
()
{
self
.
run
()
}
} >Run</button>
<label for="autorunstaticanalysis"><input id="autorunstaticanalysis" type="checkbox" style="vertical-align:bottom" checked="true">Auto run</label>
</div>
</div>
<div class="
${
css
.
result
}
" "id='staticanalysisresult'></div>
<div class="
${
css
.
result
}
" "id='staticanalysisresult'></div>
</div>
</div>
...
@@ -93,10 +106,10 @@ staticAnalysisView.prototype.run = function () {
...
@@ -93,10 +106,10 @@ staticAnalysisView.prototype.run = function () {
})
})
})
})
if
(
warningContainer
.
html
()
===
''
)
{
if
(
warningContainer
.
html
()
===
''
)
{
$
(
'#
header
#menu .staticanalysisView'
).
css
(
'color'
,
''
)
$
(
'#
righthand-panel
#menu .staticanalysisView'
).
css
(
'color'
,
''
)
warningContainer
.
html
(
'No warning to report'
)
warningContainer
.
html
(
'No warning to report'
)
}
else
{
}
else
{
$
(
'#
header
#menu .staticanalysisView'
).
css
(
'color'
,
'#FF8B8B'
)
$
(
'#
righthand-panel
#menu .staticanalysisView'
).
css
(
'color'
,
'#FF8B8B'
)
}
}
})
})
}
else
{
}
else
{
...
@@ -123,8 +136,7 @@ function renderModules (modules) {
...
@@ -123,8 +136,7 @@ function renderModules (modules) {
</label>
</label>
`
`
})
})
return
yo
`<div>
return
yo
`<div class="
${
css
.
analysisModulesContainer
}
">
<br>
<label>
<label>
<b>
${
category
[
0
].
categoryDisplayName
}
</b>
<b>
${
category
[
0
].
categoryDisplayName
}
</b>
</label>
</label>
...
...
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