mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-30 12:40:02 +08:00
Fixed: #166 & add showNotification for guiApi
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user