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
c6f614f6
Commit
c6f614f6
authored
Apr 12, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add import from gist, github, swarm, ipfs
parent
0ed8cfd3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
landing-page.js
src/app/ui/landing-page/landing-page.js
+9
-1
modal-dialog-custom.js
src/app/ui/modal-dialog-custom.js
+1
-1
gist-handler.js
src/lib/gist-handler.js
+1
-1
No files found.
src/app/ui/landing-page/landing-page.js
View file @
c6f614f6
...
@@ -189,6 +189,10 @@ export class LandingPage extends BaseApi {
...
@@ -189,6 +189,10 @@ export class LandingPage extends BaseApi {
this
.
appManager
.
ensureActivated
(
'remixd'
)
this
.
appManager
.
ensureActivated
(
'remixd'
)
}
}
let
importFromExternal
=
()
=>
{
load
(
'URL'
)
}
let
importFromExternal
=
()
=>
{
load
(
'URL'
)
}
let
importFromGist
=
()
=>
{
let
app
=
globalRegistry
.
get
(
'app'
).
api
app
.
loadFromGist
({
gist
:
''
})
}
let
container
=
yo
`<div>
let
container
=
yo
`<div>
<div class="
${
css
.
hpLogoContainer
}
"><img src="
${
logo
}
" style="height:45px;" alt="Remix logo" /></div>
<div class="
${
css
.
hpLogoContainer
}
"><img src="
${
logo
}
" style="height:45px;" alt="Remix logo" /></div>
...
@@ -227,7 +231,11 @@ export class LandingPage extends BaseApi {
...
@@ -227,7 +231,11 @@ export class LandingPage extends BaseApi {
<
/label
>
<
/label
>
<
/p
>
<
/p
>
<
p
class
=
"mb-1 ${css.text}"
onclick
=
$
{()
=>
{
connectToLocalhost
()
}}
>
Connect
to
Localhost
<
/p
>
<
p
class
=
"mb-1 ${css.text}"
onclick
=
$
{()
=>
{
connectToLocalhost
()
}}
>
Connect
to
Localhost
<
/p
>
<
p
class
=
"mb-1 ${css.text} onclick=${() => { importFromExternal() }}"
>
Import
From
external
source
<
/p
>
<
p
class
=
"mb-1 ${css.text} onclick=${() => { importFromExternal() }}"
>
Import
From
:
<
/p
>
<
button
class
=
"btn btn-lg btn-secondary"
onclick
=
$
{()
=>
{
importFromGist
()
}}
>
Gist
<
/button
>
<
button
class
=
"btn btn-lg btn-secondary"
onclick
=
$
{()
=>
{
load
(
'Github URL'
)
}}
>
Github
<
/button
>
<
button
class
=
"btn btn-lg btn-secondary"
onclick
=
$
{()
=>
{
load
(
'bzz-raw URL'
)
}}
>
Swarm
<
/button
>
<
button
class
=
"btn btn-lg btn-secondary"
onclick
=
$
{()
=>
{
load
(
'ipfs URL'
)
}}
>
Ipfs
<
/button
>
<
/div><!-- end of div.file --
>
<
/div><!-- end of div.file --
>
<
/div><!-- end of #col1 --
>
<
/div><!-- end of #col1 --
>
<
div
id
=
"col2"
class
=
"col-sm-6"
>
<
div
id
=
"col2"
class
=
"col-sm-6"
>
...
...
src/app/ui/modal-dialog-custom.js
View file @
c6f614f6
...
@@ -66,7 +66,7 @@ module.exports = {
...
@@ -66,7 +66,7 @@ module.exports = {
function
prompt
(
title
,
text
,
hidden
,
inputValue
,
ok
,
cancel
,
focus
)
{
function
prompt
(
title
,
text
,
hidden
,
inputValue
,
ok
,
cancel
,
focus
)
{
if
(
!
inputValue
)
inputValue
=
''
if
(
!
inputValue
)
inputValue
=
''
var
type
=
hidden
?
'password'
:
'text'
var
type
=
hidden
?
'password'
:
'text'
var
input
=
yo
`<input type=
${
type
}
name='prompt_text' id='prompt_text' class="
${
css
[
'prompt_text'
]}
" value='
${
inputValue
}
' >`
var
input
=
yo
`<input type=
${
type
}
name='prompt_text' id='prompt_text' class="
${
css
[
'prompt_text'
]}
form-control
" value='
${
inputValue
}
' >`
modal
(
title
,
yo
`<div>
${
text
}
<div>
${
input
}
</div></div>`
,
modal
(
title
,
yo
`<div>
${
text
}
<div>
${
input
}
</div></div>`
,
{
{
fn
:
()
=>
{
if
(
typeof
ok
===
'function'
)
ok
(
document
.
getElementById
(
'prompt_text'
).
value
)
}
fn
:
()
=>
{
if
(
typeof
ok
===
'function'
)
ok
(
document
.
getElementById
(
'prompt_text'
).
value
)
}
...
...
src/lib/gist-handler.js
View file @
c6f614f6
...
@@ -12,7 +12,7 @@ function GistHandler (_window) {
...
@@ -12,7 +12,7 @@ function GistHandler (_window) {
var
gistId
var
gistId
if
(
params
[
'gist'
]
===
''
)
{
if
(
params
[
'gist'
]
===
''
)
{
loadingFromGist
=
true
loadingFromGist
=
true
modalDialogCustom
.
prompt
(
null
,
'Enter the
URL or
ID of the Gist you would like to load.'
,
null
,
(
target
)
=>
{
modalDialogCustom
.
prompt
(
null
,
'Enter the ID of the Gist you would like to load.'
,
null
,
(
target
)
=>
{
if
(
target
!==
''
)
{
if
(
target
!==
''
)
{
gistId
=
getGistId
(
target
)
gistId
=
getGistId
(
target
)
if
(
gistId
)
{
if
(
gistId
)
{
...
...
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