summaryrefslogtreecommitdiff
path: root/src/client/app/desktop/api/input.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-05-27 18:12:39 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-05-27 18:12:39 +0900
commitfa1a85f682302c3629326198b3cb5ecf738d3cd7 (patch)
tree3ce7ff0bb761db748374fbcbddf4a2b64ebedca2 /src/client/app/desktop/api/input.ts
parent2.18.1 (diff)
downloadsharkey-fa1a85f682302c3629326198b3cb5ecf738d3cd7.tar.gz
sharkey-fa1a85f682302c3629326198b3cb5ecf738d3cd7.tar.bz2
sharkey-fa1a85f682302c3629326198b3cb5ecf738d3cd7.zip
Fix bug
Diffstat (limited to 'src/client/app/desktop/api/input.ts')
-rw-r--r--src/client/app/desktop/api/input.ts21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/client/app/desktop/api/input.ts b/src/client/app/desktop/api/input.ts
index ce26a8112f..bd7bfa0129 100644
--- a/src/client/app/desktop/api/input.ts
+++ b/src/client/app/desktop/api/input.ts
@@ -1,20 +1,19 @@
+import OS from '../../mios';
import InputDialog from '../views/components/input-dialog.vue';
-export default function(opts) {
+export default (os: OS) => opts => {
return new Promise<string>((res, rej) => {
const o = opts || {};
- const d = new InputDialog({
- propsData: {
- title: o.title,
- placeholder: o.placeholder,
- default: o.default,
- type: o.type || 'text',
- allowEmpty: o.allowEmpty
- }
- }).$mount();
+ const d = os.new(InputDialog, {
+ title: o.title,
+ placeholder: o.placeholder,
+ default: o.default,
+ type: o.type || 'text',
+ allowEmpty: o.allowEmpty
+ });
d.$once('done', text => {
res(text);
});
document.body.appendChild(d.$el);
});
-}
+};