From 205e72802572fb1f85aa52ce0cbbfab8576e7e4f 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;