feat: UNO-style table, social hub, cosmetics, speed mode, store IAB

Game table & play
- UNO-style restyle: suit-aware bolder cards (+xl size), pulsing playable glow,
  big "YOUR TURN" pill, active-seat ring, trick-win particle burst, round
  confetti, match coin-rain.
- Per-league turn time via turnMsForStake: 15s starter/AI, 10s pro, 7s expert;
  mirrored server-side in GameRoom.TurnMs.
- Speed (Blitz) mode for vs-AI/private: 5s turns, race to 5, ~halved pacing.
- Matchmaking waits ~15s (randomized 12-18s) then fills bots; elapsed timer + hint.

Rewards / gifts
- Richer post-match modal (floating coins, XP bar), celebration overlay reveals
  the unlocked sticker pack, boosted daily rewards (client+server synced),
  themed 7-day daily with special day-7.

Social
- Public profile modal (identity, stats, achievement board) from leaderboard /
  friends / discover / end-of-game roster; rate-limited add-friend (10/hour).
- Social hub: Friends / Discover (player search + suggestions) / Messages inbox.
- Profile gender (shown in finder/profile) + social links with public/friends/
  hidden visibility, enforced server-side.

Cosmetics
- Distinct card backs: per-design pattern families (stripes/argyle/grid/dots/
  rays/scales/crosshatch/royal/filigree/gem) + luxury motifs (lib/cardBack.ts),
  consistent on table/shop/profile; +Peacock/Rose-Gold backs.
- Purchasable titles (shop Titles section); title shown under the seat on the
  table and in discover/public profile.
- 10 new sticker packs (banter/kol-kol, Persian trends, court cards, moods).
- Persistent level+XP bar on Home and every inner screen.

Payments
- Buy-coins gateway opens in a new tab (no SPA dead-end) + focus refresh.
- Store IAB scaffolding: Cafe Bazaar deep-link purchase + redirect-token capture,
  Myket native-bridge contract, server-side IabService.Verify for both stores,
  config-driven via Iab__* env. POST /api/coins/iab/verify (JWT).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-06 18:39:24 +03:30
