diff --git a/apps/remix-ide/src/app/ui/landing-page/landing-page.js b/apps/remix-ide/src/app/ui/landing-page/landing-page.js
index fea70a5a5a..bf89d166d8 100644
--- a/apps/remix-ide/src/app/ui/landing-page/landing-page.js
+++ b/apps/remix-ide/src/app/ui/landing-page/landing-page.js
@@ -240,20 +240,21 @@ export class LandingPage extends ViewPlugin {
e.g ${examples.map((url) => { return yo`
` })}
`
- 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)
}
}
}
diff --git a/apps/remix-ide/src/app/ui/modal-dialog-custom.js b/apps/remix-ide/src/app/ui/modal-dialog-custom.js
index bcbd4aaec5..e681102428 100644
--- a/apps/remix-ide/src/app/ui/modal-dialog-custom.js
+++ b/apps/remix-ide/src/app/ui/modal-dialog-custom.js
@@ -5,7 +5,7 @@ var css = require('./styles/modal-dialog-custom-styles')
module.exports = {
alert: function (title, text) {
if (text) return modal(title, yo`${text}
`, null, { label: null })
- return modal('', yo`${title}
`, null, { label: null })
+ return modal('alert', yo`${title}
`, null, { label: null })
},
prompt: function (title, text, inputValue, ok, cancel, focus) {
return prompt(title, text, false, inputValue, ok, cancel, focus)
diff --git a/apps/remix-ide/src/lib/gist-handler.js b/apps/remix-ide/src/lib/gist-handler.js
index 9b92b5e2f8..92c170b10f 100644
--- a/apps/remix-ide/src/lib/gist-handler.js
+++ b/apps/remix-ide/src/lib/gist-handler.js
@@ -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)
}
})
})