aboutsummaryrefslogtreecommitdiff
path: root/src/components/post_status_modal/post_status_modal.js
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-09-19 13:27:37 -0400
committertaehoon <th.dev91@gmail.com>2019-09-20 11:29:24 -0400
commitf4bbf1d4e205e3c3438226d0cf71e77d4bc0be11 (patch)
treedeed786195f463ffcf40e9d3d8d71faba9812f3d /src/components/post_status_modal/post_status_modal.js
parent90981dcce6bbed1ba7700a7f1f4d74838e217b55 (diff)
add new module and modal to post new status
Diffstat (limited to 'src/components/post_status_modal/post_status_modal.js')
-rw-r--r--src/components/post_status_modal/post_status_modal.js25
1 files changed, 25 insertions, 0 deletions
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