diff --git a/server/app/index.html b/server/app/index.html index 755b059d..31b95a09 100644 --- a/server/app/index.html +++ b/server/app/index.html @@ -29,6 +29,7 @@ + diff --git a/server/app/scripts/app.js b/server/app/scripts/app.js index 4f1a670b..097e74ac 100644 --- a/server/app/scripts/app.js +++ b/server/app/scripts/app.js @@ -2,9 +2,14 @@ var app = angular.module('app', [ 'ngRoute', - 'ui.filters' + 'ui.filters', + 'angularMoment' ]); +angular.module('app').constant('angularMomentConfig', { + preprocess: 'unix' +}); + // First, parse the query string var params = {}, queryString = location.hash.substring(1), regex = /([^&=]+)=([^&]*)/g, m; diff --git a/server/app/scripts/filters/filters.js b/server/app/scripts/filters/filters.js index 32c1c088..2100369b 100644 --- a/server/app/scripts/filters/filters.js +++ b/server/app/scripts/filters/filters.js @@ -25,7 +25,7 @@ /** * toDate is a helper function that returns a human readable - * string gor the given unix date. + * string for the given unix date. */ function toDate() { return function(date) { diff --git a/server/app/views/commit.html b/server/app/views/commit.html index 2cfdfd80..787b1241 100644 --- a/server/app/views/commit.html +++ b/server/app/views/commit.html @@ -8,14 +8,14 @@
-

{{ commit.duration | toDuration}}

+

{{ commit.duration | amDurationFormat:'seconds':false }}

-
{{ commit.finished_at | fromNow }}
-
Started {{ commit.started_at | fromNow }}
-
Created {{ commit.created_at}}
+
+
Started
+
Created
diff --git a/server/app/views/repo.html b/server/app/views/repo.html index bd0328a0..474ca39b 100644 --- a/server/app/views/repo.html +++ b/server/app/views/repo.html @@ -70,11 +70,11 @@ {{ commit.sha | shortHash }} ({{ commit.branch }}) {{ commit.author }} - {{ commit.duration | toDuration }} - {{ commit.started_at | fromNow }} - - + {{ commit.duration | amDurationFormat:'seconds':false }} + + - {{ commit.finished_at | fromNow }} + - @@ -88,24 +88,24 @@

{{ commit.message }}

- {{ commit.author }}
{{ commit.finished_at | fromNow }}
- {{ commit.author }}
Started {{ commit.started_at | fromNow }}
- {{ commit.author }}
Created {{ commit.created_at}}
+ {{ commit.author }}
+ {{ commit.author }}
Started
+ {{ commit.author }}
Created
-
+