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
ca8ad45e
Commit
ca8ad45e
authored
Jan 14, 2019
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor & simplify support tab
parent
d1d307de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
22 deletions
+14
-22
app.js
src/app.js
+5
-1
support-tab.js
src/app/tabs/support-tab.js
+9
-21
No files found.
src/app.js
View file @
ca8ad45e
...
@@ -438,10 +438,14 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -438,10 +438,14 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
settings
:
new
SettingsTab
(
self
.
_components
.
registry
),
settings
:
new
SettingsTab
(
self
.
_components
.
registry
),
analysis
:
new
AnalysisTab
(
registry
),
analysis
:
new
AnalysisTab
(
registry
),
debug
:
new
DebuggerTab
(
self
.
_components
.
registry
),
debug
:
new
DebuggerTab
(
self
.
_components
.
registry
),
support
:
new
SupportTab
(
self
.
_components
.
registry
),
support
:
new
SupportTab
(),
test
:
new
TestTab
(
self
.
_components
.
registry
,
compileTab
)
test
:
new
TestTab
(
self
.
_components
.
registry
,
compileTab
)
}
}
registry
.
get
(
'app'
).
api
.
event
.
register
(
'tabChanged'
,
(
tabName
)
=>
{
if
(
tabName
===
'Support'
)
tabs
.
support
.
loadTab
()
})
let
transactionContextAPI
=
{
let
transactionContextAPI
=
{
getAddress
:
(
cb
)
=>
{
getAddress
:
(
cb
)
=>
{
cb
(
null
,
$
(
'#txorigin'
).
val
())
cb
(
null
,
$
(
'#txorigin'
).
val
())
...
...
src/app/tabs/support-tab.js
View file @
ca8ad45e
const
yo
=
require
(
'yo-yo'
)
const
yo
=
require
(
'yo-yo'
)
var
css
=
require
(
'./styles/support-tab-styles'
)
var
css
=
require
(
'./styles/support-tab-styles'
)
var
globalRegistry
=
require
(
'../../global/registry'
)
var
EventManager
=
require
(
'../../lib/events'
)
class
SupportTab
{
class
SupportTab
{
constructor
(
localRegistry
)
{
constructor
(
localRegistry
)
{
this
.
event
=
new
EventManager
()
this
.
el
=
null
this
.
el
=
null
this
.
gitterIframe
=
''
this
.
gitterIframe
=
''
this
.
gitterIsLoaded
=
false
}
this
.
data
=
{
gitterIsLoaded
:
false
}
loadTab
()
{
this
.
_components
=
{}
if
(
this
.
gitterIsLoaded
)
return
this
.
_components
.
registry
=
localRegistry
||
globalRegistry
this
.
_deps
=
{
app
:
this
.
_components
.
registry
.
get
(
'app'
).
api
}
this
.
_deps
.
app
.
event
.
register
(
'tabChanged'
,
(
tabName
)
=>
{
const
iframe
=
yo
`<iframe class="
${
css
.
chatIframe
}
" src='https://gitter.im/ethereum/remix/~embed'>`
if
(
tabName
!==
'Support'
||
this
.
data
.
gitterIsLoaded
)
return
this
.
gitterIframe
.
parentNode
.
replaceChild
(
iframe
,
this
.
gitterIframe
)
const
iframe
=
yo
`<iframe class="
${
css
.
chatIframe
}
" src='https://gitter.im/ethereum/remix/~embed'>`
this
.
gitterIframe
=
iframe
this
.
gitterIframe
.
parentNode
.
replaceChild
(
iframe
,
this
.
gitterIframe
)
this
.
el
.
style
.
display
=
'block'
this
.
gitterIframe
=
iframe
this
.
gitterIsLoaded
=
true
this
.
el
.
style
.
display
=
'block'
this
.
data
.
gitterIsLoaded
=
true
})
}
}
render
()
{
render
()
{
...
...
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