Switch from moment.js to vue-timeago.
Much smaller filesize for vendor.js, although we'll have to see if all the intervals are ok.
This commit is contained in:
parent
2f7e5c8770
commit
cc00eb898f
8 changed files with 17 additions and 29 deletions
|
@ -36,7 +36,6 @@ const conversation = {
|
|||
const conversationId = this.status.statusnet_conversation_id
|
||||
this.$store.state.api.backendInteractor.fetchConversation({id: conversationId})
|
||||
.then((statuses) => this.$store.dispatch('addNewStatuses', { statuses }))
|
||||
.then(() => this.$store.commit('updateTimestamps'))
|
||||
} else {
|
||||
const id = this.$route.params.id
|
||||
this.$store.state.api.backendInteractor.fetchStatus({id})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Status from '../status/status.vue'
|
||||
// Temporary
|
||||
import { prepareStatus, updateTimestampsInStatuses } from '../../modules/statuses.js'
|
||||
import { prepareStatus } from '../../modules/statuses.js'
|
||||
import { map } from 'lodash'
|
||||
|
||||
const Mentions = {
|
||||
|
@ -20,7 +20,7 @@ const Mentions = {
|
|||
created () {
|
||||
this.$store.state.api.backendInteractor.fetchMentions({username: this.username})
|
||||
.then((mentions) => {
|
||||
this.mentions = updateTimestampsInStatuses(map(mentions, prepareStatus))
|
||||
this.mentions = map(mentions, prepareStatus)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
-
|
||||
<small>
|
||||
<router-link :to="{ name: 'conversation', params: { id: status.id } }">
|
||||
{{status.created_at_parsed}}
|
||||
<timeago :since="status.created_at" :auto-update="60"></timeago>
|
||||
</router-link>
|
||||
</small>
|
||||
<small v-if="!status.is_local" class="source_url">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue