Commit Graph

383 Commits

Author SHA1 Message Date
Fringg
1d5ce2d4ea fix: complete is_limited status handling across all views
- SubscriptionListCard: show traffic progress bar for limited subs
  in multi-tariff list (was hidden because isActive excluded limited)
- SubscriptionListCard: amber border/background for limited status
  cards (was using default neutral style, inconsistent with rest of UI)
- Subscription page: hide delete button for limited subs in
  multi-tariff mode (limited subs still have valid days remaining)
- SubscriptionPurchase: allow tariff switch for limited subs
  (was blocked by is_active-only gate in canSwitch formula)
- AdminUserDetail: include limited status in "already purchased"
  tariff filter to prevent duplicate subscription creation
2026-04-23 04:04:11 +03:00
Fringg
f68b46699c fix: limited (traffic exhausted) subscription shows as expired
- Dashboard card: change date label from "Истекла" to "Активна до"
  for limited subscriptions (traffic exhausted but time remaining)
- Dashboard button: change text from "Трафик исчерпан" (dead-end) to
  "Докупить трафик" (actionable) for limited status
- Subscription page: CountdownTimer shows remaining time for limited
  subs instead of "Истекла" (was passing is_active=false)
- PurchaseCTAButton: don't treat limited as expired — limited subs
  still have time, should show extend CTA not "buy new subscription"
2026-04-23 03:56:07 +03:00
Fringg
996840f627 fix: change aurapay icon to pink gradient to avoid kassa_ai color collision 2026-04-18 00:12:15 +03:00
Fringg
48827e430d feat: add AuraPay payment provider to cabinet frontend
- Payment method label and icon (violet gradient, AP)
- Admin settings tree entry for AURAPAY category
- Locale strings and descriptions for ru, en, zh, fa
2026-04-18 00:05:56 +03:00
Fringg
4eed0f358e fix: differentiate rollypay icon from riopay (teal gradient, RY text) 2026-04-16 05:58:58 +03:00
Fringg
770a5803d6 feat: add RollyPay payment provider to cabinet frontend
- Payment method label and icon (green gradient, RP)
- Admin settings tree entry for ROLLYPAY category
- Locale strings and descriptions for ru, en, zh, fa
2026-04-16 05:55:21 +03:00
Fringg
31ac511a09 feat: add PayPear payment provider to cabinet frontend
- Payment method label and icon (amber gradient)
- Admin settings tree entry for PAYPEAR category
- Locale strings for ru, en, zh, fa
2026-04-16 05:26:09 +03:00
c0mrade
30d8d28475 fix: show API error details in menu editor save + allow tg:// URLs
Save mutation was showing generic error instead of backend validation
detail, making it impossible to diagnose 422 errors. Also added tg://
to frontend URL validation for Telegram deep link support.
2026-04-13 17:07:29 +03:00
c0mrade
e6f6713b0e fix: batch bug fixes matching backend changes
- Promo code errors: add inactive/not_yet_valid translations (4 locales) + Balance.tsx parser
- Daily 100% discount: render price block when originalDailyPrice > 0
- Webvisor: enable in Yandex Metrika init config
- Referral attribution: consume campaign/referral slugs only after successful auth (all login methods)
- registerWithEmail: consume referral code after success
- AdminSettings: move TARIFF_MODE_SETTINGS to module scope (fix eslint warning)
2026-04-08 18:33:47 +03:00
c0mrade
1cf9526713 fix: complete sparkles icon in trial offer card (was showing only 1 of 3 sparkle paths) 2026-04-03 18:36:11 +03:00
Fringg
e2f81ad28d fix: subscription tab not highlighted on detail pages
isActive used exact pathname match (===), so navigating to
/subscriptions/:id or /subscriptions/:id/renew would not highlight
the Subscription tab. Changed to startsWith for non-root paths
in both MobileBottomNav and DesktopSidebar.
2026-04-02 05:44:06 +03:00
c0mrade
826a82aa1c fix: unblock page rendering when Telegram CDN is unavailable
- Google Fonts: non-render-blocking via media="print" onload trick
- telegram-web-app.js: load only inside Telegram environment
- Telegram SDK init: skip entirely outside Telegram
- Script load timeout: 8000ms → 2000ms for faster deep link fallback
- Email login form: expanded by default (80% of registrations)
2026-03-31 14:10:22 +03:00
Fringg
07500ed215 feat: dynamic language list from API instead of hardcoded array
Hide language switcher when only 1 language is available.

