Commit Graph

9 Commits

Author SHA1 Message Date
root
06c8f8b593 Fix: tab switching hangs on iOS Safari
- showView: requestAnimationFrame + мгновенный loader (UI не висит)
- maybeOnboard на старте fire-and-forget (не блокирует init)
- MapView: НЕ запрашивает геолокацию автоматически (только по кнопке)
- MapView: правильно destroy map если container удалён (нет утечки Leaflet)
- invalidateSize() перед setView чтобы тайлы 2GIS догрузились
2026-08-20 21:28:33 +00:00
root
000206426f Map: явный синий маркер 'Я' + invalidateSize + zoom 14 2026-08-20 21:23:01 +00:00
root
4706203de8 Fix: onboarding overlay не сносит #app (#app удалялся root.innerHTML='')
- Убрал root.innerHTML='' в OnboardingView.render
- Оверлей теперь fixed/absolute поверх body — лейаут не страдает
- App.showView('map') после пропуска находит #app нормально
2026-08-20 21:21:14 +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
7fa2dc83e4 UX fixes: auto geolocation, read-ticks, pulse animation
- Map: auto-request geolocation on view enter (no manual click needed)
- Map: pulse animation on 'Share location' button (calls attention)
- Map: better error message on permission denied (with link to settings)
- Map: 'loading...' state on radius change
- Chat: ✓ / ✓✓ read marks on own messages (from m.read_at)
- Chat: WS handler for 'message_read' event (real-time update)
- Chat: enterkeyhint='send' on input (mobile keyboard send button)
- Chat: send on Enter key (no shift)
- CSS: btn-pulse animation
- CSS: read-tick styles
2026-08-20 20:45:27 +00:00
BuhApp Dev
149f31d25d Add user onboarding flow (3-slide welcome) for new signups
- New OnboardingView module (public/js/views/onboarding.js):
  • Reads /onboarding/slides.json (designer schema with inline SVG icons,
    per-slide cta_primary/cta_skip labels) — falls back to 3 emoji slides
    if the JSON is unavailable.
  • Renders a Telegram-style dark overlay inside #mobile-frame with a
    220px floating SVG icon, title, body, dot indicator (expandable
    active dot), primary CTA, and a ghost Skip button.
  • Prev/Next via primary CTA; dot click jumps to slide; arrow keys and
    horizontal swipe also navigate.
  • Haptic feedback via TG_APP on slide change + finish.
  • markDone() writes buhapp.onboarded='1' to localStorage so the flow
    never repeats. isDone()/reset() exposed for QA.

- App integration (public/js/app.js):
  • New App.maybeOnboard() helper — awaited after every successful auth
    path: Telegram login, restored session, email login, email register,
    and consent accept. Skips silently if already onboarded.

- UI assets (public/onboarding/):
  • slides.json with 3 designer slides (Map / Chat / Review).
  • Inline-SVG icons for map, chat, and review (icon-*.svg kept for
    designer reference, preview.html too).

- Styles (public/css/app.css): new .onboarding-* dark-theme rules.
- Index (public/index.html): loads onboarding.js before app.js.
2026-08-20 20:20:54 +00:00
root
7182e6828b Fix geolocation: button-triggered, error messages in Russian 2026-08-20 18:45:42 +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
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