Turn timer + auto-play, disconnect/reconnect, cosmetics, queue & paid plan

- Turn timer (20s) for play/trump; system auto-plays a smart move on timeout
- Disconnect handling (mock): wait-for-return countdown, system covers turns
- Cosmetics: titles, card-back styles, custom profile-image upload, badges;
  pickers in Profile; shop sells card styles; reward modal shows new titles
- Paid plan (pro): free players queue when server busy, pro skips; upgrade flow
- OnlineService extended (upgradePlan, richer profile patch); mock implements
  queue + plans; gamification adds TITLES + CARD_STYLES

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-04 10:49:54 +03:30
parent 5776036d78
commit 13ec0d4300
16 changed files with 682 additions and 61 deletions
+9 -1
View File
@@ -21,7 +21,10 @@ interface SessionStore {
signInGoogle: () => Promise<void>;
signOut: () => Promise<void>;
updateProfile: (patch: Partial<Pick<UserProfile, "displayName" | "avatar">>) => Promise<void>;
updateProfile: (
patch: Partial<Pick<UserProfile, "displayName" | "avatar" | "avatarImage" | "title" | "cardStyle">>
) => Promise<void>;
upgradePlan: () => Promise<void>;
}
export const useSessionStore = create<SessionStore>((set, get) => ({
@@ -84,4 +87,9 @@ export const useSessionStore = create<SessionStore>((set, get) => ({
const profile = await getService().updateProfile(patch);
set({ profile });
},
upgradePlan: async () => {
const profile = await getService().upgradePlan();
set({ profile });
},
}));