message timestamp is always shown on the bottom right now

This commit is contained in:
or-else
2021-04-28 16:32:36 -07:00
parent f6acbaab21
commit 271fbc4b02
7 changed files with 23 additions and 21 deletions
+9 -14
View File
@@ -1505,11 +1505,13 @@ i.search {
} }
.chat-box .bubble div.message-content { .chat-box .bubble div.message-content {
position: relative;
color: #212121; color: #212121;
margin: 0; margin: 0;
max-width: 36rem; max-width: 36rem;
overflow-wrap: break-word; overflow-wrap: break-word;
} }
/* The timestamp is a floating element. Need to ensure div.message-content is expanded /* The timestamp is a floating element. Need to ensure div.message-content is expanded
* to accomodate it. It's usually called clearfix. */ * to accomodate it. It's usually called clearfix. */
.chat-box .bubble div.message-content:after { .chat-box .bubble div.message-content:after {
@@ -1520,28 +1522,21 @@ i.search {
visibility: hidden; visibility: hidden;
} }
.chat-box .timestamp-padding {
display: inline-block;
width: 4rem;
height: 0;
}
.chat-box .timestamp { .chat-box .timestamp {
position: relative; position: relative;
font-size: 80%; font-size: 80%;
color: #777; color: #777;
padding-left: 1rem; top: 0.35rem;
top: 0.5rem;
float: right; float: right;
white-space: nowrap; white-space: nowrap;
} }
/* Typing notification bubble */
.chat-box .typing {
display: inline-block;
border-radius: 0.5rem;
width: 2rem;
padding: 0.25rem 0.35rem;
vertical-align: middle;
text-align: center;
color: #aaa;
margin-top: 0.75rem;
}
/* The name of the person who sent the message /* The name of the person who sent the message
* (group chat only) * (group chat only)
*/ */
+1 -1
View File
File diff suppressed because one or more lines are too long
+5
View File
@@ -129,8 +129,13 @@ export default class ChatMessage extends React.Component {
<div> <div>
<div className={bubbleClass}> <div className={bubbleClass}>
<div className="message-content"> <div className="message-content">
<div>
{content} {content}
{attachments} {attachments}
{this.props.timestamp ?
<span className="timestamp-padding"></span>
: null}
</div>
{this.props.timestamp ? {this.props.timestamp ?
<ReceivedMarker <ReceivedMarker
timestamp={this.props.timestamp} timestamp={this.props.timestamp}
+3 -1
View File
@@ -7082,7 +7082,9 @@ class ChatMessage extends (react__WEBPACK_IMPORTED_MODULE_0___default().Componen
className: bubbleClass className: bubbleClass
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "message-content" className: "message-content"
}, content, attachments, this.props.timestamp ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_received_marker_jsx__WEBPACK_IMPORTED_MODULE_5__.default, { }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, content, attachments, this.props.timestamp ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "timestamp-padding"
}) : null), this.props.timestamp ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_received_marker_jsx__WEBPACK_IMPORTED_MODULE_5__.default, {
timestamp: this.props.timestamp, timestamp: this.props.timestamp,
received: this.props.received received: this.props.received
}) : null), this.props.deleted || !this.props.showContextMenu ? null : react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { }) : null), this.props.deleted || !this.props.showContextMenu ? null : react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long