Commit Graph

1122 Commits

Author SHA1 Message Date
Fringg
7cf72735ec fix: plug memory leaks in blob URLs and traffic cache
- Add URL.revokeObjectURL on unmount and media removal in
  AdminBroadcastCreate, AdminPinnedMessageCreate, Support
- Track blob URLs via refs to revoke before creating new ones
- Add clearCreateAttachment/clearReplyAttachment helpers in Support
  to properly revoke blob URLs when clearing attachments
- Cap adminTraffic cache at 20 entries with FIFO eviction to prevent
  unbounded memory growth from different filter combinations
2026-02-23 17:15:11 +03:00
Fringg
17b2f2e903 perf: extract Twemoji options to module-level const
Prevent MutationObserver re-initialization on every render by moving
the options object out of JSX (was creating a new object reference
on each render of AppWithNavigator).
2026-02-23 17:15:03 +03:00
Fringg
860493058a perf: fix GPU-heavy CSS patterns
- Remove mix-blend-mode: overlay from body::before noise texture
  (was forcing fullscreen GPU compositing on every paint)
- Disable noise texture on mobile via display:none media query
- Replace backdrop-filter animation in backdropFadeIn/Out keyframes
  with opacity-only animation (backdrop-filter transition is expensive)
- Replace toast progress bar width animation with scaleX (GPU-composited)
- Remove redundant will-change: transform from .glass and .wave-blob
2026-02-23 17:14:57 +03:00
Fringg
9a84e13e6c perf: fix critical WebGL GPU resource leaks in Aurora
- Fix isWebglAvailable() leaking a full WebGL context on every check
  by replacing OGL Renderer with raw canvas.getContext() + loseContext()
- Add visibilitychange listener to fully stop rAF loop when tab hidden
  and restart on visibility restore (was running 24/7 in background)
- Properly destroy WebGL context on unmount via WEBGL_lose_context
  extension and gl.deleteProgram() (was only nulling JS refs)
