aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorJohannes Zellner <johannes@nebulon.de>2016-03-01 16:59:12 +0100
committerJohannes Zellner <johannes@nebulon.de>2016-03-01 16:59:12 +0100
commit235212c45184916c76bf05508000d652fd84cd19 (patch)
treeb2f1777766404d1ef54836e4445a35fbb9096eea /app
parent403359cf6986b9c0f8c69f144cd36974d61a2370 (diff)
downloadSurfer-235212c45184916c76bf05508000d652fd84cd19.tar.gz
Surfer-235212c45184916c76bf05508000d652fd84cd19.tar.zst
Surfer-235212c45184916c76bf05508000d652fd84cd19.zip
Add some pretty date
Diffstat (limited to 'app')
-rw-r--r--app/index.html2
-rw-r--r--app/js/app.js7
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 @@
142 </th> 142 </th>
143 <th>{{ entry.filePath }}</th> 143 <th>{{ entry.filePath }}</th>
144 <th>{{ entry.size }}</th> 144 <th>{{ entry.size }}</th>
145 <th>{{ entry.mtime }}</th> 145 <th><span v-my-tooltip="foobar" data-toggle="tooltip" title="{{ entry.mtime }}">{{ entry.mtime | prettyDate }}</span></th>
146 <th style="text-align: right;"><button class="btn btn-sm btn-danger" v-on:click.stop="delAsk(entry)"><i class="fa fa-trash"></i></button></th> 146 <th style="text-align: right;"><button class="btn btn-sm btn-danger" v-on:click.stop="delAsk(entry)"><i class="fa fa-trash"></i></button></th>
147 </tr> 147 </tr>
148 </tbody> 148 </tbody>
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) {
149 }); 149 });
150} 150}
151 151
152Vue.filter('prettyDate', function (value) {
153 var d = new Date(value);
154 return d.toDateString();
155});
156
152var app = new Vue({ 157var app = new Vue({
153 el: '#app', 158 el: '#app',
154 data: { 159 data: {
@@ -177,8 +182,6 @@ var app = new Vue({
177 } 182 }
178}); 183});
179 184
180window.app = app;
181
182login(localStorage.username, localStorage.password); 185login(localStorage.username, localStorage.password);
183 186
184})(); 187})();