Implement god mode toggle in NavTop

Featurekamo-internal
Ya
24 Oktoba 2025, 21:01 UTC
Mwandishi
snadjafinia
Ahadi ya
f02f3a8

Backend changes (app/api/user-info/route.ts): - Read GD field from Redis session data - Map to isGod in API response Frontend changes (app/hooks/useUserInfo.tsx): - Add isGod field to UserInfo interface - Add getIsGod() method to hook - Export getIsGod for components UI changes (app/components/NavTop.tsx): - Add god mode toggle (purple theme) - Only visible to users with isGod permission (GD=true) - Toggle state stored in localStorage - Independent on/off control for god mode Flow: 1. User has is_god=true in database 2. SecurityService stores GD=true in Redis session 3. /api/user-info returns isGod=true 4. NavTop shows god mode toggle 5. User can enable/disable god mode (UI state only) Two-level permission: - isGod: Permission to SEE the toggle (from database) - godModeActive: Current UI state (localStorage)

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei