Fixed: #166 & add showNotification for guiApi

This commit is contained in:
Molunerfinn
2019-01-15 17:28:50 +08:00
parent 8704e212bf
commit 0abdb3cf00
3 changed files with 35 additions and 5 deletions

View File

@@ -82,6 +82,24 @@ class GuiApi {
}
return []
}
/**
* For notification
* @param {Object} options
*/
showNotification (options) {
if (options === undefined) {
options = {
title: '',
body: ''
}
}
const notification = new Notification({
title: options.title,
body: options.body
})
notification.show()
}
}
export default GuiApi