Commit Graph

1222 Commits

Author SHA1 Message Date
Fringg
6ea1de2e8a fix: harden gift subscription frontend after multi-agent review
- Handle expired status in GiftResult (stop polling + show FailedState)
- Add PollErrorState for balance mode poll errors (softer UX)
- Remove non-null assertions in handleSubmit (explicit narrowing)
- Wrap gift routes in ErrorBoundary
- Add pollErrorTitle/pollErrorDesc i18n keys to all 4 locales
2026-03-09 20:34:41 +03:00
Fringg
7890d480e0 feat: add gift navigation, routes, and i18n translations 2026-03-09 19:04:50 +03:00
Fringg
814b1f5e96 feat: add GiftSubscription and GiftResult pages 2026-03-09 18:56:16 +03:00
Fringg
a49520566e feat: add gift subscription API client and feature flag 2026-03-09 18:49:21 +03:00
Fringg
880b2d45fe fix: support OIDC mode in TelegramLinkWidget for account linking
TelegramLinkWidget used legacy widget only, ignoring OIDC config.
Now queries widgetConfig from backend, supports OIDC popup flow with
id_token, and falls back to bot_username from server config.
2026-03-09 06:23:02 +03:00
Fringg
6a9fdac75c refactor: extract shared payment status sets to utility module
- Move PAID_STATUSES/FAILED_STATUSES from Balance.tsx and TopUpResult.tsx
  to src/utils/paymentStatus.ts
- Eliminates code duplication between the two pages
2026-03-09 05:00:08 +03:00
Fringg
7ce5341e95 fix: support method query param fallback for external browser redirects
When payment providers redirect to external browser, sessionStorage is
unavailable. TopUpResult now reads method from URL query params and
polls via /latest endpoint as fallback.
2026-03-09 04:34:37 +03:00
Fringg
8897561fb2 fix: cover all payment provider statuses in TopUpResult
Add overpaid (PAL24) to PAID_STATUSES, system_fail and refund_paid
(Heleket) to FAILED_STATUSES. Harmonize Balance.tsx redirect detection
with the same full status sets and case-insensitive matching.
2026-03-09 04:08:28 +03:00
Fringg
b59122818c feat: add dedicated TopUpResult page for payment return flow
Replace toast-based payment return with animated result page showing
pending/success/failed/timeout states. Extract shared Spinner,
AnimatedCheckmark and AnimatedCrossmark components. Add sessionStorage
persistence with validation and TTL for cross-redirect payment data.
Unify ProtectedRoute with withLayout prop, add aria-live accessibility.
2026-03-09 03:58:56 +03:00
Egor
d7b1ff1052 Merge pull request #263 from BEDOLAGA-DEV/main
w
2026-03-09 03:03:31 +03:00
Fringg
69a8fe8e03 fix: force fresh balance data on purchase-options query
Added staleTime: 0 and refetchOnMount: 'always' to purchase-options
queries in SubscriptionPurchase and Subscription pages to prevent
stale balance_kopeks from causing incorrect insufficient funds display.
2026-03-09 01:07:49 +03:00
Fringg
115c684fe0 fix: device purchase guard condition and cache invalidation
- Fix guard: available === false alone now properly gates the unavailability
  message (was incorrectly AND-ed with !max_device_limit)
