diff options
| author | Roger Braun <roger@rogerbraun.net> | 2016-11-28 17:37:47 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2016-11-28 17:37:47 +0100 |
| commit | cc00eb898fe05a023979fe30cbc4c2490994bbfd (patch) | |
| tree | 05b83e7cca6e32ee3063cf2e76aa23434d369f61 /src/components | |
| parent | 2f7e5c8770719595f3a7c2a2fd5f7ba5f15914d4 (diff) | |
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.
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/conversation/conversation.js | 1 | ||||
| -rw-r--r-- | src/components/mentions/mentions.js | 4 | ||||
| -rw-r--r-- | src/components/status/status.vue | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index 3b9cdbf7..ab804ce6 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -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}) diff --git a/src/components/mentions/mentions.js b/src/components/mentions/mentions.js index 3563101b..e84d1912 100644 --- a/src/components/mentions/mentions.js +++ b/src/components/mentions/mentions.js @@ -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) }) } } diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 8907937d..bcaa5df0 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -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"> |
