From a5bfab4792c6c82fe5d313d2e5ebf70e94f87906 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 14 Feb 2018 19:30:35 +0900 Subject: [PATCH] wip --- src/web/app/desktop/views/components/post-form-window.vue | 5 ++++- src/web/app/desktop/views/components/ui.vue | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/web/app/desktop/views/components/post-form-window.vue b/src/web/app/desktop/views/components/post-form-window.vue index dc16d7c9d..77b47e20a 100644 --- a/src/web/app/desktop/views/components/post-form-window.vue +++ b/src/web/app/desktop/views/components/post-form-window.vue @@ -10,7 +10,7 @@ @@ -39,6 +39,9 @@ export default Vue.extend({ }, onChangeMedia(media) { this.media = media; + }, + onPosted() { + (this.$refs.window as any).close(); } } }); diff --git a/src/web/app/desktop/views/components/ui.vue b/src/web/app/desktop/views/components/ui.vue index 39ec057f8..76851a0f1 100644 --- a/src/web/app/desktop/views/components/ui.vue +++ b/src/web/app/desktop/views/components/ui.vue @@ -21,7 +21,9 @@ export default Vue.extend({ }, methods: { openPostForm() { - document.body.appendChild(new MkPostFormWindow().$mount().$el); + document.body.appendChild(new MkPostFormWindow({ + parent: this + }).$mount().$el); }, onKeydown(e) { if (e.target.tagName == 'INPUT' || e.target.tagName == 'TEXTAREA') return;