mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-01-11 08:24:58 +01:00
refs #6 Change datetime format in toot
This commit is contained in:
parent
ac8bdc04fe
commit
0facfff1be
5
package-lock.json
generated
5
package-lock.json
generated
@ -9803,6 +9803,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.21.0",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz",
|
||||
"integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ=="
|
||||
},
|
||||
"move-concurrently": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
|
||||
|
@ -62,6 +62,7 @@
|
||||
"google-fonts-webpack-plugin": "^0.4.4",
|
||||
"is-empty": "^1.2.0",
|
||||
"mastodon-api": "^1.3.0",
|
||||
"moment": "^2.21.0",
|
||||
"nedb": "^1.8.0",
|
||||
"vue": "^2.3.3",
|
||||
"vue-awesome": "^2.3.5",
|
||||
|
@ -9,7 +9,7 @@
|
||||
{{ message.account.display_name }}
|
||||
</div>
|
||||
<div class="timestamp">
|
||||
{{ message.created_at }}
|
||||
{{ parseDatetime(message.created_at) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content" v-html="message.content"></div>
|
||||
@ -25,9 +25,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'toot',
|
||||
props: ['message']
|
||||
props: ['message'],
|
||||
methods: {
|
||||
parseDatetime (datetime) {
|
||||
return moment(datetime).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user