mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
Merge pull request #4631 from urbit/james/breakfix
chat: prevent marker text from wrapping
This commit is contained in:
commit
9ed71e8ccc
@ -58,7 +58,14 @@ export const DayBreak = ({ when, shimTop = false }: DayBreakProps) => (
|
||||
mt={shimTop ? '-8px' : '0'}
|
||||
>
|
||||
<Rule borderColor='lightGray' />
|
||||
<Text gray flexShrink='0' fontSize={0} px={2}>
|
||||
<Text
|
||||
gray
|
||||
flexShrink='0'
|
||||
whiteSpace='nowrap'
|
||||
textAlign='center'
|
||||
fontSize={0}
|
||||
px={2}
|
||||
>
|
||||
{moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })}
|
||||
</Text>
|
||||
<Rule borderColor='lightGray' />
|
||||
@ -92,7 +99,14 @@ export const UnreadMarker = React.forwardRef(
|
||||
>
|
||||
<Rule borderColor='lightBlue' />
|
||||
<VisibilitySensor onChange={setVisible}>
|
||||
<Text color='blue' fontSize={0} flexShrink='0' px={2}>
|
||||
<Text
|
||||
color='blue'
|
||||
fontSize={0}
|
||||
flexShrink='0'
|
||||
whiteSpace='nowrap'
|
||||
textAlign='center'
|
||||
px={2}
|
||||
>
|
||||
New messages below
|
||||
</Text>
|
||||
</VisibilitySensor>
|
||||
@ -370,10 +384,11 @@ export const MessageAuthor = ({
|
||||
.unix(msg['time-sent'] / 1000)
|
||||
.format(DATESTAMP_FORMAT);
|
||||
const contact =
|
||||
( ( (msg.author === window.ship && showOurContact) ||
|
||||
msg.author !== window.ship) &&
|
||||
`~${msg.author}` in contacts
|
||||
) ? contacts[`~${msg.author}`] : false;
|
||||
((msg.author === window.ship && showOurContact) ||
|
||||
msg.author !== window.ship) &&
|
||||
`~${msg.author}` in contacts
|
||||
? contacts[`~${msg.author}`]
|
||||
: false;
|
||||
|
||||
const showNickname = useShowNickname(contact);
|
||||
const { hideAvatars } = useSettingsState(selectCalmState);
|
||||
@ -416,7 +431,7 @@ export const MessageAuthor = ({
|
||||
contact?.avatar && !hideAvatars ? (
|
||||
<BaseImage
|
||||
display='inline-block'
|
||||
referrerPolicy="no-referrer"
|
||||
referrerPolicy='no-referrer'
|
||||
style={{ objectFit: 'cover' }}
|
||||
src={contact.avatar}
|
||||
height={24}
|
||||
|
Loading…
Reference in New Issue
Block a user