From f915ae174d3454ade20b9f6c827ce84b04ad7089 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Wed, 7 Jun 2017 17:58:24 +0300 Subject: Add floating status-previews on reply-link mouseover in conversations and make them optional in the settings, fix a small visual inconsistency in muted statuses while editing the file already.. --- src/components/status/status.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/components/status/status.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index 9448b64b..99dc1b95 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -100,6 +100,15 @@ const Status = { }, toggleUserExpanded () { this.userExpanded = !this.userExpanded + }, + replyEnter (id, event) { + if (this.$store.state.config.hoverPreview) { + let rect = event.target.getBoundingClientRect() + this.$emit('preview', Number(id), rect.left + 20, rect.top + 20 + window.pageYOffset); + } + }, + replyLeave () { + this.$emit('preview', 0, 0, 0) } }, watch: { -- cgit v1.2.3-70-g09d2 From dcd7d52eb57e52474fa579b5338e2a4ca3e52784 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Wed, 7 Jun 2017 18:13:24 +0300 Subject: lint fix --- src/components/conversation/conversation.js | 2 +- src/components/status/status.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/status/status.js') diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index c91e4fde..b781e40c 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -14,7 +14,7 @@ const conversation = { preview: { x: 0, y: 0, - status + status: null } } }, diff --git a/src/components/status/status.js b/src/components/status/status.js index 99dc1b95..4f5093e1 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -104,7 +104,7 @@ const Status = { replyEnter (id, event) { if (this.$store.state.config.hoverPreview) { let rect = event.target.getBoundingClientRect() - this.$emit('preview', Number(id), rect.left + 20, rect.top + 20 + window.pageYOffset); + this.$emit('preview', Number(id), rect.left + 20, rect.top + 20 + window.pageYOffset) } }, replyLeave () { -- cgit v1.2.3-70-g09d2