kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Merge branch 'next-small-fixes' into next
commit
9e50f76d78
|
@ -1,5 +1,5 @@
|
||||||
import * as React from 'react';
|
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 HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||||
import VerificationBadge from 'soapbox/components/verification_badge';
|
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';
|
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 {
|
interface IProfilePopper {
|
||||||
condition: boolean,
|
condition: boolean,
|
||||||
wrapper: (children: any) => React.ReactElement<any, any>
|
wrapper: (children: any) => React.ReactElement<any, any>
|
||||||
|
@ -172,9 +191,7 @@ const Account = ({
|
||||||
<Text theme='muted' size='sm' truncate>@{username}</Text>
|
<Text theme='muted' size='sm' truncate>@{username}</Text>
|
||||||
|
|
||||||
{account.favicon && (
|
{account.favicon && (
|
||||||
<Link to={`/timeline/${account.domain}`} className='w-4 h-4 flex-none' onClick={e => e.stopPropagation()}>
|
<InstanceFavicon account={account} />
|
||||||
<img src={account.favicon} alt='' title={account.domain} className='w-full max-h-full' />
|
|
||||||
</Link>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{(timestamp) ? (
|
{(timestamp) ? (
|
||||||
|
|
|
@ -40,7 +40,7 @@ class ChatBox extends ImmutablePureComponent {
|
||||||
intl: PropTypes.object.isRequired,
|
intl: PropTypes.object.isRequired,
|
||||||
chatId: PropTypes.string.isRequired,
|
chatId: PropTypes.string.isRequired,
|
||||||
chatMessageIds: ImmutablePropTypes.orderedSet,
|
chatMessageIds: ImmutablePropTypes.orderedSet,
|
||||||
chat: ImmutablePropTypes.map,
|
chat: ImmutablePropTypes.record,
|
||||||
onSetInputRef: PropTypes.func,
|
onSetInputRef: PropTypes.func,
|
||||||
me: PropTypes.node,
|
me: PropTypes.node,
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ class ChatWindow extends ImmutablePureComponent {
|
||||||
chatId: PropTypes.string.isRequired,
|
chatId: PropTypes.string.isRequired,
|
||||||
windowState: PropTypes.string.isRequired,
|
windowState: PropTypes.string.isRequired,
|
||||||
idx: PropTypes.number,
|
idx: PropTypes.number,
|
||||||
chat: ImmutablePropTypes.map,
|
chat: ImmutablePropTypes.record,
|
||||||
me: PropTypes.node,
|
me: PropTypes.node,
|
||||||
displayFqn: PropTypes.bool,
|
displayFqn: PropTypes.bool,
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue