mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
feat(gift): transferable gift claim — buyer share link + recipient claim page
Pairs with the bot's unified claimable-gift model. A landing gift now lands on the buyer's success page as PAID/claimable (deferred) instead of being delivered to a phantom recipient, so the buyer gets a transferable link to forward and the recipient claims it themselves — guaranteeing delivery regardless of channel or whether they pre-exist. - api/landings.ts: PurchaseStatus gains is_claimable/claim_url/bot_claim_link; add GiftClaimResult + getGiftClaim()/claimGift(). - PurchaseSuccess.tsx: GiftLinkShareState — buyer sees the claim link + Telegram link + copy-message when a gift is PAID/claimable; stop polling for that state (it stays PAID until claimed) instead of spinning forever. - GiftClaim.tsx (new) + /buy/gift/:token route: public recipient claim page with a Telegram arm (GIFT_ deep link) and a web/email arm (binds + one-click login), polling while the payment settles, idempotent "already claimed" + 404 states. - i18n: landing.giftClaim.* / landing.giftLink.* in ru/en/zh/fa.
This commit is contained in:
@@ -4834,6 +4834,34 @@
|
||||
"merging": "Merging..."
|
||||
},
|
||||
"landing": {
|
||||
"giftClaim": {
|
||||
"title": "You have a gift!",
|
||||
"error": "Could not activate the gift.",
|
||||
"notFoundTitle": "Gift not found",
|
||||
"notFoundDesc": "This gift link is invalid or no longer available.",
|
||||
"alreadyTitle": "Gift already activated",
|
||||
"alreadyDesc": "This gift has already been claimed.",
|
||||
"successTitle": "Gift activated!",
|
||||
"connectDesc": "Use this link to connect:",
|
||||
"copyLink": "Copy link",
|
||||
"pendingTitle": "Almost ready…",
|
||||
"pendingDesc": "The payment is still being confirmed. This page will update automatically.",
|
||||
"replaceWarning": "You already have a subscription — activating this gift will replace it.",
|
||||
"activateTelegram": "Activate in Telegram",
|
||||
"activateWeb": "Activate by email",
|
||||
"emailLabel": "Your email",
|
||||
"claimNow": "Get my gift"
|
||||
},
|
||||
"giftLink": {
|
||||
"shareText": "I have a gift for you! Activate it here:",
|
||||
"viaTelegram": "Telegram:",
|
||||
"title": "Gift is ready!",
|
||||
"subtitle": "Send this link to whoever you want to receive the gift — they activate it themselves.",
|
||||
"linkLabel": "Gift link",
|
||||
"telegramLabel": "Telegram link",
|
||||
"alsoSent": "We also emailed it to {{contact}}.",
|
||||
"copyMessage": "Copy message"
|
||||
},
|
||||
"notFound": "Page not found",
|
||||
"forMe": "For me",
|
||||
"asGift": "As a gift",
|
||||
|
||||
Reference in New Issue
Block a user