leap: truncate statuses

Fixes urbit/landscape#487
This commit is contained in:
Matilde Park 2021-02-25 13:41:17 -05:00
parent e8bbc56c48
commit 6efa47b6cc

View File

@ -87,25 +87,29 @@ export class OmniboxResult extends Component {
}
onClick={navigate}
width="100%"
justifyContent="space-between"
ref={this.result}
>
<Box display="flex" verticalAlign="middle" maxWidth="60%" flexShrink={0}>
{graphic}
<Text
display="inline-block"
verticalAlign="middle"
mono={(icon == 'profile' && text.startsWith('~'))}
color={this.state.hovered || selected === link ? 'white' : 'black'}
maxWidth="60%"
style={{ flexShrink: 0 }}
mr='1'
>
{text.startsWith("~") ? cite(text) : text}
</Text>
</Box>
<Text pr='2'
display="inline-block"
verticalAlign="middle"
color={this.state.hovered || selected === link ? 'white' : 'black'}
width='100%'
minWidth={0}
textOverflow="ellipsis"
whiteSpace="pre"
overflow="hidden"
maxWidth="40%"
textAlign='right'
>
{subtext}