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
37d9c377
Commit
37d9c377
authored
Mar 03, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure alert has a title
parent
1c7507d3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
landing-page.js
apps/remix-ide/src/app/ui/landing-page/landing-page.js
+4
-3
modal-dialog-custom.js
apps/remix-ide/src/app/ui/modal-dialog-custom.js
+1
-1
gist-handler.js
apps/remix-ide/src/lib/gist-handler.js
+3
-3
No files found.
apps/remix-ide/src/app/ui/landing-page/landing-page.js
View file @
37d9c377
...
...
@@ -240,20 +240,21 @@ export class LandingPage extends ViewPlugin {
<div>e.g
${
examples
.
map
((
url
)
=>
{
return
yo
`<div class="p-1"><a>
${
url
}
</a></div>`
})}
</div>
</div>`
modalDialogCustom
.
prompt
(
`Import from
${
service
}
`
,
msg
,
null
,
(
target
)
=>
{
const
title
=
`Import from
${
service
}
`
modalDialogCustom
.
prompt
(
title
,
msg
,
null
,
(
target
)
=>
{
if
(
target
!==
''
)
{
compilerImport
.
import
(
target
,
(
loadingMsg
)
=>
{
tooltip
(
loadingMsg
)
},
(
error
,
content
,
cleanUrl
,
type
,
url
)
=>
{
if
(
error
)
{
modalDialogCustom
.
alert
(
error
.
message
||
error
)
modalDialogCustom
.
alert
(
title
,
error
.
message
||
error
)
}
else
{
try
{
fileProviders
.
workspace
.
addExternal
(
type
+
'/'
+
cleanUrl
,
content
,
url
)
this
.
verticalIcons
.
select
(
'fileExplorers'
)
}
catch
(
e
)
{
modalDialogCustom
.
alert
(
e
.
message
)
modalDialogCustom
.
alert
(
title
,
e
.
message
)
}
}
}
...
...
apps/remix-ide/src/app/ui/modal-dialog-custom.js
View file @
37d9c377
...
...
@@ -5,7 +5,7 @@ var css = require('./styles/modal-dialog-custom-styles')
module
.
exports
=
{
alert
:
function
(
title
,
text
)
{
if
(
text
)
return
modal
(
title
,
yo
`<div>
${
text
}
</div>`
,
null
,
{
label
:
null
})
return
modal
(
''
,
yo
`<div>
${
title
}
</div>`
,
null
,
{
label
:
null
})
return
modal
(
'
alert
'
,
yo
`<div>
${
title
}
</div>`
,
null
,
{
label
:
null
})
},
prompt
:
function
(
title
,
text
,
inputValue
,
ok
,
cancel
,
focus
)
{
return
prompt
(
title
,
text
,
false
,
inputValue
,
ok
,
cancel
,
focus
)
...
...
apps/remix-ide/src/lib/gist-handler.js
View file @
37d9c377
...
...
@@ -20,7 +20,7 @@ function GistHandler (_window) {
if
(
gistId
)
{
cb
(
gistId
)
}
else
{
modalDialogCustom
.
alert
(
'Error while loading gist. Please provide a valid Gist ID or URL.'
)
modalDialogCustom
.
alert
(
'
Gist load error'
,
'
Error while loading gist. Please provide a valid Gist ID or URL.'
)
}
}
})
...
...
@@ -49,7 +49,7 @@ function GistHandler (_window) {
json
:
true
},
async
(
error
,
response
,
data
=
{})
=>
{
if
(
error
||
!
data
.
files
)
{
modalDialogCustom
.
alert
(
`Gist load error:
${
error
||
data
.
message
}
`
)
modalDialogCustom
.
alert
(
'Gist load error'
,
error
||
data
.
message
)
return
}
const
obj
=
{}
...
...
@@ -61,7 +61,7 @@ function GistHandler (_window) {
const
provider
=
fileManager
.
getProvider
(
'workspace'
)
provider
.
lastLoadedGistId
=
gistId
}
else
{
modalDialogCustom
.
alert
(
errorLoadingFile
.
message
||
errorLoadingFile
)
modalDialogCustom
.
alert
(
'Gist load error'
,
errorLoadingFile
.
message
||
errorLoadingFile
)
}
})
})
...
...
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