kopia lustrzana https://github.com/nextcloud/social
Merge remote-tracking branch 'origin/fixing-streams' into fixing-streams
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/61/head
commit
e6f82ce717
|
@ -2,11 +2,12 @@
|
|||
<div class="timeline-entry">
|
||||
<div class="entry-content">
|
||||
<div class="post-avatar">
|
||||
<avatar :size="32" :user="item.actor_info.preferredUsername" />
|
||||
<avatar v-if="item.actor_info" :size="32" :user="item.actor_info.preferredUsername" />
|
||||
<avatar :size="32" user="?" />
|
||||
</div>
|
||||
<div class="post-content">
|
||||
<div class="post-author-wrapper">
|
||||
<router-link v-if="item.actor_info.local" :to="{ name: 'profile', params: { account: item.actor_info.preferredUsername }}">
|
||||
<router-link v-if="item.actor_info && item.actor_info.local" :to="{ name: 'profile', params: { account: item.actor_info.preferredUsername }}">
|
||||
<span class="post-author">{{ item.actor_info.preferredUsername }}</span>
|
||||
<span class="post-author-id">{{ item.actor_info.account }}</span>
|
||||
</router-link>
|
||||
|
@ -16,7 +17,6 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="post-message" v-html="formatedMessage" />
|
||||
<!--<pre style="height: 200px; overflow:scroll;">{{item}}</pre> //-->
|
||||
</div>
|
||||
<div class="post-timestamp">{{ item.published }}</div>
|
||||
</div>
|
||||
|
@ -44,7 +44,9 @@ export default {
|
|||
formatedMessage: function() {
|
||||
let message = this.item.content
|
||||
message = message.replace(/(?:\r\n|\r|\n)/g, '<br />')
|
||||
return message.linkify()
|
||||
message = message.linkify()
|
||||
message = this.$twemoji.parse(message)
|
||||
return message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -93,3 +95,8 @@ export default {
|
|||
opacity: .7;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.post-message a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -32,15 +32,13 @@ const mutations = {
|
|||
addToTimeline(state, data) {
|
||||
for (let item in data) {
|
||||
state.since = data[item].publishedTime
|
||||
data[item].actor_info = {}
|
||||
Vue.set(state.timeline, data[item].id, data[item])
|
||||
}
|
||||
},
|
||||
addPost(state, data) {
|
||||
// FIXME: push data we receive to the timeline array
|
||||
// state.timeline.push(data)
|
||||
},
|
||||
resetTimeline(state) {
|
||||
state.timeline = {}
|
||||
state.since = Math.floor(Date.now() / 1000) + 1
|
||||
},
|
||||
setTimelineType(state, type) {
|
||||
state.type = type
|
||||
|
|
Ładowanie…
Reference in New Issue