- Remove dead code block that was unreachable after guard fix
- Add device-price cache invalidation after successful purchase
2026-03-08 23:08:49 +03:00
Fringg
7940410d7d feat: support disabled daily subscription status in cabinet UI
- Show SubscriptionCardExpired for disabled daily subscriptions
- Use togglePause() API for resume instead of renewSubscription()
- Add "Suspended" status badge and balance query invalidation
- Add dashboard.suspended and subscription.pause.suspended translations (ru, en, zh, fa)
2026-03-08 21:36:10 +03:00
Egor
6276c30839 Merge pull request #262 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.27.0
2026-03-08 15:47:29 +03:00
github-actions[bot]
aefb16c06f chore(main): release 1.27.0 2026-03-08 12:46:31 +00:00
Egor
bb5e782546 Merge pull request #261 from BEDOLAGA-DEV/dev
Dev
2026-03-08 15:46:07 +03:00
Fringg
9aae9cc0e6 fix: mobile layout overflow on landing page
- Add min-w-0 to grid children to prevent CSS Grid blowout on mobile
- Add break-words to SanitizedHtml to wrap long URLs in footer text
2026-03-08 14:58:23 +03:00
Fringg
bda95ed23f fix: show infinity symbol for unlimited traffic on landing page
Display ∞ instead of 0 when traffic_limit_gb is 0 (unlimited),
matching the pattern used in TrialOfferCard and Dashboard.
2026-03-08 14:26:05 +03:00
Fringg
f1102d2783 fix: add purchase-options cache invalidation on balance changes
- WebSocketNotifications: invalidate purchase-options on all 10 balance-affecting events
- Dashboard: invalidate purchase-options after trial activation
- Balance: invalidate purchase-options after payment return and promocode activation
- PromoOffersSection: invalidate purchase-options and balance after promo claim
2026-03-08 14:17:45 +03:00
c0mrade
71a0111a04 revert: remove device manager redesign, restore original device UI 2026-03-08 01:00:21 +03:00
c0mrade
6dc8ca0d18 fix: unify device manager into additional options card with unbounded dot selector 2026-03-08 00:45:47 +03:00
c0mrade
edb7ef0488 feat: unified device manager with dot-based selector
Replace separate buy/reduce device sections with a single DeviceManager component featuring a dot-step selector for intuitive device limit adjustment.
2026-03-08 00:17:04 +03:00
c0mrade
7bb75aa920 fix: use platform-conditional replace for QR navigation to preserve Telegram back behavior 2026-03-07 23:35:06 +03:00
c0mrade
8ce4b1a24a refactor: move ConnectionQR into standard Layout with proper navigation
- Wrap /connection/qr route in ProtectedRoute with Layout
- Remove fullscreen overlay and custom close button
- Add AdminBackButton with replace prop to avoid history cycles
- Use replace navigation from Connection to QR page
- Add replace prop support to AdminBackButton component
2026-03-07 23:25:33 +03:00
Fringg
eed077b019 feat: add gift purchase UI states for telegram recipients
- Add recipient_in_bot and bot_link fields to PurchaseStatus API type
- Show bot link instruction when gift recipient is not in bot
- Show "gift sent via Telegram" message when recipient is in bot
- Fix duplicate text rendering in GiftPendingActivationState
- Handle recipientInBot=null edge case safely
- Add gift notification translations for ru, en, zh, fa locales
2026-03-07 20:33:55 +03:00
Egor
d8214a80e7 Merge pull request #260 from BEDOLAGA-DEV/main
w
2026-03-07 17:42:45 +03:00
Egor
818bbc2398 Merge pull request #259 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.26.0
2026-03-07 17:23:55 +03:00
github-actions[bot]
fe1d50970f chore(main): release 1.26.0 2026-03-07 14:23:21 +00:00
Egor
36d98669c2 Merge pull request #258 from BEDOLAGA-DEV/dev
Dev
2026-03-07 17:22:56 +03:00
Egor
ca938559f3 Merge pull request #257 from BEDOLAGA-DEV/main
w
2026-03-07 17:21:36 +03:00
Fringg
32091d3648 fix: replace deprecated Telegram Login Widget redirect with callback
Telegram deprecated the data-auth-url redirect flow, which returns a
blank page with "deprecated" text. Switch both TelegramLinkWidget
(account linking) and TelegramLoginButton (legacy login) to use
data-onauth callback approach that works client-side without redirects.
2026-03-07 16:15:20 +03:00
Fringg
68e6ce1bce fix: send Bearer token on email register (link to Telegram account)
/cabinet/auth/email/register requires authentication (links email to
existing Telegram account) but was in the AUTH_ENDPOINTS skip-list,
causing the request interceptor to omit the Bearer token → 401.

Change the skip-list entry to the specific /standalone path which
genuinely doesn't need a Bearer token.
2026-03-07 15:59:45 +03:00
Fringg
66bb86a5f2 fix: allow animated background to show through on landing pages
The root div had an opaque bg-dark-950 that covered the portal-rendered
animated background at zIndex:-2. Remove the opaque background when
background_config is present, matching the AppShell pattern.
2026-03-07 15:34:59 +03:00
Fringg
0ce74ea5fb fix: rename duplicate 'purchases' i18n key to 'purchaseCount'
The admin.landings namespace had two 'purchases' keys at the same level:
a string for purchase count label and an object for purchases section.
JSON last-key-wins caused the string to be overwritten by the object,
producing "returned an object instead of string" error on landings list.
2026-03-07 13:22:08 +03:00
Fringg
a404690334 feat: add configurable animated background for landing pages
Extract BackgroundConfigEditor as reusable controlled component from
BackgroundEditor. Add background settings section to landing editor.
Render per-landing backgrounds on public purchase pages.

- Extract BackgroundConfigEditor (value/onChange) from BackgroundEditor
- Refactor BackgroundEditor to thin wrapper with API persistence
- Add StaticBackgroundRenderer for prop-based config (public pages)
- Add background_config to landing API types and editor form
- Render animated background on QuickPurchase page
2026-03-07 12:46:05 +03:00
Fringg
887b13dec2 feat: add purchases list with pagination to landing stats page
Add card-based purchase list below charts with:
- Status filter dropdown (all/pending/paid/delivered/etc)
- Paginated card list with contact, gift recipient, tariff, price
- Status badges, responsive mobile/desktop layout
- Translations for ru/en
2026-03-07 09:50:03 +03:00
Fringg
30190199ed feat: add landing page statistics page with recharts
Add AdminLandingStats page with:
- Summary cards (purchases, revenue, gifts, conversion)
- AreaChart with dual Y-axis (daily purchases + revenue)
- BarChart (tariff distribution)
- PieChart donut (gift vs regular breakdown)
- Responsive layout for desktop and mobile
- Stats button on landing cards list

Includes API types, route, translations (ru/en).
2026-03-07 09:36:20 +03:00
Egor
c544b035c4 Merge pull request #254 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.25.0
2026-03-07 07:27:42 +03:00
github-actions[bot]
8465761236 chore(main): release 1.25.0 2026-03-07 04:27:17 +00:00
Egor
099f411327 Merge pull request #253 from BEDOLAGA-DEV/dev
Dev
2026-03-07 07:26:35 +03:00
Egor
63920a04c9 Merge pull request #252 from BEDOLAGA-DEV/main
w
2026-03-07 07:19:47 +03:00
Fringg
46f640a7e0 fix: add pagination to campaigns list
The campaigns page was fetching only the first 50 items with no way
to load more. Switched from useQuery to useInfiniteQuery with a
"Load more" button so all campaigns are accessible.
2026-03-07 07:04:56 +03:00
Fringg
f7afa002f0 feat: add discount UI for landing pages
Add discount configuration in admin editor and countdown timer
display on public purchase page.

- Add discount section to AdminLandingEditor with toggle, percent
  slider, datetime pickers, per-tariff overrides, live preview
- Add DiscountBanner with countdown timer to QuickPurchase page
  using AnimatePresence exit animation and proper interval cleanup
- Add strikethrough prices and discount badges to tariff cards,
  summary card and pay button with null/equality guards
- Add discount translations for ru and en locales
- Fix delete/toggle API return types to match backend contracts
- Fix isoToDatetimeLocal to preserve seconds on re-edit
- Fix preview rounding to match backend integer division
2026-03-07 07:01:46 +03:00
Fringg
c3cf805827 refactor: load RBAC users from API for audit log user filter
Instead of extracting users from log entries, fetch all users
with RBAC roles via dedicated endpoint for complete user list.
2026-03-07 06:23:39 +03:00
Fringg
40722747e3 feat: add user filter chips and resource types to audit log
- Replace user ID text input with checkbox-style user chips extracted from log entries
- Add sales_stats and landings to resource type filter
- Fix export not respecting status filter
- Remove dead auto-refresh interval code
- Add aria-pressed and focus-visible styles for accessibility
2026-03-07 06:17:25 +03:00
Fringg
5228b2dea6 feat: add landings permission section translations for role editor 2026-03-07 06:04:57 +03:00
Fringg
97959b0132 fix: prevent buyer from activating gift pending subscription
When a gift purchase results in pending_activation (recipient has active
subscription), the buyer was shown an Activate button and could replace
the recipient's subscription without consent.

- Add GiftPendingActivationState component showing "Gift sent" message
- Use ?activate=1 URL hint from recipient email to distinguish viewer
- Buyer sees success message, recipient sees activate button
- Add giftPendingActivationDesc translations (ru, en, zh, fa)
2026-03-07 06:00:17 +03:00
Fringg
bc45294487 feat: add external squad selection to tariff admin form
- Add ExternalSquadInfo type and getAvailableExternalSquads API method
- Add external_squad_uuid field to TariffDetail, TariffCreateRequest, TariffUpdateRequest
- Add radio-button external squad picker in Servers tab of tariff create/edit
- Add translations for external squad UI in all 4 locales (en, ru, zh, fa)
2026-03-07 05:44:29 +03:00
Fringg
b7c7decfd0 fix: adapt admin landings list for mobile layout
- Badges (active/inactive, gift) now wrap on narrow screens
- Action buttons move to a separate row on mobile (hidden/shown via sm:)
- Delete button pushed to the right on mobile for safety
- Reduced padding and gaps on small screens
- Desktop layout unchanged
2026-03-07 04:56:12 +03:00
Fringg
6d5c6fb9b3 fix: mobile layout and period label translations for quick purchase landing
- Add i18n period labels (ru/en/zh/fa) instead of backend English-only labels
- Period tabs wrap on mobile instead of horizontal scroll
- Prevent horizontal overflow shifting the layout
2026-03-07 04:04:39 +03:00