set as alert

pull/1879/head
bunsenstraat 3 years ago
parent a02d588264
commit 53fa73fe07
  1. 26
      libs/remix-core-plugin/src/lib/gist-handler.ts

@ -61,21 +61,17 @@ export class GistHandler extends Plugin {
const modalContent = {
id: 'gisthandler',
title: 'Gist load error',
message: 'Error while loading gist. Please provide a valid Gist ID or URL.',
modalType: 'alert',
okLabel: 'OK'
message: 'Error while loading gist. Please provide a valid Gist ID or URL.'
}
this.call('modal', 'modal', modalContent)
this.call('modal', 'alert', modalContent)
}
} else {
const modalContent = {
id: 'gisthandlerEmpty',
title: 'Gist load error',
message: 'Error while loading gist. Id cannot be empty.',
modalType: 'alert',
okLabel: 'OK'
message: 'Error while loading gist. Id cannot be empty.'
}
this.call('modal', 'modal', modalContent)
this.call('modal', 'alert', modalContent)
}
return loadingFromGist
} else {
@ -108,11 +104,10 @@ export class GistHandler extends Plugin {
const modalContent = {
id: 'gisthandler',
title: 'Gist load error',
message: e.message,
modalType: 'alert',
okLabel: 'OK'
message: e.message
}
await this.call('modal', 'modal', modalContent)
await this.call('modal', 'alert', modalContent)
return
}
@ -126,11 +121,10 @@ export class GistHandler extends Plugin {
const modalContent = {
id: 'gisthandler',
title: 'Gist load error',
message: errorSavingFiles.message || errorSavingFiles,
modalType: 'alert',
okLabel: 'OK'
message: errorSavingFiles.message || errorSavingFiles
}
this.call('modal', 'modal', modalContent)
this.call('modal', 'alert', modalContent)
}
})
})

Loading…
Cancel
Save