mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-10-18 14:13:21 +00:00
chat layout
This commit is contained in:
parent
8dea941fe2
commit
2c10597009
@ -91,7 +91,7 @@ const PrivateMessage = (props) => {
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`p-2 w-full md:w-2/3 rounded-xl m-2 ${whose} ${seen} ${delivered} flex flex-col items-start`}
|
||||
className={`p-2 w-full md:w-2/3 rounded-xl mb-1 ${whose} ${seen} ${delivered} flex flex-col items-start`}
|
||||
>
|
||||
<div className="w-full">
|
||||
<div className="mb-2">
|
||||
|
@ -119,7 +119,7 @@ function ChatMessages({ id }) {
|
||||
isDifferentDay = true;
|
||||
const separatorText = Helpers.getDaySeparatorText(date, dateStr, now, nowStr);
|
||||
msgListContent.push(
|
||||
<div className="px-2 py-1 inline-block day-separator bg-black opacity-50 text-white rounded-full">
|
||||
<div className="px-2 mt-3 mb-4 py-1 inline-block day-separator bg-black opacity-50 text-white rounded-full">
|
||||
{t(separatorText.toLowerCase())}
|
||||
</div>,
|
||||
);
|
||||
@ -127,12 +127,9 @@ function ChatMessages({ id }) {
|
||||
previousDateStr = dateStr;
|
||||
}
|
||||
|
||||
let showName = false;
|
||||
if (
|
||||
msg.pubkey !== myPub &&
|
||||
(isDifferentDay || (previousFrom && msg.pubkey !== previousFrom))
|
||||
) {
|
||||
msgListContent.push(<div className="from-separator" />);
|
||||
let showName = isDifferentDay;
|
||||
if (!isDifferentDay && previousFrom && msg.pubkey !== previousFrom) {
|
||||
msgListContent.push(<div className="m-2" />);
|
||||
showName = true;
|
||||
}
|
||||
previousFrom = msg.pubkey;
|
||||
|
Loading…
Reference in New Issue
Block a user