Cherry-picked from PR #365
2026-03-29 05:15:31 +03:00
Fringg
3e6c0212a6 fix: desktop vertical alignment regression and touch target sizing
- SettingsTableRow: use max-lg:self-end instead of self-end to prevent
  bottom-aligning controls on desktop (self-end overrides items-center)
- QuickToggles: add min-h-[44px] matching Toggle component pattern
2026-03-29 03:22:45 +03:00
Fringg
e004d8103b fix: mobile layout and touch target improvements for admin settings
- SettingsTableRow: stack name above controls on mobile, show action
  buttons without hover (max-lg:opacity-100)
- SettingsMobileTabs: increase touch targets to 44px, add scroll spacers
- QuickToggles: increase chip touch targets
- SettingInput: increase display button touch target
- AdminSettings: add bottom padding buffer to mobile layout
2026-03-29 03:18:21 +03:00
Fringg
67055d58f7 fix: whitespace search guard and unknown section fallback
- SettingsTab: use searchQuery.trim() instead of searchQuery to prevent
  whitespace-only input from triggering empty search results view
- AdminSettings: fallback to branding when activeSection is unknown
  instead of rendering blank content area
2026-03-29 03:08:02 +03:00
Fringg
28ef6c97f5 fix: three bugs found in second review round
- SettingsSearchMobile: change sm:hidden to lg:hidden to match mobile
  layout breakpoint (search was invisible on 640-1023px tablets)
- SettingsTableRow: sync isLongValue suffixes with SettingInput
  (_list, _json, _periods, _discounts were missing)
- SettingsTableRow: read-only bools now show enabled/disabled labels
  instead of raw "true"/"false" strings
2026-03-29 03:03:26 +03:00
Fringg
ea1c7359ce fix: stabilize useMemo deps and add category search to sidebar
- Use activeSection instead of activeTreeInfo as useMemo dependency
  (activeTreeInfo is derived from activeSection, new object each render)
- Add category label matching to sidebar autocomplete search filter
  to match global search behavior
2026-03-29 02:56:54 +03:00
Fringg
21813ef82e feat: redesign admin settings with tree navigation and compact layout
- Replace flat sidebar with collapsible tree groups (7 groups, 52 sub-items)
- Map all 61 backend category keys to sidebar navigation
- Add QuickToggles panel for boolean settings
- Replace card-style SettingRow with compact SettingsTableRow
- Add breadcrumb navigation for tree sub-items
- Add source badges (modified/DB/ENV) on settings
- Implement two-level mobile navigation with group chips
- Add i18n translations for all new keys (en, ru, zh, fa)
2026-03-29 02:38:52 +03:00
c0mrade
3b659b7450 fix: bottom nav disappears after visiting payment page in Telegram
- Reset isKeyboardOpen on route change so bottom nav always restores
- Disable autoFocus on payment input in Telegram Mini App
- Skip auto-focus on Profile email inputs in Telegram
2026-03-27 13:40:13 +03:00
c0mrade
c697ddb224 fix: auto-reload on stale chunk errors after deploy
When a new build changes chunk hashes, users with cached index.html
get "Failed to fetch dynamically imported module" errors. Now:
- lazyWithRetry() wraps all lazy imports with auto-reload on failure
- ErrorBoundary catches chunk errors and auto-reloads once
- 30s guard in sessionStorage prevents reload loops
2026-03-26 20:55:29 +03:00
c0mrade
e86b214008 fix: resolve eslint warnings in NewsSection and AdminTickets
NewsSection: wrap items in useMemo to stabilize dependency reference.
AdminTickets: copy ref values to local vars for cleanup function.
2026-03-25 11:47:41 +03:00
c0mrade
fd01c0f393 fix: preserve subscription context in navigation and cache keys
SubscriptionCardActive: passes ?sub= to /connection navigation.
Connection: QR state includes subscriptionId for back-navigation.
ConnectionQR: preserves subscription context on back button.
Dashboard + Subscription: localStorage traffic cache keyed per-subscription
to prevent cooldown bleed between different subscriptions.
2026-03-25 11:47:31 +03:00
c0mrade
debee7729f fix: platform-aware delete confirmation + trial CTA to purchase
Delete subscription:
- Telegram mini app: native destructive popup (red button)
- Web (mobile + desktop): Sheet bottom panel with full-width buttons
- Both: proper loading state on delete button

Trial CTA: leads to /subscription/purchase (trial cannot be renewed)
2026-03-24 18:30:59 +03:00
c0mrade
31d0953c23 feat: add WebBackButton to all sub-pages, widen renew page layout
- New WebBackButton component: visible on web, hidden in Telegram
  (native back button handles navigation there)
