Fix boost menu bug
This commit is contained in:
parent
92a4f502a0
commit
38a13b07c5
|
@ -538,7 +538,7 @@ function Status({
|
|||
confirmLabel={
|
||||
<>
|
||||
<Icon icon="rocket" />
|
||||
<span>Unboost?</span>
|
||||
<span>{reblogged ? 'Unboost?' : 'Boost to everyone?'}</span>
|
||||
</>
|
||||
}
|
||||
menuFooter={
|
||||
|
@ -1239,19 +1239,25 @@ function Status({
|
|||
disabled={!canBoost}
|
||||
/>
|
||||
</div> */}
|
||||
<Menu
|
||||
portal={{
|
||||
target:
|
||||
document.querySelector('.status-deck') || document.body,
|
||||
}}
|
||||
align="start"
|
||||
gap={4}
|
||||
overflow="auto"
|
||||
viewScroll="close"
|
||||
boundingBoxPadding="8 8 8 8"
|
||||
shift={-8}
|
||||
menuClassName="menu-emphasized"
|
||||
menuButton={({ open }) => (
|
||||
<MenuConfirm
|
||||
disabled={!canBoost}
|
||||
onClick={confirmBoostStatus}
|
||||
confirmLabel={
|
||||
<>
|
||||
<Icon icon="rocket" />
|
||||
<span>{reblogged ? 'Unboost?' : 'Boost to everyone?'}</span>
|
||||
</>
|
||||
}
|
||||
menuFooter={
|
||||
mediaNoDesc &&
|
||||
!reblogged && (
|
||||
<div class="footer">
|
||||
<Icon icon="alert" />
|
||||
Some media have no descriptions.
|
||||
</div>
|
||||
)
|
||||
}
|
||||
>
|
||||
<div class="action has-count">
|
||||
<StatusButton
|
||||
checked={reblogged}
|
||||
|
@ -1261,22 +1267,10 @@ function Status({
|
|||
icon="rocket"
|
||||
count={reblogsCount}
|
||||
// onClick={boostStatus}
|
||||
disabled={open || !canBoost}
|
||||
disabled={!canBoost}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
>
|
||||
<MenuItem onClick={confirmBoostStatus}>
|
||||
<Icon icon="rocket" />
|
||||
<span>Boost to everyone?</span>
|
||||
</MenuItem>
|
||||
{mediaNoDesc && (
|
||||
<div class="footer">
|
||||
<Icon icon="alert" />
|
||||
Some media have no descriptions.
|
||||
</div>
|
||||
)}
|
||||
</Menu>
|
||||
</MenuConfirm>
|
||||
<div class="action has-count">
|
||||
<StatusButton
|
||||
checked={favourited}
|
||||
|
|
Loading…
Reference in a new issue