Display last modified as a relative date in v2

This commit is contained in:
James Allen 2018-04-27 16:50:46 +01:00
parent 4759097e49
commit 5c87a2aa90
3 changed files with 9 additions and 2 deletions

View file

@ -38,4 +38,7 @@
tooltip-append-to-body="true"
)
.col-xs-4
span.last-modified {{project.lastUpdated | formatDate}}
if settings.overleaf
span.last-modified(tooltip="{{project.lastUpdated | formatDate}}") {{project.lastUpdated | fromNowDate}}
else
span.last-modified {{project.lastUpdated | formatDate}}

View file

@ -22,4 +22,4 @@
span.owner {{ownerName()}}
.col-xs-4
span.last-modified {{project.lastUpdated | formatDate}}
span.last-modified(tooltip="{{project.lastUpdated | formatDate}}") {{project.lastUpdated | fromNowDate}}

View file

@ -17,3 +17,7 @@ define [
App.filter "relativeDate", () ->
(date) ->
moment(date).calendar()
App.filter "fromNowDate", () ->
(date) ->
moment(date).fromNow()