|
|
@ -45,7 +45,7 @@ export class GistHandler extends Plugin { |
|
|
|
setTimeout(() => reject(new Error('Hide')), 0) |
|
|
|
setTimeout(() => reject(new Error('Hide')), 0) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.call('modal', 'modal', modalContent) |
|
|
|
this.call('notification', 'modal', modalContent) |
|
|
|
}) |
|
|
|
}) |
|
|
|
})() |
|
|
|
})() |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
@ -63,7 +63,7 @@ export class GistHandler extends Plugin { |
|
|
|
title: 'Gist load error', |
|
|
|
title: 'Gist load error', |
|
|
|
message: 'Error while loading gist. Please provide a valid Gist ID or URL.' |
|
|
|
message: 'Error while loading gist. Please provide a valid Gist ID or URL.' |
|
|
|
} |
|
|
|
} |
|
|
|
this.call('modal', 'alert', modalContent) |
|
|
|
this.call('notification', 'alert', modalContent) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const modalContent = { |
|
|
|
const modalContent = { |
|
|
@ -71,7 +71,7 @@ export class GistHandler extends Plugin { |
|
|
|
title: 'Gist load error', |
|
|
|
title: 'Gist load error', |
|
|
|
message: 'Error while loading gist. Id cannot be empty.' |
|
|
|
message: 'Error while loading gist. Id cannot be empty.' |
|
|
|
} |
|
|
|
} |
|
|
|
this.call('modal', 'alert', modalContent) |
|
|
|
this.call('notification', 'alert', modalContent) |
|
|
|
} |
|
|
|
} |
|
|
|
return loadingFromGist |
|
|
|
return loadingFromGist |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -97,7 +97,7 @@ export class GistHandler extends Plugin { |
|
|
|
modalType: 'alert', |
|
|
|
modalType: 'alert', |
|
|
|
okLabel: 'OK' |
|
|
|
okLabel: 'OK' |
|
|
|
} |
|
|
|
} |
|
|
|
await this.call('modal', 'modal', modalContent) |
|
|
|
await this.call('notification', 'modal', modalContent) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (e: any) { |
|
|
|
} catch (e: any) { |
|
|
@ -107,7 +107,7 @@ export class GistHandler extends Plugin { |
|
|
|
message: e.message |
|
|
|
message: e.message |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
await this.call('modal', 'alert', modalContent) |
|
|
|
await this.call('notification', 'alert', modalContent) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -124,7 +124,7 @@ export class GistHandler extends Plugin { |
|
|
|
message: errorSavingFiles.message || errorSavingFiles |
|
|
|
message: errorSavingFiles.message || errorSavingFiles |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.call('modal', 'alert', modalContent) |
|
|
|
this.call('notification', 'alert', modalContent) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|