Merge branch 'next-small-fixes' into next

revert-5af0e40a
Alex Gleason 2022-04-21 18:28:54 -05:00
commit 9e50f76d78
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
3 zmienionych plików z 23 dodań i 6 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
import * as React from 'react';
import { Link } from 'react-router-dom';
import { Link, useHistory } from 'react-router-dom';
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
import VerificationBadge from 'soapbox/components/verification_badge';
@ -13,6 +13,25 @@ import { Avatar, HStack, IconButton, Text } from './ui';
import type { Account as AccountEntity } from 'soapbox/types/entities';
interface IInstanceFavicon {
account: AccountEntity,
}
const InstanceFavicon: React.FC<IInstanceFavicon> = ({ account }) => {
const history = useHistory();
const handleClick: React.MouseEventHandler = (e) => {
e.stopPropagation();
history.push(`/timeline/${account.domain}`);
};
return (
<button className='w-4 h-4 flex-none' onClick={handleClick}>
<img src={account.favicon} alt='' title={account.domain} className='w-full max-h-full' />
</button>
);
};
interface IProfilePopper {
condition: boolean,
wrapper: (children: any) => React.ReactElement<any, any>
@ -172,9 +191,7 @@ const Account = ({
<Text theme='muted' size='sm' truncate>@{username}</Text>
{account.favicon && (
<Link to={`/timeline/${account.domain}`} className='w-4 h-4 flex-none' onClick={e => e.stopPropagation()}>
<img src={account.favicon} alt='' title={account.domain} className='w-full max-h-full' />
</Link>
<InstanceFavicon account={account} />
)}
{(timestamp) ? (

Wyświetl plik

@ -40,7 +40,7 @@ class ChatBox extends ImmutablePureComponent {
intl: PropTypes.object.isRequired,
chatId: PropTypes.string.isRequired,
chatMessageIds: ImmutablePropTypes.orderedSet,
chat: ImmutablePropTypes.map,
chat: ImmutablePropTypes.record,
onSetInputRef: PropTypes.func,
me: PropTypes.node,
}

Wyświetl plik

@ -46,7 +46,7 @@ class ChatWindow extends ImmutablePureComponent {
chatId: PropTypes.string.isRequired,
windowState: PropTypes.string.isRequired,
idx: PropTypes.number,
chat: ImmutablePropTypes.map,
chat: ImmutablePropTypes.record,
me: PropTypes.node,
displayFqn: PropTypes.bool,
}