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:
@@ -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 });
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user