diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-11-09 16:00:29 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-09 16:00:29 +0900 |
| commit | 3f79c9ae4927d4186c708e130ecbb1ea4f72d9fa (patch) | |
| tree | 3af53c7b8d5ecc5f0c21cbc5abec3ec5254606b0 /src/client/app/mobile/api | |
| parent | [Client] Fix bug (diff) | |
| download | sharkey-3f79c9ae4927d4186c708e130ecbb1ea4f72d9fa.tar.gz sharkey-3f79c9ae4927d4186c708e130ecbb1ea4f72d9fa.tar.bz2 sharkey-3f79c9ae4927d4186c708e130ecbb1ea4f72d9fa.zip | |
Refactor client (#3178)
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
Diffstat (limited to 'src/client/app/mobile/api')
| -rw-r--r-- | src/client/app/mobile/api/choose-drive-file.ts | 18 | ||||
| -rw-r--r-- | src/client/app/mobile/api/choose-drive-folder.ts | 17 | ||||
| -rw-r--r-- | src/client/app/mobile/api/dialog.ts | 18 | ||||
| -rw-r--r-- | src/client/app/mobile/api/input.ts | 8 | ||||
| -rw-r--r-- | src/client/app/mobile/api/notify.ts | 3 | ||||
| -rw-r--r-- | src/client/app/mobile/api/post.ts | 24 |
6 files changed, 0 insertions, 88 deletions
diff --git a/src/client/app/mobile/api/choose-drive-file.ts b/src/client/app/mobile/api/choose-drive-file.ts deleted file mode 100644 index b1a78f2364..0000000000 --- a/src/client/app/mobile/api/choose-drive-file.ts +++ /dev/null @@ -1,18 +0,0 @@ -import Chooser from '../views/components/drive-file-chooser.vue'; - -export default function(opts) { - return new Promise((res, rej) => { - const o = opts || {}; - const w = new Chooser({ - propsData: { - title: o.title, - multiple: o.multiple, - initFolder: o.currentFolder - } - }).$mount(); - w.$once('selected', file => { - res(file); - }); - document.body.appendChild(w.$el); - }); -} diff --git a/src/client/app/mobile/api/choose-drive-folder.ts b/src/client/app/mobile/api/choose-drive-folder.ts deleted file mode 100644 index d1f97d1487..0000000000 --- a/src/client/app/mobile/api/choose-drive-folder.ts +++ /dev/null @@ -1,17 +0,0 @@ -import Chooser from '../views/components/drive-folder-chooser.vue'; - -export default function(opts) { - return new Promise((res, rej) => { - const o = opts || {}; - const w = new Chooser({ - propsData: { - title: o.title, - initFolder: o.currentFolder - } - }).$mount(); - w.$once('selected', folder => { - res(folder); - }); - document.body.appendChild(w.$el); - }); -} diff --git a/src/client/app/mobile/api/dialog.ts b/src/client/app/mobile/api/dialog.ts deleted file mode 100644 index 23f35b7aa9..0000000000 --- a/src/client/app/mobile/api/dialog.ts +++ /dev/null @@ -1,18 +0,0 @@ -import OS from '../../mios'; -import Dialog from '../views/components/dialog.vue'; - -export default (os: OS) => opts => { - return new Promise<string>((res, rej) => { - 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); - }); -}; diff --git a/src/client/app/mobile/api/input.ts b/src/client/app/mobile/api/input.ts deleted file mode 100644 index 38d0fb61eb..0000000000 --- a/src/client/app/mobile/api/input.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default function(opts) { - return new Promise<string>((res, rej) => { - const x = window.prompt(opts.title); - if (x) { - res(x); - } - }); -} diff --git a/src/client/app/mobile/api/notify.ts b/src/client/app/mobile/api/notify.ts deleted file mode 100644 index 82780d196f..0000000000 --- a/src/client/app/mobile/api/notify.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default function(message) { - alert(message); -} diff --git a/src/client/app/mobile/api/post.ts b/src/client/app/mobile/api/post.ts deleted file mode 100644 index a64ed1c43e..0000000000 --- a/src/client/app/mobile/api/post.ts +++ /dev/null @@ -1,24 +0,0 @@ -import PostForm from '../views/components/post-form-dialog.vue'; - -export default (os) => (opts) => { - const o = opts || {}; - - document.documentElement.style.overflow = 'hidden'; - - function recover() { - document.documentElement.style.overflow = 'auto'; - } - - const vm = new PostForm({ - parent: os.app, - propsData: { - reply: o.reply, - renote: o.renote - } - }).$mount(); - vm.$once('cancel', recover); - vm.$once('posted', recover); - if (o.cb) vm.$once('closed', o.cb); - document.body.appendChild(vm.$el); - (vm as any).focus(); -}; |