aboutsummaryrefslogtreecommitdiff
path: root/src/components/status
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/status')
-rw-r--r--src/components/status/status.js14
-rw-r--r--src/components/status/status.vue11
2 files changed, 18 insertions, 7 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 183838a8..7b8f304b 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -13,7 +13,8 @@ const Status = {
'inConversation',
'focused',
'highlight',
- 'compact'
+ 'compact',
+ 'replies'
],
data: () => ({
replying: false,
@@ -87,12 +88,14 @@ const Status = {
toggleReplying () {
this.replying = !this.replying
},
- gotoOriginal () {
+ gotoOriginal (id) {
// only handled by conversation, not status_or_conversation
- this.$emit('goto', this.status.in_reply_to_status_id)
+ //this.$emit('goto', this.status.in_reply_to_status_id)
+ this.$emit('goto', id)
},
toggleExpanded () {
this.$emit('toggleExpanded')
+ //console.log(this.replies)
},
toggleMute () {
this.unmuted = !this.unmuted
@@ -108,9 +111,8 @@ const Status = {
let rect = this.$el.getBoundingClientRect()
if (rect.top < 100) {
window.scrollBy(0, rect.top - 200)
- } else if (rect.bottom > window.innerHeight - 100) {
- // will be useful when scrolling down to replies or root posts is in
- window.scrollBy(0, rect.bottom + 200)
+ } else if (rect.bottom > window.innerHeight - 50) {
+ window.scrollBy(0, rect.bottom - window.innerHeight + 50)
}
}
}
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index cf84d177..5d2c0c30 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -56,7 +56,7 @@
</small>
<template v-if="isReply && !expandable">
<small>
- <a href="#" @click.prevent="gotoOriginal" ><i class="icon-reply"></i></a>
+ <a href="#" @click.prevent="gotoOriginal(status.in_reply_to_status_id)" ><i class="icon-reply"></i></a>
</small>
</template>
-
@@ -67,6 +67,12 @@
</small>
</h4>
</div>
+ <h4 class="replies" v-if="inConversation">
+ <small v-if="replies.length">Replies:</small>
+ <small v-for="reply in replies">
+ <a href="#" @click.prevent="gotoOriginal(reply.id)">{{reply.name}}&nbsp;</a>
+ </small>
+ </h4>
</div>
<div class="heading-icons">
<a href="#" @click.prevent="toggleMute" v-if="unmuted"><i class="fa icon-eye-off"></i></a>
@@ -159,6 +165,9 @@
display: flex;
flex-wrap: wrap;
}
+ .replies {
+ flex-basis: 80%;
+ }
}
.source_url {