mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
web/rightpanel: center no pinned messages text
This commit is contained in:
parent
54234036a7
commit
f9b94034b1
2 changed files with 8 additions and 6 deletions
|
@ -42,14 +42,12 @@ const PinnedMessages = () => {
|
|||
if (!roomCtx) {
|
||||
return null
|
||||
} else if (!Array.isArray(pins?.pinned) || pins.pinned.length === 0) {
|
||||
return <>No pinned messages</>
|
||||
return <div className="empty">No pinned messages</div>
|
||||
}
|
||||
return <>
|
||||
<RoomContext value={roomCtx}>
|
||||
{reverseMap(pins.pinned, evtID => typeof evtID === "string" ? <div className="pinned-event" key={evtID}>
|
||||
<PinnedMessage evtID={evtID} room={roomCtx.store} />
|
||||
</div> : null)}
|
||||
</RoomContext>
|
||||
</>
|
||||
}
|
||||
|
||||
|
|
|
@ -39,4 +39,8 @@ div.right-panel-content.pinned-messages {
|
|||
border-bottom: 1px solid var(--border-color);
|
||||
padding-bottom: .5rem;
|
||||
}
|
||||
|
||||
> div.empty {
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue