From 89278881746a3c9827f705697410d78e5f2a31f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?syuilo=E2=AD=90=EF=B8=8F?= Date: Fri, 10 Mar 2017 02:09:18 +0900 Subject: [PATCH] fix --- src/web/app/mobile/tags/post-detail.tag | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/web/app/mobile/tags/post-detail.tag b/src/web/app/mobile/tags/post-detail.tag index 9622dc264..0fd63e832 100644 --- a/src/web/app/mobile/tags/post-detail.tag +++ b/src/web/app/mobile/tags/post-detail.tag @@ -408,14 +408,17 @@ }); this.reply = () => { - riot.mount(document.body.appendChild(document.createElement('mk-post-form-window')), { + this.openPostForm({ reply: this.p }); }; this.repost = () => { - riot.mount(document.body.appendChild(document.createElement('mk-repost-form-window')), { - post: this.p + const text = window.prompt(`「${this.summary}」をRepost`); + if (text == null) return; + this.api('posts/create', { + repost_id: this.p.id, + text: text == '' ? undefined : text }); };