Commit Graph

1398 Commits

Author SHA1 Message Date
Fringg
8629cfea18 fix: daily tariff renewal uses purchaseTariff instead of renewSubscription
- Expired daily tariffs now call purchaseTariff(tariff_id, 1) for 1-day purchase
- Balance check uses daily_price_kopeks for daily tariffs instead of 100 kopeks minimum
- Disabled daily tariffs still use togglePause for resume
2026-03-10 03:30:13 +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
Egor
0bc2acb5ec Merge pull request #268 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.29.0
2026-03-09 23:42:06 +03:00
github-actions[bot]
79fabc3e48 chore(main): release 1.29.0 2026-03-09 20:41:52 +00:00
Egor
8351c93bec Merge pull request #267 from BEDOLAGA-DEV/dev
Dev
2026-03-09 23:41:22 +03:00
Egor
4ac3792971 Merge pull request #266 from BEDOLAGA-DEV/main
w
2026-03-09 23:40:15 +03:00
Fringg
638844ef47 feat: add open_in setting for custom buttons (external browser / Telegram miniapp) 2026-03-09 23:33:05 +03:00
Fringg
082471bf92 feat: add button reordering within rows and replace modal with inline add panel
- Add up/down arrow buttons to reorder buttons within rows (builtin + custom)
- Replace AddButtonDialog modal (bg-black/50 overlay) with inline expandable panel
- Add moveUp/moveDown i18n keys for all locales (en/ru/zh/fa)
- Add aria-labels for accessibility on reorder buttons
2026-03-09 23:26:16 +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
78fda22679 fix: add missing nameRequired i18n key for promo group form validation 2026-03-09 22:16:37 +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
dc740ae266 fix: restore session from refresh token when access token is missing
When access token is absent from sessionStorage (tab reopen, page refresh)
but refresh token exists in localStorage, the request interceptor now
attempts token refresh before sending the request. Previously it would
send the request without Authorization header, causing 401 errors on
endpoints like /cabinet/auth/email/register.
2026-03-09 21:58:46 +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
622172f038 feat: add gradient fade indicators to scrollable desktop nav 2026-03-09 21:09:37 +03:00
Fringg
ab7d1b7f25 fix: make desktop nav horizontally scrollable on narrow screens 2026-03-09 21:05:36 +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
9542607832 feat: add gift subscription toggle to admin branding settings
Add CABINET_GIFT_ENABLED toggle in Admin Settings > Branding > Interface Options,
alongside existing fullscreen and email auth toggles. Includes updateGiftEnabled
API method and i18n keys for all 4 locales (ru/en/zh/fa).
2026-03-09 20:56:42 +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
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
Egor
6e1e232150 Merge pull request #265 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.28.0
2026-03-09 05:07:59 +03:00
github-actions[bot]
7f3441a517 chore(main): release 1.28.0 2026-03-09 02:07:15 +00:00
Egor
16bf7c5f02 Merge pull request #264 from BEDOLAGA-DEV/dev
Dev
2026-03-09 05:06:49 +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