From 20de9a5e35b6b570ccd8b488b041bba6411457a1 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 27 Feb 2019 05:31:16 +0900 Subject: [PATCH] Resolve #4374 --- src/client/app/common/views/widgets/index.ts | 2 ++ .../app/{desktop => common}/views/widgets/post-form.vue | 7 +++++-- src/client/app/desktop/views/widgets/index.ts | 2 -- 3 files changed, 7 insertions(+), 4 deletions(-) rename src/client/app/{desktop => common}/views/widgets/post-form.vue (96%) diff --git a/src/client/app/common/views/widgets/index.ts b/src/client/app/common/views/widgets/index.ts index 6b198ccd5..05aa08375 100644 --- a/src/client/app/common/views/widgets/index.ts +++ b/src/client/app/common/views/widgets/index.ts @@ -14,6 +14,7 @@ import wTips from './tips.vue'; import wNav from './nav.vue'; import wHashtags from './hashtags.vue'; import wInstance from './instance.vue'; +import wPostForm from './post-form.vue'; Vue.component('mkw-analog-clock', wAnalogClock); Vue.component('mkw-nav', wNav); @@ -29,3 +30,4 @@ Vue.component('mkw-rss', wRss); Vue.component('mkw-version', wVersion); Vue.component('mkw-hashtags', wHashtags); Vue.component('mkw-instance', wInstance); +Vue.component('mkw-post-form', wPostForm); diff --git a/src/client/app/desktop/views/widgets/post-form.vue b/src/client/app/common/views/widgets/post-form.vue similarity index 96% rename from src/client/app/desktop/views/widgets/post-form.vue rename to src/client/app/common/views/widgets/post-form.vue index 3fcf811eb..5a456d810 100644 --- a/src/client/app/desktop/views/widgets/post-form.vue +++ b/src/client/app/common/views/widgets/post-form.vue @@ -17,7 +17,7 @@ ref="text" v-autocomplete="{ model: 'text' }" > - @@ -161,7 +161,7 @@ export default define({ }, async emoji() { - const Picker = await import('../components/emoji-picker-dialog.vue').then(m => m.default); + const Picker = await import('../../../desktop/views/components/emoji-picker-dialog.vue').then(m => m.default); const button = this.$refs.emoji; const rect = button.getBoundingClientRect(); const vm = this.$root.new(Picker, { @@ -186,6 +186,9 @@ export default define({ alert('Something happened'); }).then(() => { this.posting = false; + this.$nextTick(() => { + this.$refs.text.focus(); + }); }); }, diff --git a/src/client/app/desktop/views/widgets/index.ts b/src/client/app/desktop/views/widgets/index.ts index 38a661671..c00cd2ff4 100644 --- a/src/client/app/desktop/views/widgets/index.ts +++ b/src/client/app/desktop/views/widgets/index.ts @@ -6,7 +6,6 @@ import wActivity from './activity.vue'; import wTrends from './trends.vue'; import wUsers from './users.vue'; import wPolls from './polls.vue'; -import wPostForm from './post-form.vue'; import wMessaging from './messaging.vue'; import wProfile from './profile.vue'; import wCustomize from './customize.vue'; @@ -17,7 +16,6 @@ Vue.component('mkw-activity', wActivity); Vue.component('mkw-trends', wTrends); Vue.component('mkw-users', wUsers); Vue.component('mkw-polls', wPolls); -Vue.component('mkw-post-form', wPostForm); Vue.component('mkw-messaging', wMessaging); Vue.component('mkw-profile', wProfile); Vue.component('mkw-customize', wCustomize);