diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-18 17:40:07 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-18 17:40:07 +0900 |
| commit | 7602f1672713df88d292ba28093d4ce516d4aeee (patch) | |
| tree | 81ece05b97b04270f8242eae44a181a571b35355 /src/web | |
| parent | :v: (diff) | |
| download | sharkey-7602f1672713df88d292ba28093d4ce516d4aeee.tar.gz sharkey-7602f1672713df88d292ba28093d4ce516d4aeee.tar.bz2 sharkey-7602f1672713df88d292ba28093d4ce516d4aeee.zip | |
:v:
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/app/desktop/mixins.ls | 2 | ||||
| -rw-r--r-- | src/web/app/desktop/scripts/notify.js | 8 | ||||
| -rw-r--r-- | src/web/app/desktop/scripts/notify.ls | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/web/app/desktop/mixins.ls b/src/web/app/desktop/mixins.ls index cb3c93a3df..1c80efa523 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 0000000000..048f22aea7 --- /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 919bbc3dcf..0000000000 --- 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 |