diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-21 01:58:47 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-21 01:58:47 +0900 |
| commit | 50bd1d9a5d92904873fc8064d8d6d5399922aa27 (patch) | |
| tree | ce448f1a94ce994ee07617234cc94a9e8b2045eb /src/client/app/mobile/api | |
| parent | :art: (diff) | |
| download | misskey-50bd1d9a5d92904873fc8064d8d6d5399922aa27.tar.gz misskey-50bd1d9a5d92904873fc8064d8d6d5399922aa27.tar.bz2 misskey-50bd1d9a5d92904873fc8064d8d6d5399922aa27.zip | |
更新ダイアログをHTMLで描画
Diffstat (limited to 'src/client/app/mobile/api')
| -rw-r--r-- | src/client/app/mobile/api/dialog.ts | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/client/app/mobile/api/dialog.ts b/src/client/app/mobile/api/dialog.ts index a2378767be..23f35b7aa9 100644 --- a/src/client/app/mobile/api/dialog.ts +++ b/src/client/app/mobile/api/dialog.ts @@ -1,5 +1,18 @@ -export default function(opts) { +import OS from '../../mios'; +import Dialog from '../views/components/dialog.vue'; + +export default (os: OS) => opts => { return new Promise<string>((res, rej) => { - alert('dialog not implemented yet'); + const o = opts || {}; + const d = os.new(Dialog, { + title: o.title, + text: o.text, + modal: o.modal, + buttons: o.actions + }); + d.$once('clicked', id => { + res(id); + }); + document.body.appendChild(d.$el); }); -} +}; |