- Added to: Subscription detail, SubscriptionPurchase, RenewSubscription
- RenewSubscription: removed max-w-lg, grid layout for period cards
2026-03-24 14:01:55 +03:00
c0mrade
871b4769aa feat: show autopay/auto-charge status on subscription cards, invalidate list on toggle
- SubscriptionListCard: always show autopay status (green check / red cross)
  for regular tariffs, show auto-charge status for daily tariffs
- Hide autopay for trial subscriptions
- Autopay mutation: invalidate subscriptions-list for instant UI update
- Types: added is_daily, is_daily_paused to SubscriptionListItem
2026-03-24 12:28:02 +03:00
c0mrade
6a53221cc1 fix: hide renewal button for daily tariffs in multi-tariff mode, fix hint text
- Daily tariffs renew automatically — no manual renewal CTA needed
- Show "Продление подписки" hint in multi-tariff instead of "Продление и смена тарифа"
2026-03-24 11:10:30 +03:00
c0mrade
82eb03dec9 feat: separate renewal and purchase flows in multi-tariff mode
Renewal flow (per-subscription):
- New /subscriptions/:id/renew page showing only period options for
  the specific tariff with balance display and renew button
- PurchaseCTAButton links to /renew in multi-tariff mode

Purchase flow (new tariffs only):
- Hide already purchased tariffs (is_purchased flag from backend)
- Fallback UI when all tariffs are owned
- Types: added is_purchased, all_tariffs_purchased fields
2026-03-24 10:47:49 +03:00
c0mrade
9d3fb37d60 fix: remove duplicate back buttons, improve multi-subscription UX
- Remove custom back buttons from Subscription detail and SubscriptionPurchase
  pages — native Telegram mini-app back button already handles navigation
- SubscriptionListCard: distinct trial badge with star icon and amber styling,
  trial cards get amber border/background for visual differentiation
- SubscriptionPurchase: change "Купить тариф" to "Новый тариф" when adding
  a new tariff in multi-subscription mode
- Subscription detail: show tariff name as title in multi-tariff mode
2026-03-23 21:38:04 +03:00
c0mrade
376e1bb56d feat: enhance subscription list UX with progress bars, status badges, and glass theme
- SubscriptionListCard: replace status dot with localized status badge,
  add traffic progress bar with color coding, use locale-aware date format
- Subscriptions page: apply glass theme colors, improve empty state styling,
  add SVG plus icon for buy button, skeleton loader with glass theme
