Merge branch 'fix-instance-favicons' into 'develop'
Fix instance favicons Closes #1447 See merge request soapbox-pub/soapbox!2576
This commit is contained in:
commit
a6a1ed9576
|
@ -41,13 +41,17 @@ const InstanceFavicon: React.FC<IInstanceFavicon> = ({ account, disabled }) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!account.pleroma?.favicon) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
className='h-4 w-4 flex-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2'
|
className='h-4 w-4 flex-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2'
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
>
|
>
|
||||||
<img src={account.favicon} alt='' title={account.domain} className='max-h-full w-full' />
|
<img src={account.pleroma.favicon} alt='' title={account.domain} className='max-h-full w-full' />
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -229,7 +233,7 @@ const Account = ({
|
||||||
<HStack alignItems='center' space={1}>
|
<HStack alignItems='center' space={1}>
|
||||||
<Text theme='muted' size='sm' direction='ltr' truncate>@{username}</Text>
|
<Text theme='muted' size='sm' direction='ltr' truncate>@{username}</Text>
|
||||||
|
|
||||||
{account.favicon && (
|
{account.pleroma?.favicon && (
|
||||||
<InstanceFavicon account={account} disabled={!withLinkToProfile} />
|
<InstanceFavicon account={account} disabled={!withLinkToProfile} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ const baseAccountSchema = z.object({
|
||||||
discoverable: z.boolean().catch(false),
|
discoverable: z.boolean().catch(false),
|
||||||
display_name: z.string().catch(''),
|
display_name: z.string().catch(''),
|
||||||
emojis: filteredArray(customEmojiSchema),
|
emojis: filteredArray(customEmojiSchema),
|
||||||
favicon: z.string().catch(''),
|
|
||||||
fields: filteredArray(fieldSchema),
|
fields: filteredArray(fieldSchema),
|
||||||
followers_count: z.number().catch(0),
|
followers_count: z.number().catch(0),
|
||||||
following_count: z.number().catch(0),
|
following_count: z.number().catch(0),
|
||||||
|
|
Loading…
Reference in New Issue