mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 19:01:37 +01:00
[Glitch] Keep the status action buttons at their position regardless of the counter size
Port 739ad0eed2
to glitch-soc
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
5716ebf390
commit
0b1310feb3
2 changed files with 48 additions and 23 deletions
|
@ -315,11 +315,14 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
const filterButton = this.props.onFilter && (
|
||||
<div className='status__action-bar__button-wrapper'>
|
||||
<IconButton className='status__action-bar-button' title={intl.formatMessage(messages.hide)} icon='eye' iconComponent={VisibilityIcon} onClick={this.handleHideClick} />
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className='status__action-bar'>
|
||||
<div className='status__action-bar__button-wrapper'>
|
||||
<IconButton
|
||||
className='status__action-bar-button'
|
||||
title={replyTitle}
|
||||
|
@ -329,12 +332,20 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
counter={showReplyCount ? status.get('replies_count') : undefined}
|
||||
obfuscateCount
|
||||
/>
|
||||
</div>
|
||||
<div className='status__action-bar__button-wrapper'>
|
||||
<IconButton className={classNames('status__action-bar-button', { reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} title={reblogTitle} icon={reblogIcon} iconComponent={reblogIconComponent} onClick={this.handleReblogClick} counter={withCounters ? status.get('reblogs_count') : undefined} />
|
||||
</div>
|
||||
<div className='status__action-bar__button-wrapper'>
|
||||
<IconButton className='status__action-bar-button star-icon' animate active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' iconComponent={status.get('favourited') ? StarIcon : StarBorderIcon} onClick={this.handleFavouriteClick} counter={withCounters ? status.get('favourites_count') : undefined} />
|
||||
</div>
|
||||
<div className='status__action-bar__button-wrapper'>
|
||||
<IconButton className='status__action-bar-button bookmark-icon' disabled={!signedIn} active={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' iconComponent={status.get('bookmarked') ? BookmarkIcon : BookmarkBorderIcon} onClick={this.handleBookmarkClick} />
|
||||
</div>
|
||||
|
||||
{filterButton}
|
||||
|
||||
<div className='status__action-bar__button-wrapper'>
|
||||
<DropdownMenuContainer
|
||||
scrollKey={scrollKey}
|
||||
status={status}
|
||||
|
@ -345,6 +356,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
direction='right'
|
||||
ariaLabel={intl.formatMessage(messages.more)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className='status__action-bar-spacer' />
|
||||
<a href={status.get('url')} className='status__relative-time' target='_blank' rel='noopener'>
|
||||
|
|
|
@ -299,6 +299,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
&--with-counter {
|
||||
padding-inline-end: 4px;
|
||||
}
|
||||
|
||||
&__counter {
|
||||
display: block;
|
||||
width: auto;
|
||||
|
@ -1516,6 +1520,15 @@ body > [data-popper-placement] {
|
|||
}
|
||||
}
|
||||
|
||||
&__action-bar__button-wrapper {
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
|
||||
&:last-child {
|
||||
flex-grow: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&--first-in-thread {
|
||||
border-top: 1px solid var(--background-border-color);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue