From be3051041af7b3660525e0b0c8f900a4ab3ae6d3 Mon Sep 17 00:00:00 2001 From: zubiden <19638254+zubiden@users.noreply.github.com> Date: Tue, 21 Jan 2025 20:09:49 +0100 Subject: [PATCH] Star Gift: Fix incorrect text after upgrading (#5521) --- src/components/middle/ActionMessage.tsx | 16 ++++++++-------- .../modals/common/TableInfoModal.module.scss | 1 + .../modals/gift/GiftComposer.module.scss | 6 ++++-- .../modals/gift/info/GiftInfoModal.tsx | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/components/middle/ActionMessage.tsx b/src/components/middle/ActionMessage.tsx index 691261b4f..e47b8e7a6 100644 --- a/src/components/middle/ActionMessage.tsx +++ b/src/components/middle/ActionMessage.tsx @@ -441,6 +441,14 @@ const ActionMessage: FC = ({ } const amountToConvert = starGift?.starsToConvert; + if (starGift.isSaved) { + return lang('ActionStarGiftDisplaying'); + } + + if (starGift.isUpgraded) { + return lang('ActionStarGiftUpgraded'); + } + if (message.isOutgoing) { if (amountToConvert) { return lang('ActionStarGiftOutDescription', { @@ -456,14 +464,6 @@ const ActionMessage: FC = ({ } } - if (starGift.isSaved) { - return lang('ActionStarGiftDisplaying'); - } - - if (starGift.isUpgraded) { - return lang('ActionStarGiftUpgraded'); - } - if (starGift.isConverted) { return message.isOutgoing ? lang('GiftInfoDescriptionOutConverted', { diff --git a/src/components/modals/common/TableInfoModal.module.scss b/src/components/modals/common/TableInfoModal.module.scss index a04576170..f7a5dc5ce 100644 --- a/src/components/modals/common/TableInfoModal.module.scss +++ b/src/components/modals/common/TableInfoModal.module.scss @@ -42,6 +42,7 @@ padding: 0.25rem 0.5rem; position: relative; min-height: 2.5rem; + font-size: 0.9375rem; } .fullWidth { diff --git a/src/components/modals/gift/GiftComposer.module.scss b/src/components/modals/gift/GiftComposer.module.scss index 92ce8f90a..8cde3845e 100644 --- a/src/components/modals/gift/GiftComposer.module.scss +++ b/src/components/modals/gift/GiftComposer.module.scss @@ -70,13 +70,15 @@ place-content: center; height: 22.5rem; margin-bottom: 0; + margin-top: 0.75rem; + + padding: 0.5rem; position: relative; overflow: hidden; flex: 0 0 auto; - border-bottom-right-radius: var(--border-radius-default); - border-bottom-left-radius: var(--border-radius-default); + border-radius: var(--border-radius-default); background-color: var(--theme-background-color); background-position: center; diff --git a/src/components/modals/gift/info/GiftInfoModal.tsx b/src/components/modals/gift/info/GiftInfoModal.tsx index 2d5c24156..a77ed8256 100644 --- a/src/components/modals/gift/info/GiftInfoModal.tsx +++ b/src/components/modals/gift/info/GiftInfoModal.tsx @@ -306,7 +306,7 @@ const GiftInfoModal = ({ ]); } - if (gift.upgradeStars) { + if (gift.upgradeStars && !userGift?.upgradeMsgId) { tableData.push([ lang('GiftInfoStatus'),