Commit Graph

1113 Commits

Author SHA1 Message Date
c0mrade
b787726d1b fix: referral network graph rendering and layout
- fix top offset breakpoint: sm:top-14 → lg:top-14 to match AppShell
  header visibility (mobile header is lg:hidden with h-16)
- add gravity to FA2 layout to prevent disconnected nodes from flying
  to extreme positions, making auto-rescale shrink everything to dots
- clamp outlier node positions after FA2 finishes (3σ threshold)
- add ResizeObserver to sync sigma canvas with container size changes
- call sigma.resize() before camera reset after FA2
- increase node sizes: user min 8→12, max 40→50, campaign 18→24
- reduce FA2 duration 5s→3s and slowDown 5→2 for tighter layout
2026-03-19 10:24:47 +03:00
Fringg
7c0b8e571a fix: graph layout, node visibility and FA2 settings
- Switch to CSS Grid layout for reliable content area height
- Use inferSettings() for ForceAtlas2 auto-tuning based on graph structure
- Enable linLogMode and adjustSizes for better node clustering
- Fit camera after layout settles with animatedReset
- Increase node sizes for better visibility (MIN 8, MAX 40)
- Center controls at bottom, fix overlay positions
2026-03-19 09:18:11 +03:00
Fringg
fd9a47ecda fix: position page below AppShell header, wait for container size
- Page uses top-16/sm:top-14 to start below AppShell header (z-50)
  instead of inset-0 which renders behind the header
- Sigma init polls with RAF until container has real dimensions
  instead of allowInvalidContainer which creates broken canvas
- Removed overflow-hidden from content area (not needed)
2026-03-19 09:04:55 +03:00
Fringg
6f58a0ce5d fix: defer Sigma init with requestAnimationFrame to prevent no-height crash
Container has no computed height when useEffect fires immediately
after data arrives. Defer to next animation frame so browser layout
completes. Also add allowInvalidContainer as safety net.
2026-03-19 08:56:31 +03:00
Fringg
3434073d7c fix: resolve Sigma container height error on page load
Use absolute positioning for graph container instead of flex-1
to ensure explicit dimensions when Sigma initializes.
2026-03-19 08:51:45 +03:00
Fringg
4ebd85b65d fix: fullscreen layout and filter dropdown positioning
- Page now uses fixed inset-0 overlay to fill entire viewport
- Simplified top bar to single row (back + title + search + filter)
- Filter dropdown uses absolute positioning on desktop (no layout shift)
- Filter button always visible, toggles dropdown on click
2026-03-19 08:43:39 +03:00
Fringg
ea143fdbc9 fix: redesign top bar and filter panel for mobile
- Split top bar into two rows on mobile: title + filter icon, then
  full-width search below
- Desktop keeps single-row layout with search and filter inline
- Filter button: icon-only on mobile with active indicator dot
- Filter panel: full-screen overlay with backdrop on mobile,
  inline dropdown on desktop
- Outside-click closes filter panel
- Removed subtitle (only on desktop, saves space)
2026-03-19 08:30:32 +03:00
Fringg
818557f57d fix: improve graph spacing, mobile layout, and Telegram viewport
- Increase FA2 scalingRatio to 10 and decrease gravity to 0.5 for
  better node spacing (less cluttered graph)
- Use 100dvh instead of 100vh for Telegram Mini App viewport compat
- Hide legend on mobile to prevent overlay collision
- Move controls to bottom-right on mobile, bottom-center on desktop
- Make stats single-column on mobile for compact layout
2026-03-19 08:20:38 +03:00
Fringg
0f756d633d fix: remove dead store code and add search input maxLength
- Remove unused networkData, searchQuery, searchResults from zustand store
- Remove setNetworkData write in NetworkGraph
- Add maxLength={200} to search input
2026-03-19 08:08:18 +03:00
Fringg
235eaec85f feat: add referral network graph visualization page
Interactive Sigma.js + graphology graph with ForceAtlas2 web worker
layout, campaign/user node coloring, filters via nodeReducer pattern,
search highlighting, user/campaign detail side panels, and 4-locale
translations. Dependencies: sigma v3, graphology, graphology-layout-forceatlas2.
2026-03-19 07:56:01 +03:00
Fringg
84f0e4e9b4 feat: add media attachment support for admin ticket replies
Admin can now attach photos, videos, and documents when replying to
tickets. Upload happens on file selection via existing media upload
endpoint. Includes attachment preview with type-specific icons,
upload progress, error handling, race condition protection, and
proper blob URL lifecycle management.

