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:
Roger Braun 2016-11-28 17:37:47 +01:00
parent 2f7e5c8770
commit cc00eb898f
8 changed files with 17 additions and 29 deletions

View file

@ -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})

View file

@ -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)
})
}
}

View file

@ -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">