From 235212c45184916c76bf05508000d652fd84cd19 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 1 Mar 2016 16:59:12 +0100 Subject: [PATCH] Add some pretty date --- app/index.html | 2 +- app/js/app.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/index.html b/app/index.html index ea14bc1..9e4901f 100644 --- a/app/index.html +++ b/app/index.html @@ -142,7 +142,7 @@ {{ entry.filePath }} {{ entry.size }} - {{ entry.mtime }} + {{ entry.mtime | prettyDate }} diff --git a/app/js/app.js b/app/js/app.js index c0ed616..11581b6 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -149,6 +149,11 @@ function createDirectory(name) { }); } +Vue.filter('prettyDate', function (value) { + var d = new Date(value); + return d.toDateString(); +}); + var app = new Vue({ el: '#app', data: { @@ -177,8 +182,6 @@ var app = new Vue({ } }); -window.app = app; - login(localStorage.username, localStorage.password); })(); -- 2.41.0