From 9842734e1290c2c3a8c62abfa5dc7d3278df691c Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 27 Sep 2018 13:58:27 +0530 Subject: [PATCH] Add UI enhancements and some bug fixes --- frappe/public/build.json | 3 +- frappe/public/js/frappe/social/Home.vue | 2 +- .../js/frappe/social/components/Post.vue | 29 +++++++++++-------- .../frappe/social/components/PostAction.vue | 22 ++++++++------ frappe/public/js/frappe/social/pages/Wall.vue | 14 ++++----- frappe/public/js/frappe/social/social_home.js | 5 ++-- frappe/public/less/social.less | 5 ++++ frappe/public/less/website.less | 1 + 8 files changed, 48 insertions(+), 33 deletions(-) create mode 100644 frappe/public/less/social.less diff --git a/frappe/public/build.json b/frappe/public/build.json index 46e38354be..d23ab68fda 100755 --- a/frappe/public/build.json +++ b/frappe/public/build.json @@ -115,7 +115,8 @@ "public/less/kanban.less", "public/less/controls.less", "public/less/chat.less", - "public/less/filters.less" + "public/less/filters.less", + "public/less/social.less" ], "css/frappe-rtl.css": [ "public/css/bootstrap-rtl.css", diff --git a/frappe/public/js/frappe/social/Home.vue b/frappe/public/js/frappe/social/Home.vue index cfc2f6f48f..afb250cfd3 100644 --- a/frappe/public/js/frappe/social/Home.vue +++ b/frappe/public/js/frappe/social/Home.vue @@ -1,5 +1,5 @@ diff --git a/frappe/public/js/frappe/social/components/Post.vue b/frappe/public/js/frappe/social/components/Post.vue index abcb4a1de3..ec31781795 100644 --- a/frappe/public/js/frappe/social/components/Post.vue +++ b/frappe/public/js/frappe/social/components/Post.vue @@ -6,7 +6,11 @@
{{ user_name }}
- + + @@ -28,10 +32,7 @@ const Post = { post_time: comment_when(this.post.creation), user_name: frappe.user_info(this.post.owner).fullname, reply_count: 0, - replies: [{ - content: 'hello', - name: 'asdfasdf' - }], + replies: [], show_replies: false } }, @@ -47,16 +48,17 @@ const Post = { }) frappe.realtime.on('new_post_reply', (post) => { if (post.reply_to === this.post.name) { - this.reply_count += 1; + this.replies.push(post); } }) }, methods: { - create_new_reply: () => { + create_new_reply() { + frappe.social.post_reply_dialog.set_value('reply_to', this.post.name); frappe.social.post_reply_dialog.show() }, - toggle_reply: () => { - this.show_repies = !this.show_replies + toggle_reply() { + this.show_replies = !this.show_replies } } } @@ -67,15 +69,17 @@ export default Post; \ No newline at end of file diff --git a/frappe/public/js/frappe/social/components/PostAction.vue b/frappe/public/js/frappe/social/components/PostAction.vue index 0022212dea..ed93ad6afe 100644 --- a/frappe/public/js/frappe/social/components/PostAction.vue +++ b/frappe/public/js/frappe/social/components/PostAction.vue @@ -1,12 +1,12 @@ @@ -25,10 +25,14 @@ export default { } \ No newline at end of file diff --git a/frappe/public/js/frappe/social/pages/Wall.vue b/frappe/public/js/frappe/social/pages/Wall.vue index a1a51087cc..f698788562 100644 --- a/frappe/public/js/frappe/social/pages/Wall.vue +++ b/frappe/public/js/frappe/social/pages/Wall.vue @@ -1,5 +1,5 @@