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
d33d4fad
Commit
d33d4fad
authored
Jan 14, 2019
by
Iuri Matias
Committed by
yann300
Jan 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify support-tab
parent
8338ab8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
26 deletions
+33
-26
support-tab.js
src/app/tabs/support-tab.js
+33
-26
No files found.
src/app/tabs/support-tab.js
View file @
d33d4fad
...
...
@@ -6,25 +6,28 @@ var globalRegistry = require('../../global/registry')
var
EventManager
=
require
(
'../../lib/events'
)
class
SupportTab
{
constructor
(
localRegistry
)
{
const
self
=
this
self
.
event
=
new
EventManager
()
self
.
_view
=
{
el
:
null
,
gitterIframe
:
''
,
config
:
{}
}
self
.
data
=
{
gitterIsLoaded
:
false
}
self
.
_components
=
{}
self
.
_components
.
registry
=
localRegistry
||
globalRegistry
this
.
event
=
new
EventManager
()
this
.
el
=
null
this
.
gitterIframe
=
''
this
.
data
=
{
gitterIsLoaded
:
false
}
this
.
_components
=
{}
this
.
_components
.
registry
=
localRegistry
||
globalRegistry
self
.
_deps
=
{
app
:
self
.
_components
.
registry
.
get
(
'app'
).
api
this
.
_deps
=
{
app
:
this
.
_components
.
registry
.
get
(
'app'
).
api
}
self
.
_deps
.
app
.
event
.
register
(
'tabChanged'
,
(
tabName
)
=>
{
if
(
tabName
!==
'Support'
||
self
.
data
.
gitterIsLoaded
)
return
this
.
_deps
.
app
.
event
.
register
(
'tabChanged'
,
(
tabName
)
=>
{
if
(
tabName
!==
'Support'
||
this
.
data
.
gitterIsLoaded
)
return
const
iframe
=
yo
`<iframe class="
${
css
.
chatIframe
}
" src='https://gitter.im/ethereum/remix/~embed'>`
self
.
_view
.
gitterIframe
.
parentNode
.
replaceChild
(
iframe
,
self
.
_view
.
gitterIframe
)
self
.
_view
.
gitterIframe
=
iframe
self
.
_view
.
el
.
style
.
display
=
'block'
self
.
data
.
gitterIsLoaded
=
true
this
.
gitterIframe
.
parentNode
.
replaceChild
(
iframe
,
this
.
gitterIframe
)
this
.
gitterIframe
=
iframe
this
.
el
.
style
.
display
=
'block'
this
.
data
.
gitterIsLoaded
=
true
})
}
profile
()
{
...
...
@@ -37,10 +40,11 @@ class SupportTab {
}
}
render
()
{
const
self
=
this
if
(
self
.
_view
.
el
)
return
self
.
_view
.
el
self
.
_view
.
gitterIframe
=
yo
`<div></div>`
self
.
_view
.
config
.
remixd
=
yo
`
if
(
this
.
el
)
return
this
.
el
this
.
gitterIframe
=
yo
`<div></div>`
const
remixd
=
yo
`
<div class="
${
css
.
info
}
">
<div class=
${
css
.
title
}
>Accessing local files</div>
<div class="
${
css
.
crow
}
">
...
...
@@ -52,7 +56,8 @@ class SupportTab {
<div class="
${
css
.
crow
}
"><a target="_blank" href="https://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem">http://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem.html</a></div>
<div class="
${
css
.
crow
}
">Installation: <pre class=
${
css
.
remixdinstallation
}
>npm install remixd -g</pre></div>
</div>`
self
.
_view
.
config
.
localremixd
=
yo
`
const
localremixd
=
yo
`
<div class="
${
css
.
info
}
">
<div class=
${
css
.
title
}
>Running Remix locally</div>
<div class="
${
css
.
crow
}
">
...
...
@@ -65,7 +70,8 @@ class SupportTab {
</div>
<a target="_blank" href="https://github.com/horizon-games/remix-app">https://github.com/horizon-games/remix-app</a>
</div>`
self
.
_view
.
el
=
yo
`
this
.
el
=
yo
`
<div class="
${
css
.
supportTabView
}
" id="supportView">
<div class="
${
css
.
infoBox
}
">
Have a question, found a bug or want to propose a feature? Have a look at the
...
...
@@ -74,17 +80,18 @@ class SupportTab {
<a target="_blank" href='https://solidity.readthedocs.io/en/latest/'> Solidity</a>.
</div>
<div class="
${
css
.
chat
}
">
<div class="
${
css
.
chatTitle
}
" onclick=
${
openLink
}
title='Click to open chat in Gitter'>
<div class="
${
css
.
chatTitle
}
" onclick=
${
()
=>
{
window
.
open
(
'https://gitter.im/ethereum/remix'
)
}
}
title
=
'Click to open chat in Gitter'
>
<
div
class
=
"${css.chatTitleText}"
>
ethereum
/
remix
community
chat
<
/div
>
<
/div
>
${
self
.
_view
.
gitterIframe
}
$
{
this
.
gitterIframe
}
</div>
${
self
.
_view
.
config
.
remixd
}
${
self
.
_view
.
config
.
localremixd
}
${
remixd
}
${
localremixd
}
</div>`
return
self
.
_view
.
el
function
openLink
()
{
window
.
open
(
'https://gitter.im/ethereum/remix'
)
}
return
this
.
el
}
}
module
.
exports
=
SupportTab
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