From c06ed9cc555b915285c62883e12d48d00c142ea8 Mon Sep 17 00:00:00 2001 From: julian laplace Date: Wed, 2 Nov 2022 15:32:26 +0100 Subject: show age on hover --- public/assets/js/lib/views/stream/hootstream.js | 5 ++++- public/assets/js/util/icons.js | 1 + views/hootstream/templates.ejs | 12 ++++++------ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/public/assets/js/lib/views/stream/hootstream.js b/public/assets/js/lib/views/stream/hootstream.js index cde591c..311d84e 100644 --- a/public/assets/js/lib/views/stream/hootstream.js +++ b/public/assets/js/lib/views/stream/hootstream.js @@ -384,6 +384,7 @@ var HootStream = View.extend({ age: get_age(date), hoot_opacity: className === "first_post" ? 1.0 : age_opacity, age_opacity: age_opacity, + age_string: verbose_date(date).join(" "), ...options, }); }, @@ -435,7 +436,7 @@ var HootStream = View.extend({ const actions = [ hasAudio && { action: "play", label: "play music", icon: "play" }, - { action: "post", label: "post", icon: "edit" }, + { action: "post", label: "post", icon: "add" }, !isViewingThread && !isCompleteThread && { action: "expand", @@ -466,6 +467,7 @@ var HootStream = View.extend({ username: thread.username, className: postedToday ? "isRecent" : "", date: thread.lastmodified, + age_string: verbose_date(thread.lastmodified).join(" "), file_count: `${thread.file_count || 0} f.`, file_opacity: age_opacity * get_size_opacity(thread.file_count), comment_count: `${thread.comment_count || 0} c.`, @@ -605,6 +607,7 @@ var HootStream = View.extend({ filename: file.filename, age: get_age(file.date), age_opacity: get_age_opacity(file.date), + age_string: verbose_date(file.date).join(" "), date_class, date: datetime[0], // time: datetime[1], diff --git a/public/assets/js/util/icons.js b/public/assets/js/util/icons.js index 27afb90..f145515 100644 --- a/public/assets/js/util/icons.js +++ b/public/assets/js/util/icons.js @@ -3,4 +3,5 @@ const ICONS = { play: '', expand: '', + add: '', }; diff --git a/views/hootstream/templates.ejs b/views/hootstream/templates.ejs index bfeb5c1..3350e6b 100644 --- a/views/hootstream/templates.ejs +++ b/views/hootstream/templates.ejs @@ -7,7 +7,7 @@
{{hoot}}
-
{{age}}
+
{{age}}
@@ -28,7 +28,7 @@
{{keyword_link}}
{{comment_count}}
{{file_count}}
-
{{age}}
+
{{age}}
@@ -38,7 +38,7 @@ {{username}}
{{hoot}}
-
{{age}}
+
{{age}}
@@ -50,18 +50,18 @@
{{size}}
-
+
{{age}}