summaryrefslogtreecommitdiff
path: root/src/web/app/desktop/scripts/dialog.ls
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app/desktop/scripts/dialog.ls')
-rw-r--r--src/web/app/desktop/scripts/dialog.ls17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/web/app/desktop/scripts/dialog.ls b/src/web/app/desktop/scripts/dialog.ls
new file mode 100644
index 0000000000..f3dd6cea1b
--- /dev/null
+++ b/src/web/app/desktop/scripts/dialog.ls
@@ -0,0 +1,17 @@
+# Dialog
+#================================
+
+riot = require 'riot'
+
+module.exports = (title, text, buttons, can-through, on-through) ~>
+ dialog = document.body.append-child document.create-element \mk-dialog
+ controller = riot.observable!
+ riot.mount dialog, do
+ controller: controller
+ title: title
+ text: text
+ buttons: buttons
+ can-through: can-through
+ on-through: on-through
+ controller.trigger \open
+ return controller