fix(gift): cabinet GiftResult shows claim link for directed gifts + review fixes

Pairs with the backend cabinet-unification. Directed cabinet gifts now stay
PAID/claimable, so the buyer's GiftResult must show the share link for them too.

- GiftResult.tsx: render the share state (and stop polling) for ANY claimable
  paid gift via is_claimable, not just is_code_only.
- api/gift.ts: GiftPurchaseStatus gains is_claimable.
- GiftClaim.tsx: explicit failed/expired state (was falling into the 'almost
  ready' spinner forever).
- PurchaseSuccess.tsx: a paid gift is always claimable — stop polling and show
  the share block on `paid && is_gift` (don't gate on is_claimable, which could
  strand the buyer on a spinner).
- i18n: landing.giftClaim.failedTitle/failedDesc in ru/en/zh/fa.
This commit is contained in:
c0mrade
2026-06-03 14:34:19 +03:00
parent db31d395cd
commit b9521f1aa7
8 changed files with 43 additions and 17 deletions

View File

@@ -4850,7 +4850,9 @@
"activateTelegram": "Activate in Telegram",
"activateWeb": "Activate by email",
"emailLabel": "Your email",
"claimNow": "Get my gift"
"claimNow": "Get my gift",
"failedTitle": "Gift unavailable",
"failedDesc": "The payment for this gift did not go through, so it cannot be activated."
},
"giftLink": {
"shareText": "I have a gift for you! Activate it here:",

View File

@@ -4510,7 +4510,9 @@
"activateTelegram": "فعال‌سازی در تلگرام",
"activateWeb": "فعال‌سازی با ایمیل",
"emailLabel": "ایمیل شما",
"claimNow": "دریافت هدیه"
"claimNow": "دریافت هدیه",
"failedTitle": "هدیه در دسترس نیست",
"failedDesc": "پرداخت این هدیه انجام نشد، بنابراین قابل فعال‌سازی نیست."
},
"giftLink": {
"shareText": "یک هدیه برای شما دارم! اینجا فعال کنید:",

View File

@@ -5405,7 +5405,9 @@
"activateTelegram": "Активировать в Telegram",
"activateWeb": "Активировать по почте",
"emailLabel": "Ваш email",
"claimNow": "Получить подарок"
"claimNow": "Получить подарок",
"failedTitle": "Подарок недоступен",
"failedDesc": "Оплата подарка не прошла, поэтому активировать его нельзя."
},
"giftLink": {
"shareText": "Дарю вам подписку! Активируйте здесь:",

View File

@@ -4509,7 +4509,9 @@
"activateTelegram": "在 Telegram 中激活",
"activateWeb": "通过邮箱激活",
"emailLabel": "您的邮箱",
"claimNow": "领取礼物"
"claimNow": "领取礼物",
"failedTitle": "礼物不可用",
"failedDesc": "此礼物的付款未成功,无法激活。"
},
"giftLink": {
"shareText": "我送您一份订阅!在此激活:",