diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-18 06:27:27 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-18 06:27:27 +0900 |
| commit | a8ade110e69d1512dc9de411017d1cc799165175 (patch) | |
| tree | 056c7426a0bf1238af9df79a40408550b05e0d17 /src/client/app/mobile/api | |
| parent | Merge branch 'master' of https://github.com/syuilo/misskey (diff) | |
| download | misskey-a8ade110e69d1512dc9de411017d1cc799165175.tar.gz misskey-a8ade110e69d1512dc9de411017d1cc799165175.tar.bz2 misskey-a8ade110e69d1512dc9de411017d1cc799165175.zip | |
Improve renoting in mobile
Diffstat (limited to 'src/client/app/mobile/api')
| -rw-r--r-- | src/client/app/mobile/api/post.ts | 49 |
1 files changed, 15 insertions, 34 deletions
diff --git a/src/client/app/mobile/api/post.ts b/src/client/app/mobile/api/post.ts index 72919c6505..0634c52642 100644 --- a/src/client/app/mobile/api/post.ts +++ b/src/client/app/mobile/api/post.ts @@ -1,43 +1,24 @@ import PostForm from '../views/components/post-form.vue'; -//import RenoteForm from '../views/components/renote-form.vue'; -import getNoteSummary from '../../../../renderers/get-note-summary'; export default (os) => (opts) => { const o = opts || {}; - if (o.renote) { - /*const vm = new RenoteForm({ - propsData: { - renote: o.renote - } - }).$mount(); - vm.$once('cancel', recover); - vm.$once('note', recover); - document.body.appendChild(vm.$el);*/ + const app = document.getElementById('app'); + app.style.display = 'none'; - const text = window.prompt(`「${getNoteSummary(o.renote)}」をRenote`); - if (text == null) return; - os.api('notes/create', { - renoteId: o.renote.id, - text: text == '' ? undefined : text - }); - } else { - const app = document.getElementById('app'); - app.style.display = 'none'; + function recover() { + app.style.display = 'block'; + } - function recover() { - app.style.display = 'block'; + const vm = new PostForm({ + parent: os.app, + propsData: { + reply: o.reply, + renote: o.renote } - - const vm = new PostForm({ - parent: os.app, - propsData: { - reply: o.reply - } - }).$mount(); - vm.$once('cancel', recover); - vm.$once('note', recover); - document.body.appendChild(vm.$el); - (vm as any).focus(); - } + }).$mount(); + vm.$once('cancel', recover); + vm.$once('note', recover); + document.body.appendChild(vm.$el); + (vm as any).focus(); }; |