diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-27 18:12:39 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-27 18:12:39 +0900 |
| commit | fa1a85f682302c3629326198b3cb5ecf738d3cd7 (patch) | |
| tree | 3ce7ff0bb761db748374fbcbddf4a2b64ebedca2 /src/client/app/desktop/api/input.ts | |
| parent | 2.18.1 (diff) | |
| download | sharkey-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.ts | 21 |
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); }); -} +}; |