aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlambadalambda <gitgud@rogerbraun.net>2017-05-31 08:03:10 -0400
committerlambadalambda <gitgud@rogerbraun.net>2017-05-31 08:03:10 -0400
commitbf7190bfca5221d0f81b34f5b7238ca4e9d1380c (patch)
tree9503603dcfde4e9a18ca602e600fa07697ad950f
parentd44d88da1c05a1b13a7a44c6531e03cc697eb2ed (diff)
parent3a1ae3a30e1418099a71cdc8ea92d5f360b0f65d (diff)
Merge branch 'feature/custom-timestamps' into 'develop'
Add a custom timeago.json for shorter timestamps, for example '15s' instead of '15 seconds ago' See merge request !80
-rw-r--r--src/main.js2
-rw-r--r--static/timeago.json10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/main.js b/src/main.js
index 969ca8dc..35261578 100644
--- a/src/main.js
+++ b/src/main.js
@@ -24,7 +24,7 @@ Vue.use(VueRouter)
Vue.use(VueTimeago, {
locale: 'en-US',
locales: {
- 'en-US': require('vue-timeago/locales/en-US.json')
+ 'en-US': require('../static/timeago.json')
}
})
diff --git a/static/timeago.json b/static/timeago.json
new file mode 100644
index 00000000..b6f669c2
--- /dev/null
+++ b/static/timeago.json
@@ -0,0 +1,10 @@
+[
+ "now",
+ ["%ss", "%ss"],
+ ["%smin", "%smin"],
+ ["%sh", "%sh"],
+ ["%sd", "%sd"],
+ ["%sw", "%sw"],
+ ["%sm", "%sm"],
+ ["%sy", "%sy"]
+]