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.js | 25 +++++++++++++
.../post_status_modal/post_status_modal.vue | 42 ++++++++++++++++++++++
src/components/user_card/user_card.js | 2 +-
3 files changed, 68 insertions(+), 1 deletion(-)
create mode 100644 src/components/post_status_modal/post_status_modal.js
create mode 100644 src/components/post_status_modal/post_status_modal.vue
(limited to 'src/components')
diff --git a/src/components/post_status_modal/post_status_modal.js b/src/components/post_status_modal/post_status_modal.js
new file mode 100644
index 00000000..86a4e1d8
--- /dev/null
+++ b/src/components/post_status_modal/post_status_modal.js
@@ -0,0 +1,25 @@
+import PostStatusForm from '../post_status_form/post_status_form.vue'
+
+const PostStatusModal = {
+ components: {
+ PostStatusForm
+ },
+ computed: {
+ isLoggedIn () {
+ return !!this.$store.state.users.currentUser
+ },
+ isOpen () {
+ return this.isLoggedIn && this.$store.state.postStatus.modalActivated
+ },
+ params () {
+ return this.$store.state.postStatus.params
+ }
+ },
+ methods: {
+ closeModal () {
+ this.$store.dispatch('closePostStatusModal')
+ }
+ }
+}
+
+export default PostStatusModal
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') }}
+
+
+
+
+
+
+
+
+
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js
index d42be9fc..0c200ad1 100644
--- a/src/components/user_card/user_card.js
+++ b/src/components/user_card/user_card.js
@@ -170,7 +170,7 @@ export default {
this.$store.dispatch('setCurrent', attachment)
},
mentionUser () {
-
+ this.$store.dispatch('openPostStatusModal', { replyTo: true, repliedUser: this.user })
}
}
}
--
cgit v1.2.3-70-g09d2