Added video player rendering for video attachments in message thread.
Updated ticket list preview to show [media_type] for media-only messages.
2026-03-19 06:39:05 +03:00
Fringg
aa8fbd1e23 feat: clickable user link to user card in admin payments 2026-03-18 23:30:18 +03:00
Fringg
4a33a61641 fix: handle long promo group names with truncation and flex-wrap 2026-03-18 22:52:32 +03:00
Fringg
c579abe6a3 feat: display user promo group badge on dashboard 2026-03-18 22:49:24 +03:00
Fringg
a3a6fad9b7 feat: display manual admin top-ups in sales statistics 2026-03-18 22:41:02 +03:00
Fringg
18b860533c fix: add tooltip text color for dark theme in landing stats charts 2026-03-18 18:00:39 +03:00
Fringg
d640cc1a04 fix: add tooltip text color for dark theme in all charts
Added color and itemStyle to Recharts Tooltip so text is visible on dark backgrounds.
2026-03-18 17:59:12 +03:00
Fringg
df73b3f77e feat: редизайн страницы платежей в админке — поиск, фильтры, статистика
Поиск по инвойсу/клиенту, фильтры по статусу/периоду/методу, карточки статистики,
кастомный диапазон дат, обработка ошибок, локализация на 4 языка.
2026-03-18 05:40:56 +03:00
Fringg
914a802c1b fix: добавлена подпись «Стоимость вращения» к блоку оплаты спина 2026-03-18 04:35:32 +03:00
Fringg
2d89b5e342 fix: блокировка кнопки устройств на странице подписки
Аналогичная блокировка как на дашборде — disabled + haptic + предупреждение
2026-03-18 04:27:33 +03:00
Fringg
8636bd7659 feat: блокировка кнопки устройств при лимите + убраны дубли трафика
- Кнопка «Подключить устройство» заблокирована при достижении лимита
- Haptic feedback при нажатии на заблокированную кнопку
- Предупреждение «Отключите устройства для подключения новых»
- Убран дублирующийся текст трафика под прогресс-баром (безлимит)
2026-03-18 04:21:34 +03:00
Fringg
246fafdbfc feat: добавлена поддержка SeverPay в кабинете
- Иконка SeverPay (синий градиент, SP)
- Лейбл в paymentMethods
- Статус decline в FAILED_STATUSES
- Локализация (ru, en, fa, zh)
2026-03-18 03:49:36 +03:00
Fringg
11e81917af fix: скрыть плашку верификации email при выключенной верификации
- Добавлен verification_enabled в EmailAuthEnabled тип
- Баннер "Подтвердите email" скрыт когда верификация выключена
- Бейдж "Не подтверждён" скрыт когда верификация выключена
2026-03-18 01:53:10 +03:00
Fringg
b35000367b fix: recursive setTimeout, Strict Mode guard, isAxiosError
- Replace setInterval with recursive setTimeout to prevent overlapping async polls
- Add cancellation flag in auto-start effect for React Strict Mode double-mount
- Use isAxiosError() instead of unsafe type assertion
- Remove consumeCampaignSlug/consumeReferralCode from loginWithDeepLink (fired on every poll tick, destroying values after first 202)
2026-03-17 21:56:56 +03:00
Fringg
3d950252b7 fix: deep link auth timer cleanup and reliability
- Clear previous interval/timeout before starting new deep link auth
- Store expire timeout in ref for cleanup on unmount
- Use server expires_in instead of hardcoded 5 minutes
- Show error message when token expires (not just clear state)
- Add consumeCampaignSlug/consumeReferralCode to loginWithDeepLink
2026-03-17 21:46:12 +03:00
Fringg
6a1a9f5db7 feat: deep link авторизация при блокировке oauth.telegram.org
Добавлен fallback через бота когда виджет Telegram не загружается:
- Таймаут 8 сек на загрузку скрипта (OIDC + legacy)
- Автоматический переход на deep link auth
- Polling каждые 2.5 сек до подтверждения в боте
- ConnectedAccounts: таймаут + сообщение при недоступности
- Переводы: ru, en, zh, fa
2026-03-17 21:29:21 +03:00
Fringg
f960d5fc0b fix: поддержка режима «both» — показ кнопки контакта вместе с тикетами 2026-03-16 04:09:53 +03:00
Fringg
e023373f56 feat: dual referral links UI (bot + cabinet) with independent copy states
- add bot referral link section with Telegram icon (conditionally rendered)
- add cabinet referral link section with chain-link icon
- independent copy button state per link type
- add bot_referral_link to ReferralInfo type
- add i18n keys: botLink, cabinetLink in ru/en/fa/zh
2026-03-15 01:14:25 +03:00
c0mrade
62188b8d2e fix: resolve all 14 ESLint warnings across the codebase
- Add varsIgnorePattern to no-unused-vars for destructuring patterns
- Fix all react-hooks/exhaustive-deps by adding missing dependencies
- Refactor useAnimatedNumber to use ref instead of stale state closure
- Wrap handleLinkResult in useCallback for stable deps
- Extract OAuth utilities from OAuthCallback.tsx to utils/oauth.ts
- Extract background config utilities to utils/backgroundConfig.ts
- Remove unused catch parameter in GiftSubscription
2026-03-13 20:19:09 +03:00
c0mrade
2dab25c5a0 fix: resolve telegram auth token expiration and clean up codebase
- Fix stale initData comparison in clearStaleSessionIfNeeded that destroyed
  valid refresh tokens on mobile WebView reopens
- Restrict X-Telegram-Init-Data header to auth endpoints only
- Close Mini App on auth retry to force fresh initData from Telegram
- Merge Connection page error/not-configured states for better UX
- Remove unnecessary comments across 40+ files (section dividers,
  restating comments, noise catch block comments)