- Subscription detail: invalidate subscriptions-list cache on mutations
2026-03-23 18:57:05 +03:00
c0mrade
f4de6d8ad8 fix: multi-subscription UI audit fixes and cache invalidation improvements
- Fix AdminUserDetail multi-subscription display with useMemo optimization
- Update Dashboard subscription cards and purchase entry points
- Fix WebSocket notification handlers for multi-subscription context
- Update SubscriptionPurchase cache invalidation for multi-tariff mode
- Fix Subscriptions list page and navigation patterns
- Update App routing, DeepLinkRedirect, and CommandPalette for multi-sub
- Add SubscriptionListCard component
- Fix TopUpResult and PromoOffersSection navigation
2026-03-23 18:57:05 +03:00
c0mrade
a0c21a11aa fix: navigation links point to /subscriptions (list page) instead of legacy /subscription 2026-03-23 18:57:05 +03:00
c0mrade
820ba46cc4 feat: multi-subscription frontend support
- Add SubscriptionListItem and SubscriptionsListResponse types
- Add getSubscriptions/getSubscriptionById API methods
- Add optional subscriptionId parameter to all 30+ API methods
- Create /subscriptions page with subscription list cards
- Add /subscription/:subscriptionId route for per-subscription management
- Dashboard: show multi-tariff navigation block when user has 2+ subscriptions
- Subscription page: read subscriptionId from URL params, pass to all queries
- SubscriptionPurchase: accept subscriptionId from query params
- SubscriptionCardExpired: pass subscription.id to API calls
- Full backward compatibility: without subscriptionId, works as before
2026-03-23 18:57:05 +03:00
Fringg
be7219ec06 feat: add delete buttons for categories and tags in combobox dropdown
- Add onDelete prop to ColoredItemCombobox with X button per item
- Wire up deleteCategory/deleteTag API calls in AdminNewsCreate
- Auto-clear selection if the deleted item was selected
- Spinner on delete, haptic feedback, i18n aria-label
2026-03-23 15:48:27 +03:00
Fringg
2ae01c95ae feat: add category/tag management UI with ColoredItemCombobox
- ColoredItemCombobox component with search, color swatches, inline creation
- Replace text inputs with combobox dropdowns for category and tag selection
- API methods for categories/tags CRUD
- TypeScript types for NewsCategory, NewsTag
- i18n keys for combobox (ru, en)
2026-03-23 15:30:02 +03:00
Fringg
b7ab2cff55 fix: news section — remove duplicate title, add newspaper icon, hide views from users, fix cache invalidation 2026-03-23 15:00:11 +03:00
Fringg
de5414f42e fix: remove duplicate news title and replace N icon with newspaper SVG 2026-03-23 14:52:17 +03:00
Fringg
8d994f75d9 fix: remove animated background from news section, fix mobile borders
- Remove GridBackground and ScanLine animations
- Use simple transparent blur background instead
- Remove negative margins that broke rounded corners on mobile
2026-03-23 11:23:44 +03:00
Fringg
38b0f4be9a fix: add news link to admin panel, prevent empty news section flash
- Add News item to marketing group in AdminPanel with NewspaperIcon
- Add news nav/panel translations for all 4 locales (ru, en, zh, fa)
- Don't render NewsSection until query confirms articles exist
- Remove skeleton that caused brief flash when news list is empty
2026-03-23 11:21:25 +03:00
Fringg
74e6d52fee fix: news feature security, accessibility, performance improvements
- DOMPurify strict allowlist with sandbox on iframes
- safeColor() CSS injection prevention for category_color
- URL validation (http/https) for images and links
- encodeURIComponent for slug in API calls
- Keyboard navigation on news cards (Enter/Space)
- aria-label, aria-pressed, type=button on all buttons
- 44px touch targets on remaining buttons
- memo() wrappers + stable callbacks (fewer re-renders)
- Canvas draw call batching (~75% reduction)
- TipTap extensions useMemo deps fix ([t] -> [])
- Featured image loading=eager fetchPriority=high (LCP)
- Unsafe Number(id) NaN guard
2026-03-23 11:09:52 +03:00
Fringg
99fc33625e feat: add news section with admin editor and public article view
- NewsSection with animated grid background, category filters, featured cards
- AdminNews list page with toggle publish/featured, pagination
- AdminNewsCreate with TipTap rich text editor, URL validation
- NewsArticle detail page with DOMPurify sanitization, Telegram back button
- Toggle component with WCAG 44px touch targets, role=switch
- Prose styles for highlight marks and responsive iframes
- i18n translations (en, ru, zh, fa)
2026-03-23 10:49:46 +03:00
Fringg
1538879f97 fix: clear expire timer on 410/error and reset pollInFlight on retry 2026-03-22 05:37:09 +03:00
Fringg
e57166745c fix: prevent polling race condition and add missing zh/fa translations 2026-03-22 05:21:01 +03:00
Fringg
76c9d6448a feat: add QR code and command to deeplink auth fallback, fix polling on tab return 2026-03-22 05:16:56 +03:00
Fringg
3c034d2e70 fix: referral system — stop cabinet redirect to Telegram, fix deep link code handling
- Remove redirect to Telegram bot when email auth disabled + referral code present
  (cabinet links should stay on cabinet, bot links should go to bot)
- Remove referral_code from deep link auth (existing users can't get referrals)
- Don't consume referralCode in deep link path — leave it in localStorage for
  OIDC/widget auth methods that actually send it to the backend
- Consume campaign slug once into ref to survive retries (codesConsumedRef pattern)
- Update loginWithDeepLink to only accept (token, campaignSlug) — no referralCode
- Update pollDeepLinkToken API to match backend schema change
2026-03-22 01:54:38 +03:00
Fringg
94c8e73787 fix: bottom nav overlap and safe area handling in referral network
- Raise portal z-index to z-50 so it covers MobileBottomNav
- Use TG SDK bottom safe area (JS) via CSS variable instead of unreliable env()
- Fix TicketNotificationBell regression: conditional inline style for fullscreen only
- Add bottom safe area padding to detail panel scroll areas
2026-03-20 05:02:47 +03:00
Fringg
33486a09d0 fix: adapt referral network for Telegram MiniApp safe areas
- Extract useHeaderHeight() hook — single source of truth for header
  height across AppShell, ReferralNetwork, and TicketNotificationBell
- Portal top offset now computed dynamically from TG safe area insets
  instead of hardcoded top-16 (fixes overlap with TG header bar)
- Two-row mobile layout: title + selector on separate rows so dropdown
  gets full width on small screens
- Add MOBILE_HEADER_HEIGHT_PX and DESKTOP_HEADER_HEIGHT_PX to constants
- Fix TicketNotificationBell using hardcoded 45px for all platforms
2026-03-20 04:23:45 +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
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