feat: add owner icon

This commit is contained in:
zerosoul
2022-05-17 21:23:23 +08:00
parent e40b12a554
commit 64af12c995
4 changed files with 33 additions and 3 deletions
+12 -2
View File
@@ -79,7 +79,9 @@ export default function ChannelChat({ cid = "", dropFiles = [] }) {
};
const { name, description, is_public, members = [], owner } = data;
const memberIds = is_public ? userIds : members;
const memberIds = is_public
? userIds
: members.sort((n) => (n == owner ? -1 : 0));
const addVisible = loginUser?.is_admin || owner == loginUid;
console.log("channel message list", msgIds);
const readIndex = footprint.readChannels[cid];
@@ -214,7 +216,15 @@ export default function ChannelChat({ cid = "", dropFiles = [] }) {
</div>
)}
{memberIds.map((uid) => {
return <Contact key={uid} uid={uid} dm popover />;
return (
<Contact
owner={owner == uid}
key={uid}
uid={uid}
dm
popover
/>
);
})}
</StyledContacts>
</>