From eb1fa6e43c43baf871aa7a2fd5311ac997523923 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 12 Feb 2018 00:17:51 +0900 Subject: [PATCH] wip --- src/web/app/common/views/directives/focus.ts | 5 ++ src/web/app/common/views/directives/index.ts | 5 ++ .../app/desktop/-tags/post-form-window.tag | 68 ------------------- .../views/components/post-form-window.vue | 63 +++++++++++++++++ .../views/components/timeline-post.vue | 16 ++--- .../app/desktop/views/components/window.vue | 4 +- src/web/app/init.ts | 9 ++- 7 files changed, 89 insertions(+), 81 deletions(-) create mode 100644 src/web/app/common/views/directives/focus.ts create mode 100644 src/web/app/common/views/directives/index.ts delete mode 100644 src/web/app/desktop/-tags/post-form-window.tag create mode 100644 src/web/app/desktop/views/components/post-form-window.vue diff --git a/src/web/app/common/views/directives/focus.ts b/src/web/app/common/views/directives/focus.ts new file mode 100644 index 000000000..b4fbcb6a8 --- /dev/null +++ b/src/web/app/common/views/directives/focus.ts @@ -0,0 +1,5 @@ +export default { + inserted(el) { + el.focus(); + } +}; diff --git a/src/web/app/common/views/directives/index.ts b/src/web/app/common/views/directives/index.ts new file mode 100644 index 000000000..358866f50 --- /dev/null +++ b/src/web/app/common/views/directives/index.ts @@ -0,0 +1,5 @@ +import Vue from 'vue'; + +import focus from './focus'; + +Vue.directive('focus', focus); diff --git a/src/web/app/desktop/-tags/post-form-window.tag b/src/web/app/desktop/-tags/post-form-window.tag deleted file mode 100644 index 562621bde..000000000 --- a/src/web/app/desktop/-tags/post-form-window.tag +++ /dev/null @@ -1,68 +0,0 @@ - - - - %i18n:desktop.tags.mk-post-form-window.post% - %i18n:desktop.tags.mk-post-form-window.reply% - { '%i18n:desktop.tags.mk-post-form-window.attaches%'.replace('{}', parent.files.length) } - { '%i18n:desktop.tags.mk-post-form-window.uploading-media%'.replace('{}', parent.uploadingFiles.length) } - - -
- -
-
- -
-
-
- - -
diff --git a/src/web/app/desktop/views/components/post-form-window.vue b/src/web/app/desktop/views/components/post-form-window.vue new file mode 100644 index 000000000..37670ccd9 --- /dev/null +++ b/src/web/app/desktop/views/components/post-form-window.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/web/app/desktop/views/components/timeline-post.vue b/src/web/app/desktop/views/components/timeline-post.vue index ed0596741..38f5f0891 100644 --- a/src/web/app/desktop/views/components/timeline-post.vue +++ b/src/web/app/desktop/views/components/timeline-post.vue @@ -73,8 +73,7 @@