[refactoring] s/comment/resource

This commit is contained in:
les
2019-12-04 01:18:05 +01:00
parent bb14fbed83
commit c43fe095a5
17 changed files with 214 additions and 165 deletions

View File

@@ -1,5 +1,6 @@
import Vue from 'vue'
import moment from 'moment-timezone'
import url from 'url'
export default ({ app, store }) => {
// set timezone to instance_timezone!!
@@ -10,7 +11,6 @@ export default ({ app, store }) => {
// replace links with anchors
// TODO: remove fb tracking id
Vue.filter('linkify', value => value.replace(/(https?:\/\/([^\s]+))/g, '<a href="$1">$2</a>'))
Vue.filter('url2host', url => url.match(/^https?:\/\/(.[^/:]+)/i)[1])
Vue.filter('datetime', value => moment(value).locale(store.state.locale).format('ddd, D MMMM HH:mm'))