Basic mention support.

I still have to think about how to integrate them in the state system...
This commit is contained in:
Roger Braun 2016-11-26 21:09:41 +01:00
parent 8cd1c690ca
commit 6c2941dba0
8 changed files with 64 additions and 4 deletions

View file

@ -0,0 +1,28 @@
import Status from '../status/status.vue'
// Temporary
import { prepareStatus, updateTimestampsInStatuses } from '../../modules/statuses.js'
import { map } from 'lodash'
const Mentions = {
data () {
return {
mentions: []
}
},
computed: {
username () {
return this.$route.params.username
}
},
components: {
Status
},
created () {
this.$store.state.api.backendInteractor.fetchMentions({username: this.username})
.then((mentions) => {
this.mentions = updateTimestampsInStatuses(map(mentions, prepareStatus))
})
}
}
export default Mentions

View file

@ -0,0 +1,12 @@
<template>
<div class="timeline panel panel-default">
<div class="panel-heading">Mentions</div>
<div class="panel-body">
<div class="timeline">
<status v-for="status in mentions" :key="status.id" v-bind:statusoid="status"></status>
</div>
</div>
</div>
</template>
<script src="./mentions.js"></script>