- Reduce target FPS from 20 to 10 (slow gradient, visually identical)
2026-02-23 17:14:47 +03:00
Fringg
0b4e8253aa fix: render newlines in tariff description
Add whitespace-pre-line to tariff description div so newline
characters entered via admin panel are rendered as line breaks.
2026-02-23 16:23:33 +03:00
Fringg
ed65c29bac fix: parse raw query string for deep link params to avoid double-decode
Previous fix used URLSearchParams.get() which already fully decodes,
then called decodeURIComponent() again causing double-decode of %
sequences. Parse raw query string pairs directly instead —
decodeURIComponent does not treat + as space, preserving base64.
2026-02-23 15:59:43 +03:00
Fringg
65add9a111 fix: preserve + chars in deep link URL params for crypto links
URLSearchParams decodes + as space, breaking base64-encoded crypto
deep links (ss://, vless://, etc). Use raw param extraction with
manual decoding to preserve + characters.
2026-02-23 15:50:37 +03:00
Fringg
321bedcb61 fix: stack promo offer discounts with promo group discounts
Redesign applyPromoDiscount to apply promo offer on top of promo group
prices instead of treating them as mutually exclusive. Calculate combined
discount percent from the deepest original price. Show promo banner in
confirm step regardless of existing server discounts.
2026-02-23 15:44:23 +03:00
Fringg
91d567f9cc fix: add resend email cooldown and allow email change for all auth types
Add 60-second cooldown timer on resend verification email button to
prevent spam. Remove auth_type restriction on change email button so
OAuth users can also change their email.
2026-02-23 15:44:16 +03:00
Egor
62709a3a63 Merge pull request #230 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.19.0
2026-02-19 02:14:46 +03:00
github-actions[bot]
7beac4adae chore(main): release 1.19.0 2026-02-18 23:14:32 +00:00
Egor
9bb66f014a Merge pull request #229 from BEDOLAGA-DEV/dev
dev
2026-02-19 02:14:10 +03:00
Fringg
2b2ead837c feat: add referral code persistence across all auth methods
Mirrors campaign.ts localStorage pattern to capture ?ref= from URL and pass
referral_code to backend during Telegram Widget, OAuth, email login, and
Mini App authentication. Fixes redirect loop when email auth is disabled.
2026-02-18 23:59:32 +03:00
Egor
d9e295e9a1 Merge pull request #228 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.18.0
2026-02-18 10:03:57 +03:00
github-actions[bot]
7a01540461 chore(main): release 1.18.0 2026-02-18 06:57:28 +00:00
Egor
12204b6925 Merge pull request #227 from BEDOLAGA-DEV/dev
Dev
2026-02-18 09:56:56 +03:00
Fringg
271a005e87 feat: show traffic reset info in subscription card 2026-02-18 09:41:36 +03:00
Fringg
cfe9f642d8 feat: show traffic reset period on tariff cards
Display daily/weekly/monthly reset badge next to traffic and devices.
Hidden for NO_RESET tariffs.
2026-02-18 09:36:39 +03:00
Fringg
19e62fccf1 fix: rename Серверы to Локации in subscription card 2026-02-18 09:29:44 +03:00
Fringg
0fac3689e5 fix: remove server/location count from tariff cards and confirmation
Server info only shown in user's active subscription card.
2026-02-18 09:28:43 +03:00
Fringg
ecc089da64 fix: show locations count instead of servers on tariff cards
servers_count already represents squad count on backend.
Renamed display labels to "locations" on tariff cards and
confirmation view. Server names still shown in subscription card.
2026-02-18 09:25:44 +03:00
Fringg
98ab1099b9 fix: remove duplicate min withdrawal amount on referral page
Show cannot_request_reason OR minAmount hint, not both —
the reason already includes the minimum amount info.
2026-02-18 09:18:40 +03:00
Fringg
96f9a719fd fix: hide empty blocks in connection installation guide
Filter out blocks with no title, description, or buttons
instead of rendering empty cards/accordions/timeline items.
2026-02-18 09:17:10 +03:00
Fringg
8207368ef7 fix: use correct translation key for inactive campaign badge 2026-02-18 06:53:16 +03:00
Fringg
959f89266b feat: partner-campaign integration in admin UI
- Add partner badge to campaigns list
- Add partner selector dropdown in campaign edit
- Support ?partnerId= query param in campaign create (replaces separate page)
- Filter already-assigned campaigns in partner assign flow
- Show taken campaigns greyed out with partner name
- Delete AdminPartnerCampaignCreate (replaced by query param approach)
- Add partner translations (ru, en, zh, fa)
2026-02-18 06:47:07 +03:00
Fringg
76d20fdb1a feat: admin partner settings page, partner section visibility toggle, custom requisites text
- New AdminPartnerSettings page with validation (pattern from AdminTicketSettings)
- Settings gear button on AdminPartners header
- Hide partner/withdrawal sections when partner_section_visible is false
- Use custom requisites_text as label in withdrawal form
- i18n keys for ru/en
2026-02-18 04:12:19 +03:00
Fringg
9cf8e095b8 feat: show blocked_count in broadcast admin UI
- Add blocked_count to Broadcast interface
- 4-column stats grid with blocked card (warning color)
- Show blocked count in broadcast list when > 0
- Fetch single broadcast by ID instead of listing all
- Add i18n keys for blocked/blockedShort in ru/en/zh/fa
2026-02-17 18:37:45 +03:00
Fringg
74c4c87ec0 refactor: extract shared withdrawal utils and fix status badge fallbacks
- extract formatDate, statusBadgeConfig, getRiskColor to shared utils
- use explicit unknown fallback for unrecognized status values
- add missing 'unknown' i18n keys for withdrawal status
2026-02-17 12:42:42 +03:00
Fringg
9b2742ff3a fix: add missing cancelled filter key to withdrawal i18n in all locales 2026-02-17 12:28:32 +03:00
Fringg
be168a75df fix: reduce campaigns fetch limit to 100 (backend max)
Backend validates limit with le=100, sending 200 caused 422 error.
2026-02-17 11:02:38 +03:00
Fringg
a72042d807 fix: show all campaigns in assign list, add dual links and bonus details
1. Remove is_active filter from campaign assign page so inactive
   campaigns are also visible (with badge)
2. Redesign partner campaign cards with separate bot/cabinet links,
   detailed bonus descriptions, and per-link copy buttons
2026-02-17 10:54:36 +03:00
Fringg
8b33d8224d feat: show partner campaign links with bonuses on referral page
Display campaigns assigned to the partner with shareable deep links,
copy button, and bonus type badges (balance/subscription/tariff).
2026-02-17 10:45:13 +03:00
Fringg
2efce0eb03 fix: stop WS reconnect loop on auth rejection (code 1008)
When the server closes WebSocket with 1008 (invalid token), the client
no longer retries — eliminates log spam from stale sessions.
2026-02-17 10:36:38 +03:00
Fringg
062976180c refactor: convert partner/withdrawal modals to separate pages
Replace 7 modal dialogs with 8 dedicated page routes for better
mobile/Telegram WebApp UX. Add campaign management (assign/create
with auto-assign) to partner detail page.

New pages: AdminApplicationReview, AdminPartnerCommission,
AdminPartnerRevoke, AdminWithdrawalReject, AdminPartnerCampaignAssign,
AdminPartnerCampaignCreate, ReferralPartnerApply,
ReferralWithdrawalRequest.

~610 lines removed from parent pages, ~425 lines removed net.
2026-02-17 10:28:32 +03:00
Fringg
779fbf0dc6 feat: add partner management and withdrawal admin pages
- Admin partners page: list partners, view applications, approve/reject
- Admin partner detail: stats, commission management, campaign assignment
- Admin withdrawals page: list with risk scoring, status filters including cancelled
- Admin withdrawal detail: fraud analysis, approve/reject/complete actions
- Partner API client with full TypeScript interfaces
- Withdrawal API client with admin and user endpoints
- Referral page: partner application form, withdrawal balance and history
- Navigation: partners and withdrawals in admin panel marketing group
- i18n: full translations for ru, en, zh, fa locales
- Neutral fallbacks for unknown status badges
2026-02-17 09:51:48 +03:00
Egor
1c1d72f7f0 Merge pull request #226 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.17.0
2026-02-17 07:25:40 +03:00
github-actions[bot]
cecaa4bacc chore(main): release 1.17.0 2026-02-17 04:01:32 +00:00
Egor
aa8262d16c Merge pull request #225 from BEDOLAGA-DEV/dev
Dev
2026-02-17 07:01:11 +03:00
Fringg
e0dd21fd0b feat: add web campaign links — capture, auth integration, bonus UI
- Add campaign.ts utility (capture from URL, localStorage with TTL, validation)
- Pass campaign_slug in all auth API methods (telegram, widget, email, oauth)
- Consume slug in auth store login methods, set pendingCampaignBonus state
- Add CampaignBonusNotifier component (toast on bonus, mounted in AppShell)
- Show web_link alongside bot deep_link in AdminCampaignStats
- Add CampaignBonusInfo type with union bonus_type
- Fix VerifyEmail: ref guard against StrictMode double-fire, setTimeout cleanup
- Fix AdminCampaignStats: setTimeout refs with cleanup, i18n-aware locale
- Wrap all localStorage access in try/catch (Safari private browsing safety)
- Add campaignBonus translations (ru/en/fa/zh)
2026-02-17 06:44:10 +03:00
Egor
850124f469 Merge pull request #223 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.16.1
2026-02-16 07:32:27 +03:00
github-actions[bot]
003071dd6b chore(main): release 1.16.1 2026-02-16 04:32:01 +00:00
Egor
820001458b Merge pull request #222 from BEDOLAGA-DEV/dev
fix: move cabinet_branding to sessionStorage and add WebGL availabili…
2026-02-16 07:31:43 +03:00
Fringg
fc7ee6abfe fix: move cabinet_branding to sessionStorage and add WebGL availability check
- Branding cache moved from localStorage to sessionStorage so it clears
  when the mini-app is closed, preventing stale names after admin updates
- Added initialDataUpdatedAt: 0 to all branding queries so fresh data is
  always fetched on page refresh while showing cached data instantly
- One-time migration moves existing localStorage value to sessionStorage
- Aurora component now checks WebGL availability upfront, skipping all
  hooks and subscriptions when WebGL is not supported
2026-02-16 07:25:06 +03:00
Egor
8a07fad7ed Merge pull request #221 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.16.0
2026-02-16 02:20:58 +03:00
github-actions[bot]
e2f20c5781 chore(main): release 1.16.0 2026-02-15 23:20:26 +00:00
Egor
44fe3cec2c Merge pull request #220 from BEDOLAGA-DEV/dev
Dev
2026-02-16 02:20:07 +03:00
Fringg
54f1483312 fix: prevent button settings cards from overflowing in admin panel
- Add flex-wrap to color picker chips so they wrap on narrow cards
- Add min-w-0/truncate to header text, shrink-0 to badge+toggle group
- Reduce chip padding for better fit in 2-column grid
- Add overflow-hidden to card container as safety net
2026-02-16 02:10:52 +03:00
Fringg
22bda66e81 fix: wheel lands on correct prize sector for Stars payment spins
Stars payment flow previously used Math.random() for wheel rotation,
causing visual mismatch between where the wheel lands and the actual
prize won. Now polls for backend result first, calculates the correct
rotation angle matching the prize sector, then starts the animation.
2026-02-16 02:06:23 +03:00
Fringg
bbe0fe0f04 docs: rewrite README with correct Caddy proxy config and step-by-step installation guide 2026-02-16 01:50:50 +03:00
Fringg
150a1b2dba fix: normalize all API responses, add error handling and reset confirmation
- Extract normalizeConfig() for consistent response normalization
- Add onError handlers to mutations with useNotify
- Add window.confirm before destructive reset action
- Add resetConfirm translation key to all locales
2026-02-13 00:41:00 +03:00