- 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.
75 lines
3.8 KiB
XML
75 lines
3.8 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="240" height="240" role="img" aria-label="Чат с сообщениями">
|
||
<defs>
|
||
<linearGradient id="chatBg" x1="0" y1="0" x2="1" y2="1">
|
||
<stop offset="0%" stop-color="#FF8A5C"/>
|
||
<stop offset="100%" stop-color="#FF6B35"/>
|
||
</linearGradient>
|
||
<linearGradient id="bubbleMine" x1="0" y1="0" x2="0" y2="1">
|
||
<stop offset="0%" stop-color="#FFFFFF"/>
|
||
<stop offset="100%" stop-color="#F5F5F7"/>
|
||
</linearGradient>
|
||
<linearGradient id="bubbleSheen" x1="0" y1="0" x2="0" y2="1">
|
||
<stop offset="0%" stop-color="#FFFFFF" stop-opacity="0.25"/>
|
||
<stop offset="100%" stop-color="#FFFFFF" stop-opacity="0"/>
|
||
</linearGradient>
|
||
<linearGradient id="circleSheen" x1="0" y1="0" x2="0" y2="1">
|
||
<stop offset="0%" stop-color="#FFFFFF" stop-opacity="0.18"/>
|
||
<stop offset="100%" stop-color="#FFFFFF" stop-opacity="0"/>
|
||
</linearGradient>
|
||
</defs>
|
||
|
||
<!-- Внешний круг -->
|
||
<circle cx="120" cy="120" r="112" fill="url(#chatBg)"/>
|
||
<circle cx="120" cy="120" r="112" fill="url(#circleSheen)"/>
|
||
|
||
<!-- Декор — точки -->
|
||
<circle cx="40" cy="58" r="4" fill="#FFFFFF" opacity="0.45"/>
|
||
<circle cx="200" cy="60" r="3" fill="#FFFFFF" opacity="0.55"/>
|
||
<circle cx="36" cy="180" r="3" fill="#FFFFFF" opacity="0.5"/>
|
||
<circle cx="206" cy="182" r="4" fill="#FFFFFF" opacity="0.4"/>
|
||
<circle cx="208" cy="118" r="2.5" fill="#FFFFFF" opacity="0.5"/>
|
||
<circle cx="32" cy="120" r="2.5" fill="#FFFFFF" opacity="0.5"/>
|
||
|
||
<!-- Третий пузырь (ответ собеседника, сверху, тёмный) -->
|
||
<g transform="translate(40 50)">
|
||
<path d="M14 0 L 92 0 Q 106 0 106 14 L 106 38 Q 106 52 92 52 L 28 52 L 14 64 L 18 52 Q 14 52 14 38 Z"
|
||
fill="#1C1C1E"/>
|
||
<!-- Строки текста -->
|
||
<rect x="24" y="14" width="62" height="6" rx="3" fill="#FFFFFF" opacity="0.85"/>
|
||
<rect x="24" y="26" width="46" height="6" rx="3" fill="#FFFFFF" opacity="0.55"/>
|
||
<!-- Хвостик-таймстамп -->
|
||
<circle cx="96" cy="46" r="3" fill="#FF6B35"/>
|
||
</g>
|
||
|
||
<!-- Второй пузырь (ответ собеседника, ниже) -->
|
||
<g transform="translate(40 124)">
|
||
<path d="M14 0 L 100 0 Q 114 0 114 14 L 114 32 Q 114 46 100 46 L 26 46 L 14 58 L 18 46 Q 14 46 14 32 Z"
|
||
fill="#1C1C1E"/>
|
||
<rect x="24" y="14" width="68" height="6" rx="3" fill="#FFFFFF" opacity="0.85"/>
|
||
<rect x="24" y="26" width="38" height="6" rx="3" fill="#FFFFFF" opacity="0.55"/>
|
||
</g>
|
||
|
||
<!-- Первый пузырь (наш, справа, белый, крупный) -->
|
||
<g transform="translate(112 60)">
|
||
<path d="M92 0 L 14 0 Q 0 0 0 14 L 0 42 Q 0 56 14 56 L 78 56 L 92 70 L 88 56 Q 92 56 92 42 Z"
|
||
fill="url(#bubbleMine)"/>
|
||
<path d="M92 0 L 14 0 Q 0 0 0 14 L 0 42 Q 0 56 14 56 L 78 56 L 92 70 L 88 56 Q 92 56 92 42 Z"
|
||
fill="url(#bubbleSheen)"/>
|
||
<!-- Строки текста -->
|
||
<rect x="14" y="14" width="64" height="6" rx="3" fill="#1C1C1E" opacity="0.85"/>
|
||
<rect x="14" y="26" width="48" height="6" rx="3" fill="#1C1C1E" opacity="0.55"/>
|
||
<!-- Статус "прочитано" — две галочки оранжевые -->
|
||
<g transform="translate(72 38)">
|
||
<path d="M0 4 L 4 8 L 12 0" stroke="#FF6B35" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
|
||
<path d="M6 4 L 10 8 L 18 0" stroke="#FF6B35" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
|
||
</g>
|
||
</g>
|
||
|
||
<!-- Маленький индикатор "набирает..." -->
|
||
<g transform="translate(54 196)">
|
||
<circle cx="0" cy="0" r="4" fill="#FFFFFF" opacity="0.9"/>
|
||
<circle cx="12" cy="0" r="4" fill="#FFFFFF" opacity="0.6"/>
|
||
<circle cx="24" cy="0" r="4" fill="#FFFFFF" opacity="0.35"/>
|
||
</g>
|
||
</svg>
|