mirror of
https://github.com/urbit/shrub.git
synced 2024-12-20 01:01:37 +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'}
|
mt={shimTop ? '-8px' : '0'}
|
||||||
>
|
>
|
||||||
<Rule borderColor='lightGray' />
|
<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 })}
|
{moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })}
|
||||||
</Text>
|
</Text>
|
||||||
<Rule borderColor='lightGray' />
|
<Rule borderColor='lightGray' />
|
||||||
@ -92,7 +99,14 @@ export const UnreadMarker = React.forwardRef(
|
|||||||
>
|
>
|
||||||
<Rule borderColor='lightBlue' />
|
<Rule borderColor='lightBlue' />
|
||||||
<VisibilitySensor onChange={setVisible}>
|
<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
|
New messages below
|
||||||
</Text>
|
</Text>
|
||||||
</VisibilitySensor>
|
</VisibilitySensor>
|
||||||
@ -370,10 +384,11 @@ export const MessageAuthor = ({
|
|||||||
.unix(msg['time-sent'] / 1000)
|
.unix(msg['time-sent'] / 1000)
|
||||||
.format(DATESTAMP_FORMAT);
|
.format(DATESTAMP_FORMAT);
|
||||||
const contact =
|
const contact =
|
||||||
( ( (msg.author === window.ship && showOurContact) ||
|
((msg.author === window.ship && showOurContact) ||
|
||||||
msg.author !== window.ship) &&
|
msg.author !== window.ship) &&
|
||||||
`~${msg.author}` in contacts
|
`~${msg.author}` in contacts
|
||||||
) ? contacts[`~${msg.author}`] : false;
|
? contacts[`~${msg.author}`]
|
||||||
|
: false;
|
||||||
|
|
||||||
const showNickname = useShowNickname(contact);
|
const showNickname = useShowNickname(contact);
|
||||||
const { hideAvatars } = useSettingsState(selectCalmState);
|
const { hideAvatars } = useSettingsState(selectCalmState);
|
||||||
@ -416,7 +431,7 @@ export const MessageAuthor = ({
|
|||||||
contact?.avatar && !hideAvatars ? (
|
contact?.avatar && !hideAvatars ? (
|
||||||
<BaseImage
|
<BaseImage
|
||||||
display='inline-block'
|
display='inline-block'
|
||||||
referrerPolicy="no-referrer"
|
referrerPolicy='no-referrer'
|
||||||
style={{ objectFit: 'cover' }}
|
style={{ objectFit: 'cover' }}
|
||||||
src={contact.avatar}
|
src={contact.avatar}
|
||||||
height={24}
|
height={24}
|
||||||
|
Loading…
Reference in New Issue
Block a user