chatview: improve timestamp display.
Timestamps are displayed as group likes "just now", "1 hour ago", etc.
Change-Id: I39c3482615c0e3fa4cef01ef29b355785c203626
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
diff --git a/web/chatview.css b/web/chatview.css
index 1dce00f..5a9cff6 100644
--- a/web/chatview.css
+++ b/web/chatview.css
@@ -210,6 +210,19 @@
flex-direction: row-reverse;
}
+.timestamp
+{
+ display: flex;
+ justify-content: flex-start;
+ color: #333;
+ font-size: 10px;
+ padding: 5px;
+}
+
+.timestamp_out {
+ flex-direction: row-reverse;
+}
+
.message_sender {
display: none;
}
@@ -271,20 +284,23 @@
}
.message_timestamp {
- font-size: 0.8em;
- margin-top: 0.5em;
- opacity: 1;
- transition: opacity 0.5s ease-in-out;
- line-height: 1em;
- display: inline-block;
+ color: #333;
+ font-size: 0.8em;
+ margin-top: 0.5em;
+ transition: opacity 0.3s ease-in-out;
+ line-height: 1em;
+ display: inline-block;
+ opacity: 0;
+ float: right;
+}
+
+.message_wrapper:hover .message_timestamp {
+ opacity: 1;
}
.sent-checkmark {
- margin-left: 0.313em;
-}
-
-.message_in .message_timestamp {
- color: #9E9E9E;
+ margin-left: 0.313em;
+ float: right;
}
@-webkit-keyframes fade-in {