Commit Graph

8 Commits

Author SHA1 Message Date
root
058649013d Fix login: same-origin proxy + minimal api.js + без retry/timeout
- api.js полностью переписан: simple fetch с credentials:'include', без mode:cors
- emailLogin: без 150мс паузы, без retry — same-origin не висит
- nginx: /api/* → backend через тот же домен (убирает cross-subdomain)
- backend cookie: SameSite=Lax, host-only
2026-08-21 11:04:11 +00:00
root
8fce24104d Fix Safari: Connection:close + SameSite=None + cache:no-store + 150ms delay
Анализ Grok: Safari зависает на ответе fetch после POST с Set-Cookie из-за keep-alive/HTTP2 reuse.
- backend Login/Register: Connection: close, Cache-Control: no-store
- backend cookie: SameSite=None (cross-subdomain в Safari)
- frontend api(): cache:'no-store', mode:'cors', timeout 20s
- frontend emailLogin: 150ms пауза после login перед следующим fetch
2026-08-21 10:57:09 +00:00
root
d44eb2be8d Fix: только cookie auth (без Authorization) — все запросы без preflight
- api.js: убрал Authorization header для всех методов (cookie достаточно)
- убрал refresh block (cookie живёт дольше)
- profile.save: явный feedback ("⏳ Сохраняю..." → "✓ Сохранено") + try/catch вокруг TG_APP.haptic
2026-08-20 22:04:27 +00:00
root
fd8f6b38d0 Min fix: credentials:'include' + Authorization только для мутаций
GET использует cookie (без preflight), POST/PUT/DELETE — Authorization Bearer
2026-08-20 21:56:02 +00:00
root
7a27b2cf3f Map: 2GIS tiles + places (бары/рестораны)
- L.tileLayer 2GIS
- PlacesApi.nearby() в client
- Кнопка 'Показать/Скрыть бары'
- Маркеры баров с эмодзи (🍺🍽️☕🎉)
- Список под картой (карточки)
- Invite to place: отправка предложения в чат
- 2GIS deeplink в сообщении
2026-08-20 21:12:05 +00:00
root
31c53cd8d5 Fix: leaflet.js local, consent status check, OSM direct tile URL
- vendor/leaflet.js (no more CDN dependency for JS)
- direct tile.openstreetmap.org (was {s}.tile)
- backend GET /api/v1/auth/consents (check if all accepted)
- frontend ConsentApi.status() before showing overlay
- only show overlay once
2026-08-20 18:43:19 +00:00
root
cb05669c7c Fix auth: backend returns Access/Refresh (CamelCase), JS expected access/refresh
Store.save() now handles both cases. Refresh endpoint uses 'Refresh' key.
This was causing /me 401 right after register.
2026-08-20 18:36:41 +00:00
root
21d281a1c6 Telegram WebApp: Mini App with map, chats, profile, reviews
- index.html with bottom tabbar (Map/Chats/Profile/Settings)
- Telegram WebApp SDK auth via /api/v1/auth/telegram
- Consent gate on first login (4 checkboxes)
- Map view with Leaflet (OSM) + nearby users + radius selector
- Chat list + single chat with WebSocket realtime
- Profile editing (drinks, activities, purposes)
- Review screen with stars + anonymous toggle
- User reviews list with stats
- User profile (public) with rating, write/block/report
- Legal pages (TERMS / PRIVACY / DISCLAIMER)
2026-08-20 17:43:16 +00:00