mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 00:38:27 +00:00
[Glitch] Update Avatar, AvatarComposite, and AvatarOverlay components (#2508)
Various ports including8dfe5179ee,d1de7fb7faand9f8d34620b. Co-authored-by: Eugen Rochko <eugen@zeonfederated.com> Co-authored-by: fusagiko / takayamaki <24884114+takayamaki@users.noreply.github.com>
This commit is contained in:
@@ -5,6 +5,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
||||
import { autoPlayGif } from '../initial_state';
|
||||
|
||||
import { Avatar } from './avatar';
|
||||
|
||||
export default class AvatarComposite extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
@@ -76,12 +78,12 @@ export default class AvatarComposite extends PureComponent {
|
||||
bottom: bottom,
|
||||
width: `${width}%`,
|
||||
height: `${height}%`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundImage: `url(${account.get(animate ? 'avatar' : 'avatar_static')})`,
|
||||
};
|
||||
|
||||
return (
|
||||
<div key={account.get('id')} style={style} data-avatar-of={`@${account.get('acct')}`} />
|
||||
<div key={account.get('id')} style={style}>
|
||||
<Avatar account={account} animate={animate} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user