From 6be74d6cbd080f56bce9bf45901a46201933c7b1 Mon Sep 17 00:00:00 2001 From: skybldev Date: Sun, 28 Nov 2021 12:18:08 -0500 Subject: [PATCH] client: added basic date-taken functionality - [client] added `date-fns` as dependency (it's much cleaner to format dates this way) - [client] added basic sidebar stuff in `html/post_readonly_sidebar.tpl` - [client] updated `js/models/post.js` to reflect changes - [client] added `formatUserFriendlyTime()` in `js/util/misc.js` - [client] added `makeUserFriendlyTime()` in `js/util/views.js` in conjunction with it - [misc] ran post-commit; previous commits did not --- client/html/post_readonly_sidebar.tpl | 5 +++++ client/js/models/post.js | 5 +++++ client/js/util/misc.js | 11 +++++++++++ client/js/util/views.js | 9 +++++++++ client/package-lock.json | 18 ++++++++++++++++++ client/package.json | 1 + 6 files changed, 49 insertions(+) diff --git a/client/html/post_readonly_sidebar.tpl b/client/html/post_readonly_sidebar.tpl index 4f18624f..bfa3bf99 100644 --- a/client/html/post_readonly_sidebar.tpl +++ b/client/html/post_readonly_sidebar.tpl @@ -30,6 +30,11 @@ <%= ctx.makeRelativeTime(ctx.post.creationTime) %> +
+ Taken on + <%= ctx.makeUserFriendlyTime(ctx.post.dateTaken) %> +
+ <% if (ctx.enableSafety) { %>