aboutsummaryrefslogtreecommitdiff
path: root/src/components/conversation
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/conversation')
-rw-r--r--src/components/conversation/conversation.js10
-rw-r--r--src/components/conversation/conversation.vue25
2 files changed, 22 insertions, 13 deletions
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js
index 69058bf6..9ceab32d 100644
--- a/src/components/conversation/conversation.js
+++ b/src/components/conversation/conversation.js
@@ -94,8 +94,8 @@ const conversation = {
},
replies () {
let i = 1
- return reduce(this.conversation, (result, {id, in_reply_to_status_id}) => {
- /* eslint-disable camelcase */
+ /* eslint-disable camelcase */
+ return reduce(this.conversation, (result, { id, in_reply_to_status_id }) => {
const irid = in_reply_to_status_id
/* eslint-enable camelcase */
if (irid) {
@@ -127,8 +127,8 @@ const conversation = {
methods: {
fetchConversation () {
if (this.status) {
- this.$store.state.api.backendInteractor.fetchConversation({id: this.status.id})
- .then(({ancestors, descendants}) => {
+ this.$store.state.api.backendInteractor.fetchConversation({ id: this.status.id })
+ .then(({ ancestors, descendants }) => {
this.$store.dispatch('addNewStatuses', { statuses: ancestors })
this.$store.dispatch('addNewStatuses', { statuses: descendants })
set(this, 'converationStatusIds', [].concat(
@@ -139,7 +139,7 @@ const conversation = {
.then(() => this.setHighlight(this.statusId))
} else {
const id = this.$route.params.id
- this.$store.state.api.backendInteractor.fetchStatus({id})
+ this.$store.state.api.backendInteractor.fetchStatus({ id })
.then((status) => this.$store.dispatch('addNewStatuses', { statuses: [status] }))
.then(() => this.fetchConversation())
}
diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue
index c39a3ed9..1973edae 100644
--- a/src/components/conversation/conversation.vue
+++ b/src/components/conversation/conversation.vue
@@ -1,24 +1,33 @@
<template>
- <div class="timeline panel-default" :class="[isExpanded ? 'panel' : 'panel-disabled']">
- <div v-if="isExpanded" class="panel-heading conversation-heading">
+ <div
+ class="timeline panel-default"
+ :class="[isExpanded ? 'panel' : 'panel-disabled']"
+ >
+ <div
+ v-if="isExpanded"
+ class="panel-heading conversation-heading"
+ >
<span class="title"> {{ $t('timeline.conversation') }} </span>
<span v-if="collapsable">
- <a href="#" @click.prevent="toggleExpanded">{{ $t('timeline.collapse') }}</a>
+ <a
+ href="#"
+ @click.prevent="toggleExpanded"
+ >{{ $t('timeline.collapse') }}</a>
</span>
</div>
<status
v-for="status in conversation"
- @goto="setHighlight"
- @toggleExpanded="toggleExpanded"
:key="status.id"
- :inlineExpanded="collapsable"
+ :inline-expanded="collapsable"
:statusoid="status"
- :expandable='!expanded'
+ :expandable="!expanded"
:focused="focused(status.id)"
- :inConversation="isExpanded"
+ :in-conversation="isExpanded"
:highlight="getHighlight()"
:replies="getReplies(status.id)"
class="status-fadein panel-body"
+ @goto="setHighlight"
+ @toggleExpanded="toggleExpanded"
/>
</div>
</template>