mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 18:01:32 +03:00
Merge pull request #4399 from urbit/lf/profile-tweaks
Profile: tweak sigil size
This commit is contained in:
commit
05c1f286a3
@ -23,10 +23,10 @@ export const Sigil = memo(
|
||||
size,
|
||||
svgClass = '',
|
||||
icon = false,
|
||||
padded = false
|
||||
padding = 0
|
||||
}) => {
|
||||
const padding = icon && padded ? '2px' : '0px';
|
||||
const innerSize = icon && padded ? Number(size) - 4 : size;
|
||||
const innerSize = Number(size) - 2*padding;
|
||||
const paddingPx = `${padding}px`;
|
||||
const foregroundColor = foreground
|
||||
? foreground
|
||||
: foregroundFromBackground(color);
|
||||
@ -45,7 +45,7 @@ export const Sigil = memo(
|
||||
borderRadius={icon ? '1' : '0'}
|
||||
flexBasis={size}
|
||||
backgroundColor={color}
|
||||
padding={padding}
|
||||
padding={paddingPx}
|
||||
className={classes}
|
||||
>
|
||||
{sigil({
|
||||
|
@ -137,7 +137,7 @@ class ChatInput extends Component<ChatInputProps, ChatInputState> {
|
||||
color={`#${color}`}
|
||||
classes={sigilClass}
|
||||
icon
|
||||
padded
|
||||
padding={2}
|
||||
/>;
|
||||
|
||||
return (
|
||||
|
@ -279,7 +279,7 @@ export const MessageWithSigil = (props) => {
|
||||
color={color}
|
||||
classes={sigilClass}
|
||||
icon
|
||||
padded
|
||||
padding={2}
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -185,7 +185,7 @@ const GraphNode = ({
|
||||
icon
|
||||
color={`#000000`}
|
||||
classes="mix-blend-diff"
|
||||
padded
|
||||
padding={2}
|
||||
/>
|
||||
) : <Box style={{ width: '16px' }}></Box>;
|
||||
|
||||
|
@ -41,7 +41,7 @@ export function Profile(props: any) {
|
||||
|
||||
const image = (!hideAvatars && contact?.avatar)
|
||||
? <BaseImage src={contact.avatar} width='100%' height='100%' style={{ objectFit: 'cover' }} />
|
||||
: <Sigil ship={ship} size={96} color={hexColor} />;
|
||||
: <Sigil padding={24} ship={ship} size={128} color={hexColor} />;
|
||||
|
||||
return (
|
||||
<Center
|
||||
@ -64,7 +64,7 @@ export function Profile(props: any) {
|
||||
width="100%"
|
||||
>
|
||||
<Center width="100%" marginTop="-48px">
|
||||
<Box height='96px' width='96px' borderRadius="2" overflow="hidden">
|
||||
<Box height='128px' width='128px' borderRadius="2" overflow="hidden">
|
||||
{image}
|
||||
</Box>
|
||||
</Center>
|
||||
|
@ -48,7 +48,7 @@ export default function Author(props: AuthorProps) {
|
||||
width={16}
|
||||
/>
|
||||
) : (
|
||||
<Sigil ship={ship} size={16} color={color} icon padded />
|
||||
<Sigil ship={ship} size={16} color={color} icon padding={2} />
|
||||
);
|
||||
|
||||
return (
|
||||
|
@ -51,7 +51,7 @@ export class OmniboxResult extends Component {
|
||||
graphic = <Icon display="inline-block" verticalAlign="middle" icon='SignOut' mr='2' size='18px' color={iconFill} />;
|
||||
} else if (icon === 'profile') {
|
||||
text = text.startsWith('Profile') ? window.ship : text;
|
||||
graphic = <Sigil color={color} classes='dib flex-shrink-0 v-mid mr2' ship={text} size={18} icon padded />;
|
||||
graphic = <Sigil color={color} classes='dib flex-shrink-0 v-mid mr2' ship={text} size={18} icon padding={2} />;
|
||||
} else if (icon === 'home') {
|
||||
graphic = <Icon display='inline-block' verticalAlign='middle' icon='Home' mr='2' size='18px' color={iconFill} />;
|
||||
} else if (icon === 'notifications') {
|
||||
|
@ -76,7 +76,7 @@ export function SidebarItem(props: {
|
||||
if (props.contacts?.[title] && props.contacts[title].avatar) {
|
||||
img = <BaseImage src={props.contacts[title].avatar} width='16px' height='16px' borderRadius={2}/>;
|
||||
} else {
|
||||
img = <Sigil ship={title} color={`#${uxToHex(props.contacts?.[title]?.color || '0x0')}`} icon padded size={16}/>
|
||||
img = <Sigil ship={title} color={`#${uxToHex(props.contacts?.[title]?.color || '0x0')}`} icon padding={2} size={16}/>
|
||||
}
|
||||
if (props.contacts?.[title] && props.contacts[title].nickname) {
|
||||
title = props.contacts[title].nickname;
|
||||
|
Loading…
Reference in New Issue
Block a user