summaryrefslogtreecommitdiff
path: root/src/web/app/desktop/scripts/input-dialog.js
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-18 17:43:31 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-18 17:43:31 +0900
commita5ece57e3dcbc184ce8bafe88db52d4e6b845f5b (patch)
treeeb5fa7d8169958127a31c38354d6cb975259cb0a /src/web/app/desktop/scripts/input-dialog.js
parent:v: (diff)
downloadmisskey-a5ece57e3dcbc184ce8bafe88db52d4e6b845f5b.tar.gz
misskey-a5ece57e3dcbc184ce8bafe88db52d4e6b845f5b.tar.bz2
misskey-a5ece57e3dcbc184ce8bafe88db52d4e6b845f5b.zip
:v:
Diffstat (limited to '')
-rw-r--r--src/web/app/desktop/scripts/input-dialog.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/web/app/desktop/scripts/input-dialog.js b/src/web/app/desktop/scripts/input-dialog.js
new file mode 100644
index 0000000000..ab9c57401f
--- /dev/null
+++ b/src/web/app/desktop/scripts/input-dialog.js
@@ -0,0 +1,12 @@
+const riot = require('riot');
+
+module.exports = (title, placeholder, defaultValue, onOk, onCancel) => {
+ const dialog = document.body.appendChild(document.createElement('mk-input-dialog'));
+ return riot.mount(dialog, {
+ title: title,
+ placeholder: placeholder,
+ 'default': defaultValue,
+ onOk: onOk,
+ onCancel: onCancel
+ });
+};