From cccd31c5bb7cd1b1ba8fd3759887a623b6f3ec10 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 18 Feb 2017 17:40:07 +0900 Subject: [PATCH] :v: --- src/web/app/desktop/mixins.ls | 2 +- src/web/app/desktop/scripts/notify.js | 8 ++++++++ src/web/app/desktop/scripts/notify.ls | 6 ------ 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 src/web/app/desktop/scripts/notify.js delete mode 100644 src/web/app/desktop/scripts/notify.ls diff --git a/src/web/app/desktop/mixins.ls b/src/web/app/desktop/mixins.ls index cb3c93a3d..1c80efa52 100644 --- a/src/web/app/desktop/mixins.ls +++ b/src/web/app/desktop/mixins.ls @@ -9,7 +9,7 @@ module.exports = (me) ~> require './scripts/open-window' riot.mixin \notify do - notify: require './scripts/notify.ls' + notify: require './scripts/notify' dialog = require './scripts/dialog.ls' diff --git a/src/web/app/desktop/scripts/notify.js b/src/web/app/desktop/scripts/notify.js new file mode 100644 index 000000000..048f22aea --- /dev/null +++ b/src/web/app/desktop/scripts/notify.js @@ -0,0 +1,8 @@ +const riot = require('riot'); + +module.exports = message => { + const notification = document.body.appendChild(document.createElement('mk-ui-notification')); + riot.mount(notification, { + message: message + }); +}; diff --git a/src/web/app/desktop/scripts/notify.ls b/src/web/app/desktop/scripts/notify.ls deleted file mode 100644 index 919bbc3dc..000000000 --- a/src/web/app/desktop/scripts/notify.ls +++ /dev/null @@ -1,6 +0,0 @@ -riot = require \riot - -module.exports = (message) ~> - notification = document.body.append-child document.create-element \mk-ui-notification - riot.mount notification, do - message: message