2018-11-10 13:47:25 +01:00
|
|
|
import Module from '../__module';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Use external package module for notifications
|
|
|
|
*
|
|
|
|
* @see https://github.com/codex-team/js-notifier
|
|
|
|
*/
|
2020-06-03 10:17:29 +02:00
|
|
|
import notifier, { ConfirmNotifierOptions, NotifierOptions, PromptNotifierOptions } from 'codex-notifier';
|
2018-11-10 13:47:25 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notifier module
|
|
|
|
*/
|
|
|
|
export default class Notifier extends Module {
|
|
|
|
/**
|
|
|
|
* Show web notification
|
|
|
|
*
|
2020-06-03 10:17:29 +02:00
|
|
|
* @param {NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions} options - notification options
|
2018-11-10 13:47:25 +01:00
|
|
|
*/
|
2020-06-03 10:17:29 +02:00
|
|
|
public show(options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions): void {
|
2018-11-10 13:47:25 +01:00
|
|
|
notifier.show(options);
|
|
|
|
}
|
|
|
|
}
|