- Configure ESLint allowEmptyCatch to properly handle intentional
  empty catch blocks (62 warnings resolved)
2026-03-13 17:50:49 +03:00
c0mrade
682b6b70dc fix: correct locale loader type to support nested translation objects 2026-03-13 12:04:25 +03:00
Fringg
9ae9cccbd9 perf: lazy-load locale files per language instead of bundling all
Split 574KB monolithic locales chunk into per-language lazy chunks:
- ru: 211KB (loaded on startup as fallback)
- fa: 143KB, en: 121KB, zh: 101KB (loaded on demand)

Russian users save 63% bandwidth. Other languages loaded only when
user switches via LanguageSwitcher.
2026-03-13 06:16:40 +03:00
Fringg
b4f9f332cf feat: add LIMITED subscription status support with traffic-exhausted UX
- Add is_limited to Subscription type
- Show yellow traffic-exhausted badge on Subscription and AdminUsers pages
- SubscriptionCardExpired: amber theme with warning icon and buy-traffic CTA for limited
- Dashboard: route limited subscriptions to SubscriptionCardExpired
- Subscription page: show additional options (buy traffic) for limited subs
- Use is_limited boolean instead of status string comparison
- Add trafficLimited translations for ru, en, zh, fa
- AdminUserDetail StatusBadge: add limited yellow styling
2026-03-12 18:37:22 +03:00
Fringg
5a5a987893 feat: add show_in_gift toggle UI for tariffs in admin panel
Add pill toggle in tariff create/edit form and purple gift badge
in tariff list. Includes i18n for ru, en, zh, fa locales.
2026-03-12 04:16:04 +03:00
Fringg
01e811bdfc fix: handle Telegram Stars payment for gift subscriptions via openInvoice
- Use openInvoice() with capabilities.hasInvoice guard for Stars payments
- Fall back to redirect for web environments without invoice support
- Add haptic feedback on payment success/failure
2026-03-12 03:32:14 +03:00
Fringg
695ab42e03 feat: add gifts tab to admin user detail page
Display sent and received gift subscriptions with status badges,
extracted GiftCard component, and full i18n support (ru/en/zh/fa).
2026-03-11 03:30:13 +03:00
Fringg
03c9e73a37 feat: display promo group and active discount banners on gift page
Add promo group banner (green) and active discount banner (orange) to
gift subscription page. PeriodCard now shows original price strikethrough
and discount percentage badge from server-calculated values.
2026-03-11 02:58:43 +03:00
Fringg
6fd76c8dc8 fix: display zero-amount transactions with neutral styling
Zero-amount transactions (e.g. free tariff switches) now show without +/- sign in neutral gray instead of misleading green +0.00
2026-03-11 02:17:40 +03:00
Fringg
8dab6dc8fb feat: desktop nav expand-on-hover with larger icons
Icons enlarged to 18px, padding increased. On hover each button
smoothly expands to reveal its label with opacity and max-width
transition (200ms). Uses group/group-hover pattern.
2026-03-11 01:52:29 +03:00
Fringg
f0777f0b5d fix: desktop nav always icon-only with tooltips
Text labels overflow even at 2xl with Russian + 9 items.
Switch to icon-only mode at all desktop widths. Labels kept
as sr-only for accessibility, title attribute provides tooltips.
2026-03-11 01:42:54 +03:00
Fringg
3bae6cf1e1 fix: show nav labels from 2xl (1536px) instead of xl (1280px)
Russian labels with 9 items overflow at xl breakpoint. Push text
labels to 2xl where there is enough space for all languages.
2026-03-11 01:38:58 +03:00
Fringg
e7cd370299 feat: responsive desktop nav — icon-only on lg, icon+text on xl
Remove horizontal scroll from desktop top nav bar. Items now show
icons only at 1024-1279px with native tooltips, and icons+labels
at 1280px+. All 9 items fit on screen in any language without
scrolling.
2026-03-11 01:34:44 +03:00
Fringg
8b056e0b46 fix: hide Quick Renew for expired trial subscriptions
Show only Tariffs button as primary CTA when trial expires.
Remove duplicate gift.copyMessage i18n keys.
2026-03-10 20:33:31 +03:00
c0mrade
4756c93215 Merge pull request #251 from FireWookie/dev_nikita
Add: Интеграция рекурентов Юкассы + fix: скрытие нулевых бонусов на странице реферальной программы
2026-03-10 14:02:35 +03:00
firewookie
8c9eadc273 FIX PR Problems 2026-03-10 15:58:02 +05:00
firewookie
9467a08861 FIX PR Problems 2026-03-10 15:42:56 +05:00
firewookie
b04cf63eb7 FIX PR Problems 2026-03-10 15:35:01 +05:00
firewookie
97ce8d751c Merge remote-tracking branch 'origin/dev_nikita' into dev_nikita 2026-03-10 15:29:14 +05:00
firewookie
0e3cf30341 FIX PR Problems 2026-03-10 15:28:46 +05:00
FireWookie
1f3fae9780 Merge pull request #2 from FireWookie/dev
Dev
2026-03-10 15:12:02 +05:00