Commit Graph

17 Commits

Author SHA1 Message Date
admin cd25fa35f2 fix(subscription): preselect pay channel before navigation 2026-07-02 11:38:47 +08:00
admin 61796c732f feat(chat): restore image viewer after payment 2026-06-29 16:19:48 +08:00
admin 096978e703 feat(subscription): split vip and topup flows 2026-06-29 14:45:01 +08:00
admin e372d58b4c feat(payment): sync plans and add coins rules 2026-06-29 14:11:50 +08:00
admin 1ebd29d1ed refactor: remove unused subscription plans and router files 2026-06-29 10:56:08 +08:00
admin c8f0827e40 fix(subscription): return chat paywalls after payment 2026-06-25 10:20:13 +08:00
admin 5aa32a4256 fix(chat): redirect guests to auth before image paywall 2026-06-24 18:41:59 +08:00
admin 9ffa30cc03 style: remove markdown bold syntax from code comments
Remove `**...**` emphasis markers from inline comments and JSDoc blocks across
auth and chat components, machine mappers, and quota helpers. These are
plain code comments, not rendered markdown, so the bold syntax was noise.

Files touched:
- src/app/auth/components/auth-screen.tsx
- src/app/chat/components/chat-header.tsx
- src/app/chat/components/chat-screen.tsx
- chat machine mapper / quota helpers

No functional or behavioral changes.
2026-06-16 14:06:31 +08:00
Claude e88a99626d feat(subscription): add VIP subscription page
Add a new /subscription route showing three VIP membership plans (Monthly,
Quarterly, Annual) with a pink→peach banner, per-plan gradient price bars,
a benefits card, a mock activate CTA, and an agreement checkbox.

- New reusable <Checkbox /> in src/app/_components/core for the legal
  agreement toggle
- Hardcoded SUBSCRIPTION_PLANS constant in src/data/constants
- New SubscriptionScreen composed of 7 colocated components (back link,
  user row, banner, plan card, benefits card, CTA button) with CSS
  Modules matching the existing design-token system
- Route registered as protected and reached from /sidebar "Membership"
- Mock CTA: window.alert + router.push(/chat) — no payment calls

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 17:49:15 +08:00
admin 9b28404673 refactor(chat): remove QuotaDialog and related state/effects
Drop the QuotaDialog component invocation in chat-screen along with
its useState/useEffect wiring, and delete the component files. Update
JSDoc in chat-screen and routes to reflect the removed consumer.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 16:24:50 +08:00
admin ca3adb0f5b chore(router): disable router proxy and re-exports by commenting out
Comment out `src/router/index.ts` and `src/router/proxy.ts` to temporarily
disable the Next.js 16 proxy (auth-driven redirects) and router re-exports.
This effectively turns off the centralized route guard logic and stops the
proxy from intercepting requests until further iteration.
2026-06-15 11:50:09 +08:00
admin e3d549d660 fix:splash 界面重定向界面问题 2026-06-11 16:06:36 +08:00
admin a6bc6941d4 refactor(splash): convert Skip to explicit guest login flow
- Splash Skip button now dispatches `AuthGuestLoginSubmitted` instead of
  direct routing, keeping guest auth under the state machine
- Update PWA install dialog copy ("Add to Home Screen") and drop favicon
  entry from manifest icons
- Add debug logging and routing sequence docs to splash-button
2026-06-11 15:58:48 +08:00
admin e0d0e353c0 refactor(auth): remove AuthGate abstraction in favor of useSession
- Drop AuthGate/AuthGateState re-exports from @/lib/auth/nextauth
- Simplify SplashButton by removing skipHref prop and hardcoding ROUTES.chat
- Update comments to reference useSession() (next-auth/react) directly instead of the AuthGate wrapper, since the auth UI gate no longer needs the extra abstraction layer.
2026-06-10 15:48:49 +08:00
admin d70e61f92e refactor(auth): switch to class-based social login and v4 route handler
Migrate from function-based social login helpers (`facebookLogin`, `googleLogin`)
to class-based services (`new FacebookLogin().signIn()`, `new GoogleLogin().signIn()`),
updating call sites in `AuthFacebookPanel` and `SplashButton` with try/catch error
handling. The NextAuth route handler is also refactored to the v4 pattern, importing
pre-built `GET` / `POST` exports from `@/lib/auth/nextauth` instead of constructing
the handler inline with `NextAuth(authOptions)`.
2026-06-10 15:34:52 +08:00
admin 2066934094 refactor(auth): centralize auth routing via proxy and marker cookie 2026-06-10 12:47:47 +08:00
admin 2cba315214 refactor: move ROUTES from @/lib/routes to @/router/routes 2026-06-10 10:53:43 +08:00