-
+
{{ $t('post_status.new_status') }}
@@ -19,7 +15,7 @@
@posted="closeModal"
/>
-
+
@@ -29,10 +25,6 @@
.post-form-modal-view {
align-items: flex-start;
-
- body:not(.scroll-locked) & {
- display: none;
- }
}
.post-form-modal-panel {
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 @@
-
-
+
{{ $t('user_reporting.title', [user.screen_name]) }}
@@ -70,7 +65,7 @@
-
+
@@ -78,12 +73,6 @@
diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue
index d47951c8..8edfbd45 100644
--- a/src/components/modal/modal.vue
+++ b/src/components/modal/modal.vue
@@ -19,7 +19,6 @@ export default {
diff --git a/src/components/post_status_modal/post_status_modal.vue b/src/components/post_status_modal/post_status_modal.vue
index 06ef0a35..d1caf38f 100644
--- a/src/components/post_status_modal/post_status_modal.vue
+++ b/src/components/post_status_modal/post_status_modal.vue
@@ -21,8 +21,6 @@
From b3699a7c7cbeba3b6b777e3c414b44c21464a863 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Fri, 18 Oct 2019 12:39:54 -0400
Subject: [PATCH 16/22] fix eslint errors
---
src/components/modal/modal.js | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/components/modal/modal.js b/src/components/modal/modal.js
index b9517445..02d7017a 100644
--- a/src/components/modal/modal.js
+++ b/src/components/modal/modal.js
@@ -1,5 +1,3 @@
-import Vue from 'vue'
-
const Modal = {
props: {
viewClass: {
@@ -17,4 +15,4 @@ const Modal = {
}
}
-export default Modal
\ No newline at end of file
+export default Modal
From c217483640c13f4948af54466dddb0ebc71f374e Mon Sep 17 00:00:00 2001
From: taehoon
Date: Mon, 21 Oct 2019 15:36:03 -0400
Subject: [PATCH 17/22] migrate viewClass prop to class attribute
---
src/components/media_modal/media_modal.vue | 2 +-
src/components/modal/modal.js | 3 ---
src/components/modal/modal.vue | 2 +-
src/components/post_status_modal/post_status_modal.vue | 2 +-
4 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue
index e178fef1..50f442e2 100644
--- a/src/components/media_modal/media_modal.vue
+++ b/src/components/media_modal/media_modal.vue
@@ -1,7 +1,7 @@
diff --git a/src/components/post_status_modal/post_status_modal.vue b/src/components/post_status_modal/post_status_modal.vue
index c930d632..ef22b7ac 100644
--- a/src/components/post_status_modal/post_status_modal.vue
+++ b/src/components/post_status_modal/post_status_modal.vue
@@ -2,7 +2,7 @@
From 2cadeeb724dfdaa47d933aa524a5c557cbabd3c1 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Mon, 21 Oct 2019 15:37:14 -0400
Subject: [PATCH 18/22] move modal animation keyframes definition
---
src/App.scss | 9 ---------
src/components/modal/modal.vue | 9 +++++++++
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/App.scss b/src/App.scss
index 2117a577..f20eb44c 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -705,15 +705,6 @@ nav {
}
}
-@keyframes modal-background-fadein {
- from {
- background-color: rgba(0, 0, 0, 0);
- }
- to {
- background-color: rgba(0, 0, 0, 0.5);
- }
-}
-
.button-icon {
font-size: 1.2em;
}
diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue
index 34a50159..500b3d0a 100644
--- a/src/components/modal/modal.vue
+++ b/src/components/modal/modal.vue
@@ -31,4 +31,13 @@
opacity: 0;
}
}
+
+@keyframes modal-background-fadein {
+ from {
+ background-color: rgba(0, 0, 0, 0);
+ }
+ to {
+ background-color: rgba(0, 0, 0, 0.5);
+ }
+}
From c23a87d8ff7dfed662b5288d6fb77da1a7b3ebbc Mon Sep 17 00:00:00 2001
From: taehoon
Date: Mon, 21 Oct 2019 15:56:16 -0400
Subject: [PATCH 19/22] update condition
---
src/directives/body_scroll_lock.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/directives/body_scroll_lock.js b/src/directives/body_scroll_lock.js
index a375e852..d7f114b5 100644
--- a/src/directives/body_scroll_lock.js
+++ b/src/directives/body_scroll_lock.js
@@ -36,7 +36,7 @@ const enableBodyScroll = (el) => {
lockerEls = lockerEls.filter(e => e !== el)
}
setTimeout(() => {
- if (!lockerEls.length) {
+ if (lockerEls.length === 0) {
if (previousNavPaddingRight !== undefined) {
document.getElementById('nav').style.paddingRight = previousNavPaddingRight
// Restore previousNavPaddingRight to undefined so disableBodyScroll knows it can be set again.
From 6084a5b6fe43bd14cf5d87a8f1623b338aad936e Mon Sep 17 00:00:00 2001
From: taehoon
Date: Mon, 21 Oct 2019 20:52:31 -0400
Subject: [PATCH 20/22] update event name
---
src/components/media_modal/media_modal.vue | 2 +-
src/components/modal/modal.js | 5 -----
src/components/modal/modal.vue | 2 +-
src/components/post_status_modal/post_status_modal.vue | 2 +-
src/components/user_reporting_modal/user_reporting_modal.vue | 2 +-
5 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue
index 50f442e2..2597f4e3 100644
--- a/src/components/media_modal/media_modal.vue
+++ b/src/components/media_modal/media_modal.vue
@@ -2,7 +2,7 @@
diff --git a/src/components/post_status_modal/post_status_modal.vue b/src/components/post_status_modal/post_status_modal.vue
index ef22b7ac..dbcd321e 100644
--- a/src/components/post_status_modal/post_status_modal.vue
+++ b/src/components/post_status_modal/post_status_modal.vue
@@ -3,7 +3,7 @@
v-if="isLoggedIn && !resettingForm"
:is-open="modalActivated"
class="post-form-modal-view"
- @close="closeModal"
+ @backdropClicked="closeModal"
>
diff --git a/src/components/user_reporting_modal/user_reporting_modal.vue b/src/components/user_reporting_modal/user_reporting_modal.vue
index 0dce4c55..6ee53461 100644
--- a/src/components/user_reporting_modal/user_reporting_modal.vue
+++ b/src/components/user_reporting_modal/user_reporting_modal.vue
@@ -1,7 +1,7 @@
From d3a6c030f8a156cbb5a6b758c7a06c64fefe3d80 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Mon, 21 Oct 2019 20:53:34 -0400
Subject: [PATCH 21/22] clean up
---
src/components/modal/modal.js | 10 ----------
src/components/modal/modal.vue | 11 ++++++++++-
2 files changed, 10 insertions(+), 11 deletions(-)
delete mode 100644 src/components/modal/modal.js
diff --git a/src/components/modal/modal.js b/src/components/modal/modal.js
deleted file mode 100644
index 8daa27a3..00000000
--- a/src/components/modal/modal.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const Modal = {
- props: {
- isOpen: {
- type: Boolean,
- default: true
- }
- }
-}
-
-export default Modal
diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue
index 2e26d89b..cee24241 100644
--- a/src/components/modal/modal.vue
+++ b/src/components/modal/modal.vue
@@ -9,7 +9,16 @@
-
+