diff options
| author | taehoon <th.dev91@gmail.com> | 2019-10-18 07:05:01 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-10-18 07:05:01 -0400 |
| commit | 348d6664eb07d4854ad4266873ad423091658187 (patch) | |
| tree | 8f6940c6c0706d3c678777f979c80d4805cf5a6d /src/components/user_reporting_modal | |
| parent | 07ec18fe11a347f8cbad6b3e667dfc9d9f09c867 (diff) | |
refactor all kind of modals using the modal component
Diffstat (limited to 'src/components/user_reporting_modal')
| -rw-r--r-- | src/components/user_reporting_modal/user_reporting_modal.js | 5 | ||||
| -rw-r--r-- | src/components/user_reporting_modal/user_reporting_modal.vue | 19 |
2 files changed, 8 insertions, 16 deletions
diff --git a/src/components/user_reporting_modal/user_reporting_modal.js b/src/components/user_reporting_modal/user_reporting_modal.js index 7c6ea409..3fb96384 100644 --- a/src/components/user_reporting_modal/user_reporting_modal.js +++ b/src/components/user_reporting_modal/user_reporting_modal.js @@ -2,12 +2,14 @@ import Status from '../status/status.vue' import List from '../list/list.vue' import Checkbox from '../checkbox/checkbox.vue' +import Modal from '../modal/modal.vue' const UserReportingModal = { components: { Status, List, - Checkbox + Checkbox, + Modal }, data () { return { @@ -51,6 +53,7 @@ const UserReportingModal = { this.error = false }, closeModal () { + console.log('closeModal clicked') this.$store.dispatch('closeUserReportingModal') }, reportUser () { diff --git a/src/components/user_reporting_modal/user_reporting_modal.vue b/src/components/user_reporting_modal/user_reporting_modal.vue index ecbc1369..0dce4c55 100644 --- a/src/components/user_reporting_modal/user_reporting_modal.vue +++ b/src/components/user_reporting_modal/user_reporting_modal.vue @@ -1,14 +1,9 @@ <template> - <div + <Modal v-if="isOpen" - v-body-scroll-lock="isOpen" - class="modal-view user-reporting-modal-view" - @click="closeModal" + @close="closeModal" > - <div - class="user-reporting-panel panel" - @click.stop="" - > + <div class="user-reporting-panel panel"> <div class="panel-heading"> <div class="title"> {{ $t('user_reporting.title', [user.screen_name]) }} @@ -70,7 +65,7 @@ </div> </div> </div> - </div> + </Modal> </template> <script src="./user_reporting_modal.js"></script> @@ -78,12 +73,6 @@ <style lang="scss"> @import '../../_variables.scss'; -.user-reporting-modal-view { - body:not(.scroll-locked) & { - display: none; - } -} - .user-reporting-panel { width: 90vw; max-width: 700px; |
