From e31a36c41d55e01f1df203f6091f4c9656d8775a Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Fri, 21 Mar 2025 14:02:04 +0400 Subject: [PATCH] Paid Reaction Modal: Fix send as peer menu (#5704) --- .../PaidReactionModal.module.scss | 22 ++++++++++++++++--- .../modals/paidReaction/PaidReactionModal.tsx | 3 ++- .../paidReaction/StarSlider.module.scss | 2 +- .../modals/paidReaction/StarSlider.tsx | 5 +++-- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/components/modals/paidReaction/PaidReactionModal.module.scss b/src/components/modals/paidReaction/PaidReactionModal.module.scss index 7553eea83..45a96663e 100644 --- a/src/components/modals/paidReaction/PaidReactionModal.module.scss +++ b/src/components/modals/paidReaction/PaidReactionModal.module.scss @@ -49,7 +49,12 @@ margin-right: 0 !important; } +.sendAsPeerButtonAvatar { + pointer-events: none; +} + .sendAsPeerMenuButton { + transition: background-color 0.15s; margin-right: 0.25rem; border-radius: 1.5rem; padding: 0.25rem !important; @@ -57,9 +62,10 @@ height: auto !important; background-color: var(--color-background-secondary) !important; - :active, - :hover { - background-color: var(--color-interactive-element-hover) !important; + &:global(.active), + &:active, + &:hover { + background-color: rgba(var(--color-text-secondary-rgb), 0.15) !important; } } @@ -69,7 +75,17 @@ } .sendAsPeerMenuBubble { + max-height: 15rem; + overflow-y: auto !important; + right: auto !important; + left: 50%; + transform: translateX(-50%) scale(0.85) !important; + transform-origin: center !important; max-width: 16rem; + + &:global(.open) { + transform: translateX(-50%) scale(1) !important; + } } .sendAsPeerMenu { diff --git a/src/components/modals/paidReaction/PaidReactionModal.tsx b/src/components/modals/paidReaction/PaidReactionModal.tsx index ebdf02860..57070a2b6 100644 --- a/src/components/modals/paidReaction/PaidReactionModal.tsx +++ b/src/components/modals/paidReaction/PaidReactionModal.tsx @@ -211,6 +211,7 @@ const PaidReactionModal = ({ ariaLabel={lang('AccDescrOpenMenu2')} > @@ -226,7 +227,7 @@ const PaidReactionModal = ({ if (!canChangeSendAsPeer) return undefined; return ( -
- +
+ +