From f4bbf1d4e205e3c3438226d0cf71e77d4bc0be11 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Thu, 19 Sep 2019 13:27:37 -0400
Subject: add new module and modal to post new status
---
.../post_status_modal/post_status_modal.vue | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 src/components/post_status_modal/post_status_modal.vue
(limited to 'src/components/post_status_modal/post_status_modal.vue')
diff --git a/src/components/post_status_modal/post_status_modal.vue b/src/components/post_status_modal/post_status_modal.vue
new file mode 100644
index 00000000..85a5401c
--- /dev/null
+++ b/src/components/post_status_modal/post_status_modal.vue
@@ -0,0 +1,42 @@
+
+
+
+
+ {{ $t('post_status.new_status') }}
+
+
+
+
+
+
+
+
+
--
cgit v1.2.3-70-g09d2
From c8a18f387c28d5f895c1e727b0d040da96dcebc1 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Thu, 19 Sep 2019 14:38:55 -0400
Subject: wire up props with PostStatusModal
---
src/components/post_status_form/post_status_form.js | 2 +-
src/components/post_status_modal/post_status_modal.js | 2 +-
src/components/post_status_modal/post_status_modal.vue | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
(limited to 'src/components/post_status_modal/post_status_modal.vue')
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index 40bbf6d4..dc4b419c 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -8,7 +8,7 @@ import fileTypeService from '../../services/file_type/file_type.service.js'
import { reject, map, uniqBy } from 'lodash'
import suggestor from '../emoji-input/suggestor.js'
-const buildMentionsString = ({ user, attentions }, currentUser) => {
+const buildMentionsString = ({ user, attentions = [] }, currentUser) => {
let allAttentions = [...attentions]
allAttentions.unshift(user)
diff --git a/src/components/post_status_modal/post_status_modal.js b/src/components/post_status_modal/post_status_modal.js
index 15783642..1033ba11 100644
--- a/src/components/post_status_modal/post_status_modal.js
+++ b/src/components/post_status_modal/post_status_modal.js
@@ -12,7 +12,7 @@ const PostStatusModal = {
return this.isLoggedIn && this.$store.state.postStatus.modalActivated
},
params () {
- return this.$store.state.postStatus.params
+ return this.$store.state.postStatus.params || {}
}
},
watch: {
diff --git a/src/components/post_status_modal/post_status_modal.vue b/src/components/post_status_modal/post_status_modal.vue
index 85a5401c..3f8eec69 100644
--- a/src/components/post_status_modal/post_status_modal.vue
+++ b/src/components/post_status_modal/post_status_modal.vue
@@ -13,6 +13,7 @@
--
cgit v1.2.3-70-g09d2