Gifts: Small fixes (#5139)
This commit is contained in:
parent
01dc204fa7
commit
3fae1b4242
@ -743,7 +743,7 @@ export default memo(withGlobal<OwnProps>(
|
|||||||
const userFullInfo = isPrivate ? selectUserFullInfo(global, chatId) : undefined;
|
const userFullInfo = isPrivate ? selectUserFullInfo(global, chatId) : undefined;
|
||||||
const chatFullInfo = !isPrivate ? selectChatFullInfo(global, chatId) : undefined;
|
const chatFullInfo = !isPrivate ? selectChatFullInfo(global, chatId) : undefined;
|
||||||
const fullInfo = userFullInfo || chatFullInfo;
|
const fullInfo = userFullInfo || chatFullInfo;
|
||||||
const canGift = !selectIsPremiumPurchaseBlocked(global) && !isChatWithSelf;
|
const canGift = !selectIsPremiumPurchaseBlocked(global) && !isChatWithSelf && isPrivate;
|
||||||
|
|
||||||
const topic = selectTopic(global, chatId, threadId);
|
const topic = selectTopic(global, chatId, threadId);
|
||||||
const canCreateTopic = chat.isForum && (
|
const canCreateTopic = chat.isForum && (
|
||||||
|
|||||||
@ -26,6 +26,8 @@
|
|||||||
background-color: var(--color-borders);
|
background-color: var(--color-borders);
|
||||||
gap: 1px;
|
gap: 1px;
|
||||||
|
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -67,9 +67,6 @@ function GiftItemPremium({
|
|||||||
role="button"
|
role="button"
|
||||||
onClick={handleGiftClick}
|
onClick={handleGiftClick}
|
||||||
>
|
>
|
||||||
{Boolean(discount) && (
|
|
||||||
<GiftRibbon color="red" text={lang('GiftDiscount', { percent: discount })} />
|
|
||||||
)}
|
|
||||||
<AnimatedIconFromSticker
|
<AnimatedIconFromSticker
|
||||||
sticker={sticker}
|
sticker={sticker}
|
||||||
play={canPlayAnimatedEmojis}
|
play={canPlayAnimatedEmojis}
|
||||||
@ -85,6 +82,9 @@ function GiftItemPremium({
|
|||||||
<Button className={styles.buy} nonInteractive size="tiny" pill fluid>
|
<Button className={styles.buy} nonInteractive size="tiny" pill fluid>
|
||||||
{formatCurrencyAsString(amount, currency)}
|
{formatCurrencyAsString(amount, currency)}
|
||||||
</Button>
|
</Button>
|
||||||
|
{Boolean(discount) && (
|
||||||
|
<GiftRibbon color="red" text={lang('GiftDiscount', { percent: discount })} />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,8 +57,6 @@ function GiftItemStar({ sticker, gift, onClick }: OwnProps & StateProps) {
|
|||||||
role="button"
|
role="button"
|
||||||
onClick={handleGiftClick}
|
onClick={handleGiftClick}
|
||||||
>
|
>
|
||||||
{isLimited && !isSoldOut && <GiftRibbon color="blue" text={lang('GiftLimited')} />}
|
|
||||||
{isSoldOut && <GiftRibbon color="red" text={lang('GiftSoldOut')} />}
|
|
||||||
<AnimatedIconFromSticker
|
<AnimatedIconFromSticker
|
||||||
sticker={sticker}
|
sticker={sticker}
|
||||||
noLoop
|
noLoop
|
||||||
@ -71,6 +69,8 @@ function GiftItemStar({ sticker, gift, onClick }: OwnProps & StateProps) {
|
|||||||
{stars}
|
{stars}
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
|
{isLimited && !isSoldOut && <GiftRibbon color="blue" text={lang('GiftLimited')} />}
|
||||||
|
{isSoldOut && <GiftRibbon color="red" text={lang('GiftSoldOut')} />}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user