parent e450a6a2ed
commit cb27a16dc1
49 changed files with 3438 additions and 592 deletions
+102
View File
@@ -74,6 +74,14 @@ const fa: Dict = {
"turn.you": "نوبت شماست",
"turn.other": "نوبت {name}",
"keys.title": "میان‌برهای صفحه‌کلید",
"keys.play": "بازی کردن کارت",
"keys.first": "اولین کارت مجاز",
"keys.trump": "انتخاب حکم",
"keys.mute": "قطع صدا",
"keys.forfeit": "تسلیم",
"keys.quit": "خروج",
"trick.wins": "{name} دست را برد",
"round.over": "پایان دست",
@@ -95,6 +103,9 @@ const fa: Dict = {
"menu.vsComputer": "بازی با کامپیوتر",
"menu.vsComputerDesc": "تمرین با حریف‌های هوشمند",
"speed.label": "سریع",
"speed.normal": "عادی",
"speed.desc": "حالت سریع: نوبت‌های کوتاه‌تر و بازی برق‌آسا",
"menu.online": "بازی آنلاین",
"menu.onlineDesc": "با دوستان یا بازیکن‌های واقعی",
"menu.profile": "پروفایل",
@@ -123,6 +134,8 @@ const fa: Dict = {
"buy.note": "پرداخت امن — درگاه پرداخت ایرانی به‌زودی اضافه می‌شود",
"buy.toman": "تومان",
"buy.bonus": "هدیه",
"buy.redirecting": "صفحهٔ پرداخت در تب جدید باز شد. پس از پرداخت، سکه‌ها به‌صورت خودکار اضافه می‌شوند.",
"buy.failed": "پرداخت در دسترس نیست. بعداً دوباره تلاش کنید.",
"buy.popular": "محبوب",
"buy.best": "بهترین",
"buy.starter": "شروع",
@@ -146,6 +159,10 @@ const fa: Dict = {
"profile.kots": "کُت‌ها",
"profile.streak": "بهترین نوار",
"profile.achievements": "دستاوردها",
"profile.sendRequest": "افزودن دوست",
"profile.requestSent": "درخواست ارسال شد",
"profile.alreadyFriend": "دوست شماست",
"profile.memberSince": "عضو از",
"profile.editName": "ویرایش نام",
"profile.chooseAvatar": "انتخاب آواتار",
@@ -162,6 +179,23 @@ const fa: Dict = {
"friends.remove": "حذف",
"friends.empty": "هنوز دوستی ندارید",
"social.title": "اجتماعی",
"social.tabFriends": "دوستان",
"social.tabDiscover": "یافتن",
"social.tabMessages": "پیام‌ها",
"discover.searchPlaceholder": "جستجوی بازیکن با نام…",
"discover.results": "نتایج جستجو",
"discover.suggested": "بازیکنان پیشنهادی",
"discover.noResults": "بازیکنی پیدا نشد",
"discover.friend": "دوست",
"messages.empty": "هنوز گفتگویی ندارید",
"messages.you": "شما",
"time.now": "همین حالا",
"time.min": "{n} دقیقه پیش",
"time.hour": "{n} ساعت پیش",
"time.day": "{n} روز پیش",
"common.retry": "تلاش دوباره",
"lobby.title": "بازی آنلاین",
"lobby.createRoom": "ساخت اتاق خصوصی",
"lobby.createDesc": "هم‌تیمی و حریف‌ها را خودتان انتخاب کنید",
@@ -186,6 +220,7 @@ const fa: Dict = {
"mm.searching": "در حال یافتن حریف…",
"mm.found": "بازیکنان پیدا شدند!",
"mm.ready": "آماده شروع",
"mm.fillHint": "اگر بازیکن آنلاینی پیدا نشود، ربات‌ها جایگزین می‌شوند",
"mm.cancel": "لغو",
"mm.start": "ورود به بازی",
@@ -195,6 +230,7 @@ const fa: Dict = {
"shop.title": "فروشگاه",
"shop.buy": "خرید",
"shop.owned": "موجود",
"shop.luxury": "ویژه",
"shop.avatars": "آواتارها",
"shop.themes": "تم‌ها",
"shop.notEnough": "سکه کافی نیست",
@@ -229,6 +265,7 @@ const fa: Dict = {
"reward.promoted": "ارتقای لیگ!",
"reward.demoted": "سقوط لیگ",
"reward.newAchievement": "دستاورد جدید",
"reward.stickerUnlocked": "بستهٔ استیکر باز شد",
"reward.continue": "ادامه",
"reward.win": "بردید! 🏆",
"reward.lose": "باختید",
@@ -238,6 +275,7 @@ const fa: Dict = {
"daily.claim": "دریافت",
"daily.claimed": "دریافت شد",
"daily.come": "فردا برگردید",
"daily.special": "پاداش ویژه",
"rank.label": "لیگ",
@@ -264,6 +302,8 @@ const fa: Dict = {
"shop.cardstyles": "طرح کارت‌ها",
"shop.reactions": "بسته شکلک‌ها",
"shop.stickers": "بسته استیکرها",
"shop.titles": "عناوین",
"shop.titlesHint": "عنوان شما زیر نامتان در بازی و لیست‌ها نمایش داده می‌شود",
"shop.xp": "امتیاز تجربه (XP)",
"shop.xpHint": "افزایش سریع سطح — XP گران است",
"shop.includes": "شامل",
@@ -281,6 +321,17 @@ const fa: Dict = {
"profile.cardFront": "روی کارت",
"profile.cardBack": "پشت کارت",
"profile.social": "اجتماعی و ارتباط",
"profile.gender": "جنسیت",
"profile.genderNone": "نامشخص",
"profile.socialLinks": "شبکه‌های اجتماعی",
"profile.socialsVisibility": "نمایش شبکه‌ها به",
"profile.visPublic": "همه",
"profile.visFriends": "دوستان",
"profile.visHidden": "هیچ‌کس",
"profile.socialsHint": "می‌توانید نمایش پیج‌هایتان را عمومی، فقط برای دوستان یا غیرفعال کنید.",
"profile.saveLinks": "ذخیره شبکه‌ها",
"profile.saved": "ذخیره شد",
"shop.cardfronts": "روی کارت‌ها",
"shop.cardbacks": "پشت کارت‌ها",
};
@@ -346,6 +397,14 @@ const en: Dict = {
"turn.you": "Your turn",
"turn.other": "{name}'s turn",
"keys.title": "Keyboard shortcuts",
"keys.play": "Play a card",
"keys.first": "First legal card",
"keys.trump": "Choose trump",
"keys.mute": "Mute",
"keys.forfeit": "Forfeit",
"keys.quit": "Quit",
"trick.wins": "{name} wins the trick",
"round.over": "Round over",
@@ -367,6 +426,9 @@ const en: Dict = {
"menu.vsComputer": "Play vs Computer",
"menu.vsComputerDesc": "Practice against smart bots",
"speed.label": "Speed",
"speed.normal": "Normal",
"speed.desc": "Blitz mode: short turns, lightning-fast match",
"menu.online": "Play Online",
"menu.onlineDesc": "With friends or real players",
"menu.profile": "Profile",
@@ -395,6 +457,8 @@ const en: Dict = {
"buy.note": "Secure payment — Iranian gateway coming soon",
"buy.toman": "Toman",
"buy.bonus": "bonus",
"buy.redirecting": "Payment opened in a new tab. Your coins will be added automatically once you pay.",
"buy.failed": "Payment unavailable. Please try again later.",
"buy.popular": "Popular",
"buy.best": "Best value",
"buy.starter": "Starter",
@@ -418,6 +482,10 @@ const en: Dict = {
"profile.kots": "Kots",
"profile.streak": "Best streak",
"profile.achievements": "Achievements",
"profile.sendRequest": "Add friend",
"profile.requestSent": "Request sent",
"profile.alreadyFriend": "Your friend",
"profile.memberSince": "Member since",
"profile.editName": "Edit name",
"profile.chooseAvatar": "Choose avatar",
@@ -434,6 +502,23 @@ const en: Dict = {
"friends.remove": "Remove",
"friends.empty": "No friends yet",
"social.title": "Social",
"social.tabFriends": "Friends",
"social.tabDiscover": "Discover",
"social.tabMessages": "Messages",
"discover.searchPlaceholder": "Search players by name…",
"discover.results": "Search results",
"discover.suggested": "Suggested players",
"discover.noResults": "No players found",
"discover.friend": "Friend",
"messages.empty": "No conversations yet",
"messages.you": "You",
"time.now": "now",
"time.min": "{n}m ago",
"time.hour": "{n}h ago",
"time.day": "{n}d ago",
"common.retry": "Retry",
"lobby.title": "Play Online",
"lobby.createRoom": "Create private room",
"lobby.createDesc": "Choose your partner and opponents",
@@ -458,6 +543,7 @@ const en: Dict = {
"mm.searching": "Searching for opponents…",
"mm.found": "Players found!",
"mm.ready": "Ready to start",
"mm.fillHint": "If no online players are found, bots will fill in",
"mm.cancel": "Cancel",
"mm.start": "Enter game",
@@ -467,6 +553,7 @@ const en: Dict = {
"shop.title": "Shop",
"shop.buy": "Buy",
"shop.owned": "Owned",
"shop.luxury": "Luxury",
"shop.avatars": "Avatars",
"shop.themes": "Themes",
"shop.notEnough": "Not enough coins",
@@ -501,6 +588,7 @@ const en: Dict = {
"reward.promoted": "Promoted!",
"reward.demoted": "Demoted",
"reward.newAchievement": "New achievement",
"reward.stickerUnlocked": "Sticker pack unlocked",
"reward.continue": "Continue",
"reward.win": "You won! 🏆",
"reward.lose": "You lost",
@@ -510,6 +598,7 @@ const en: Dict = {
"daily.claim": "Claim",
"daily.claimed": "Claimed",
"daily.come": "Come back tomorrow",
"daily.special": "Special Reward",
"rank.label": "League",
@@ -536,6 +625,8 @@ const en: Dict = {
"shop.cardstyles": "Card styles",
"shop.reactions": "Reaction packs",
"shop.stickers": "Sticker packs",
"shop.titles": "Titles",
"shop.titlesHint": "Your title shows under your name in games & lists",
"shop.xp": "XP packs",
"shop.xpHint": "Level up faster — XP is expensive",
"shop.includes": "Includes",
@@ -553,6 +644,17 @@ const en: Dict = {
"profile.cardFront": "Card front",
"profile.cardBack": "Card back",
"profile.social": "Social & contact",
"profile.gender": "Gender",
"profile.genderNone": "Unspecified",
"profile.socialLinks": "Social media",
"profile.socialsVisibility": "Show socials to",
"profile.visPublic": "Everyone",
"profile.visFriends": "Friends",
"profile.visHidden": "Nobody",
"profile.socialsHint": "Choose who can see your social pages: everyone, only friends, or nobody.",
"profile.saveLinks": "Save links",
"profile.saved": "Saved",
"shop.cardfronts": "Card fronts",
"shop.cardbacks": "Card backs",
};