From a932b664db987f2cf9ceefe9bb56e43793470d5e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 10 Dec 2017 04:42:16 +0100 Subject: style search. LOTTA styling --- public/assets/js/lib/views/index/lastlog.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'public/assets/js/lib/views/index/lastlog.js') diff --git a/public/assets/js/lib/views/index/lastlog.js b/public/assets/js/lib/views/index/lastlog.js index 2f7b224..0fed101 100644 --- a/public/assets/js/lib/views/index/lastlog.js +++ b/public/assets/js/lib/views/index/lastlog.js @@ -18,11 +18,12 @@ var LastLog = View.extend({ }, load: function(lastlog){ - var s = lastlog.map(this.parse.bind(this)).join(', ') + var s = lastlog.map(this.parse.bind(this)).filter(s => s).join(', ') this.$el.html(s) }, parse: function(user){ + if (Date.now()/1000 - user.lastseen > 86400 * 14 *10000) return '' var t = this.template .replace(/{{username}}/g, user.username) .replace(/{{age}}/g, get_age(user.lastseen) ) -- cgit v1.2.3-70-g09d2