From 25af7982c9bb5d7107e93af624bbabb10cea300d 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 }); };