mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
Merge pull request #4995 from urbit/james/shipname-titles
interface: consistent titles for mentions, authors with nicknames
This commit is contained in:
commit
5241efbfa8
@ -159,7 +159,7 @@ export const MessageAuthor = ({
|
||||
fontWeight={nameMono ? '400' : '500'}
|
||||
cursor='pointer'
|
||||
onClick={doCopy}
|
||||
title={`~${msg.author}`}
|
||||
title={showNickname ? `~${msg.author}` : contact?.nickname}
|
||||
>
|
||||
{copyDisplay}
|
||||
</Text>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BaseImage, Box, Row } from '@tlon/indigo-react';
|
||||
import { BaseImage, Box, Row, Text } from '@tlon/indigo-react';
|
||||
import moment from 'moment';
|
||||
import React, { ReactElement, ReactNode } from 'react';
|
||||
import GlobalApi from '~/logic/api/global';
|
||||
@ -94,7 +94,7 @@ export default function Author(props: AuthorProps & PropFunc<typeof Box>): React
|
||||
)}
|
||||
</Box>
|
||||
<Box display='flex' alignItems='baseline'>
|
||||
<Box
|
||||
<Text
|
||||
ml={showImage ? 2 : 0}
|
||||
color='black'
|
||||
fontSize='1'
|
||||
@ -104,10 +104,11 @@ export default function Author(props: AuthorProps & PropFunc<typeof Box>): React
|
||||
fontWeight={showNickname ? '500' : '400'}
|
||||
mr={showNickname ? 0 : '2px'}
|
||||
mt={showNickname ? 0 : '0px'}
|
||||
title={showNickname ? cite(ship) : contact?.nickname}
|
||||
onClick={doCopy}
|
||||
>
|
||||
{copyDisplay}
|
||||
</Box>
|
||||
</Text>
|
||||
{ !dontShowTime && time && (
|
||||
<Timestamp
|
||||
height="fit-content"
|
||||
|
@ -46,7 +46,6 @@ export function Mention(props: {
|
||||
const contact = useContact(`~${deSig(ship)}`);
|
||||
const showNickname = useShowNickname(contact);
|
||||
const name = showNickname ? contact?.nickname : cite(ship);
|
||||
|
||||
return (
|
||||
<ProfileOverlay ship={ship} api={api} display="inline">
|
||||
<Text
|
||||
@ -57,6 +56,8 @@ export function Mention(props: {
|
||||
color='blue'
|
||||
fontSize={showNickname ? 1 : 0}
|
||||
mono={!showNickname}
|
||||
title={showNickname ? cite(ship) : contact?.nickname}
|
||||
{...rest}
|
||||
>
|
||||
{name}
|
||||
</Text>
|
||||
|
Loading…
Reference in New Issue
Block a user