From bf654c6f42179612c19d70bf1970f930efc25d54 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Tue, 29 Oct 2019 09:51:19 +0900 Subject: [PATCH] Componentize modal (#5386) --- .../app/common/views/components/dialog.vue | 141 +++++++----------- .../common/views/components/image-viewer.vue | 62 ++------ .../app/common/views/components/index.ts | 2 + .../app/common/views/components/ui/modal.vue | 80 ++++++++++ .../views/components/media-video-dialog.vue | 55 ++----- .../views/components/post-form-dialog.vue | 71 ++++----- 6 files changed, 188 insertions(+), 223 deletions(-) create mode 100644 src/client/app/common/views/components/ui/modal.vue diff --git a/src/client/app/common/views/components/dialog.vue b/src/client/app/common/views/components/dialog.vue index d5906eb4c4..2744903007 100644 --- a/src/client/app/common/views/components/dialog.vue +++ b/src/client/app/common/views/components/dialog.vue @@ -1,6 +1,12 @@ diff --git a/src/client/app/common/views/components/image-viewer.vue b/src/client/app/common/views/components/image-viewer.vue index 7787942ca8..63b5e28d00 100644 --- a/src/client/app/common/views/components/image-viewer.vue +++ b/src/client/app/common/views/components/image-viewer.vue @@ -1,24 +1,14 @@ diff --git a/src/client/app/common/views/components/index.ts b/src/client/app/common/views/components/index.ts index 4253118ba8..88cd4931d4 100644 --- a/src/client/app/common/views/components/index.ts +++ b/src/client/app/common/views/components/index.ts @@ -47,6 +47,7 @@ import uiInfo from './ui/info.vue'; import uiMargin from './ui/margin.vue'; import uiHr from './ui/hr.vue'; import uiPagination from './ui/pagination.vue'; +import uiModal from './ui/modal.vue'; import formButton from './ui/form/button.vue'; import formRadio from './ui/form/radio.vue'; @@ -97,5 +98,6 @@ Vue.component('ui-info', uiInfo); Vue.component('ui-margin', uiMargin); Vue.component('ui-hr', uiHr); Vue.component('ui-pagination', uiPagination); +Vue.component('ui-modal', uiModal); Vue.component('form-button', formButton); Vue.component('form-radio', formRadio); diff --git a/src/client/app/common/views/components/ui/modal.vue b/src/client/app/common/views/components/ui/modal.vue new file mode 100644 index 0000000000..413dc39fa5 --- /dev/null +++ b/src/client/app/common/views/components/ui/modal.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/client/app/desktop/views/components/media-video-dialog.vue b/src/client/app/desktop/views/components/media-video-dialog.vue index 803350506a..9d2d0527ef 100644 --- a/src/client/app/desktop/views/components/media-video-dialog.vue +++ b/src/client/app/desktop/views/components/media-video-dialog.vue @@ -1,23 +1,15 @@ diff --git a/src/client/app/mobile/views/components/post-form-dialog.vue b/src/client/app/mobile/views/components/post-form-dialog.vue index 716ad8fd07..4ae79dbd7b 100644 --- a/src/client/app/mobile/views/components/post-form-dialog.vue +++ b/src/client/app/mobile/views/components/post-form-dialog.vue @@ -1,6 +1,9 @@