Merge branch 'audio-avatar-fix' into 'develop'
Fix aspect ratio of avatars in audio player Closes #1345 See merge request soapbox-pub/soapbox!2630
This commit is contained in:
commit
196d9d5b2b
2 changed files with 3 additions and 6 deletions
|
@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Fixed
|
### Fixed
|
||||||
- Posts: fixed emojis being cut off in reactions modal.
|
- Posts: fixed emojis being cut off in reactions modal.
|
||||||
- Posts: fix audio player progress bar visibility.
|
- Posts: fix audio player progress bar visibility.
|
||||||
|
- Posts: fix audio player avatar aspect ratio for non-square avatars.
|
||||||
- Posts: added missing gap in pending status.
|
- Posts: added missing gap in pending status.
|
||||||
- Compatibility: fixed quote posting compatibility with custom Pleroma forks.
|
- Compatibility: fixed quote posting compatibility with custom Pleroma forks.
|
||||||
- Profile: fix "load more" button height on account gallery page.
|
- Profile: fix "load more" button height on account gallery page.
|
||||||
|
|
|
@ -465,10 +465,9 @@ const Audio: React.FC<IAudio> = (props) => {
|
||||||
<canvas
|
<canvas
|
||||||
role='button'
|
role='button'
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className='audio-player__canvas'
|
className='audio-player__canvas absolute left-0 top-0 w-full'
|
||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height}
|
||||||
style={{ width: '100%', position: 'absolute', top: 0, left: 0 }}
|
|
||||||
ref={canvas}
|
ref={canvas}
|
||||||
onClick={togglePlay}
|
onClick={togglePlay}
|
||||||
onKeyDown={handleAudioKeyDown}
|
onKeyDown={handleAudioKeyDown}
|
||||||
|
@ -480,15 +479,12 @@ const Audio: React.FC<IAudio> = (props) => {
|
||||||
<img
|
<img
|
||||||
src={poster}
|
src={poster}
|
||||||
alt=''
|
alt=''
|
||||||
|
className='pointer-events-none absolute aspect-1 -translate-x-1/2 -translate-y-1/2 rounded-full object-cover'
|
||||||
width={(_getRadius() - TICK_SIZE) * 2}
|
width={(_getRadius() - TICK_SIZE) * 2}
|
||||||
height={(_getRadius() - TICK_SIZE) * 2}
|
height={(_getRadius() - TICK_SIZE) * 2}
|
||||||
style={{
|
style={{
|
||||||
position: 'absolute',
|
|
||||||
left: _getCX(),
|
left: _getCX(),
|
||||||
top: _getCY(),
|
top: _getCY(),
|
||||||
transform: 'translate(-50%, -50%)',
|
|
||||||
borderRadius: '50%',
|
|
||||||
pointerEvents: 'none',
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue