Commit Graph

485 Commits

Author SHA1 Message Date
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
FireWookie
798c702704 Merge pull request #1 from FireWookie/dev
Dev
2026-03-10 15:11:31 +05:00
FireWookie
377513d782 Merge branch 'BEDOLAGA-DEV:main' into dev_nikita 2026-03-10 15:08:17 +05:00
FireWookie
97fcb4b39f Merge branch 'BEDOLAGA-DEV:main' into feature/riopay 2026-03-10 15:07:45 +05:00
Fringg
39bdf8b5c3 fix: CopiedToast not visible due to CSS transform context
Use createPortal to render toast at document.body level,
escaping framer-motion's transform on the tab content wrapper.
Remove unused useRef import and shareToastTapCopy i18n key.
2026-03-10 07:39:04 +03:00
Fringg
0322974ebd fix: replace orphaned shareModal i18n keys in GiftResult
GiftResult.tsx referenced gift.shareModalCopied and shareModalCopyAll
which were removed with the modal. Use common.copied and add new
gift.copyMessage key instead.
2026-03-10 07:30:17 +03:00
Fringg
9fbfcf21ff refactor: replace share modal with auto-copy toast
Remove the full-screen ShareModal dialog that appeared when sharing a
gift code. Replace with a bottom toast that automatically copies the
share message to clipboard on button press and slides up from the
bottom. The toast auto-dismisses after 5 seconds and can be tapped
to copy again.
2026-03-10 07:27:39 +03:00
Fringg
51cc1221d0 fix: add null guard for purchase_token before rendering CodeOnlySuccessState 2026-03-10 06:56:16 +03:00
Fringg
7945071893 refactor: rename GIFTCODE_ start parameter prefix to GIFT_ 2026-03-10 06:48:57 +03:00
Fringg
7549ae70eb feat: show localized error for self-activation attempt 2026-03-10 06:45:14 +03:00
Fringg
51ec799c0c feat: split my gifts into Active/Activated/Received sections
Sent gifts are now sorted into "Active gifts" (awaiting activation)
and "Activated" (already used). Received gifts remain separate.
2026-03-10 06:39:50 +03:00
Fringg
73d67bceed fix: use short 12-char code in bot and cabinet share links
GIFTCODE_ prefix (9 chars) + full 64-char token = 73 chars,
exceeding Telegram's 64-char start parameter limit. Now all
share links use the same short code shown in the UI (first 12
chars). Backend already supports prefix-based lookup.
2026-03-10 06:30:49 +03:00
Fringg
b213535738 fix: remove dark backdrop overlay from share modal 2026-03-10 06:25:06 +03:00
Fringg
a627eb0b30 fix: gift code display + share modal backdrop
- Don't uppercase gift codes (tokens are case-sensitive base64)
- Lighten share modal backdrop (bg-dark-900/40 instead of bg-black/60)
2026-03-10 06:20:29 +03:00
Fringg
d852bfe969 fix: activation broken — token uppercased + wrong env var for bot username
- Remove .toUpperCase() from activation code input — tokens are case-sensitive base64
- Fix VITE_BOT_USERNAME → VITE_TELEGRAM_BOT_USERNAME (correct env var name)
- Add Escape key handler, scroll lock, role="dialog" to ShareModal
2026-03-10 06:13:50 +03:00
Fringg
1bafcca1ef fix: gift UI improvements — declension, GB display, share modal, deep links
- Fix Russian device count declension (_one/_few/_many)
- Show traffic GB and tariff description in buy tab
- Replace copy/share buttons with share modal (bot + cabinet links)
- GiftResult: code-only success state with formatted share message
- Support ?tab=activate&code=TOKEN for auto-activation via cabinet link
- Add is_code_only + purchase_token to API types
2026-03-10 06:03:28 +03:00
Fringg
af3e535c69 feat: gift subscription redesign — code-only purchase + 3-tab UI
- Remove recipient input from buy flow (code-only gifts)
- 3-tab UI: Buy, Activate, My Gifts with animations
- After purchase, switch to My Gifts tab to show gift code
- Gift code display with copy/share buttons
- Activate tab: enter gift code to activate subscription
- My Gifts tab: sent/received gifts with status badges
- Fix: use navigator.language instead of hardcoded ru-RU for dates
- Fix: spread array before sort to prevent React Query cache mutation
- Fix: ARIA tab linkage with proper id/aria-labelledby
- Fix: guard VITE_BOT_USERNAME against undefined in share URLs
- Fix: wrap clipboard/share fallbacks in try/catch
- Add error state to MyGiftsTabContent
2026-03-10 05:37:57 +03:00
Fringg
ea06ad1d8f fix: show fallback when tariff has no available periods for renewal
When all periods are removed from a tariff, users saw an empty
purchase form with no way to renew. Now shows a message explaining
the situation and a button to choose a different tariff.
2026-03-10 01:27:48 +03:00
Fringg
23aa86f1a8 feat: add menu editor tab with drag-and-drop rows, custom URL buttons, and button configuration
- Add menuLayout.ts API client with normalizeConfig and type definitions
- Add MenuEditorTab.tsx with DnD rows, button CRUD, style/emoji/label editors
- Replace ButtonsTab with MenuEditorTab on admin settings page
- Add menu editor translations for ru, en, zh, fa locales
- Loading/error states, useMemo optimizations, proper ref patterns
2026-03-09 23:07:38 +03:00
Fringg
9c7ab4b789 fix: admin promo groups - add default toggle, fix threshold reset to 0
- Added is_default toggle to promo group create/edit form
- Send 0 instead of null when clearing auto-assign threshold
- Added isDefault i18n keys for ru, en, zh, fa
2026-03-09 22:08:43 +03:00
Fringg
45203dac59 fix: remove noreferrer from payment links to preserve Referer header
WATA DDoS Guard blocks requests without Referer (403 error).
Removed noreferrer from window.open and <a> tags on payment URLs.
noopener alone is sufficient for security (prevents window.opener access).
2026-03-09 21:53:55 +03:00
Fringg
4322d58ff8 feat: read gift warning from status response, soften poll error state
- Add warning field to GiftPurchaseStatus type
- Read warning from status response with URL param fallback
- Show PollErrorState for all poll errors (softer UX for gateway payments)
2026-03-09 21:26:02 +03:00
Fringg
c8ec221111 fix: remove bg-dark-950 from gift pages to preserve animated background 2026-03-09 21:03:05 +03:00
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
814b1f5e96 feat: add GiftSubscription and GiftResult pages 2026-03-09 18:56:16 +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
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
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
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
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