Implement god mode toggle in NavTop

Featurekamo-internal
Змішані
24 жовтня 2025 р. о 21:01 UTC
Авторизація
snadjafinia
Про нас
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)

Всі зміни

Як ви бачите відправлення?

Кожен з цих оновлень землі в робочому просторі автоматично. Почати вільний час і дивитися його на тиждень після тижня.

БезкоштовноПерегляд цін