Commit Graph

913 Commits

Author SHA1 Message Date
Fringg
2dfa520604 feat: add admin traffic packages and device limit management UI
Add device limit +/- stepper, traffic packages display with inline
delete, add traffic dropdown from tariff config, translations for
ru/en/zh/fa.
2026-02-08 21:13:46 +03:00
Fringg
6f31fbe6b5 feat: add device management UI in admin user card
Show connected devices in subscription tab with ability to:
- View device platform, model, HWID and connection date
- Delete individual devices
- Reset all devices at once
2026-02-08 20:49:07 +03:00
Fringg
92d206f5b6 feat: add inline referral commission editing in admin user card
Admins can now edit individual referral commission percent directly
in the user detail card. Shows "Default" when no custom value is set.
2026-02-08 20:29:56 +03:00
Fringg
23f56afaf7 fix: stretch low-res Aurora canvas to fill viewport
OGL renderer.setSize() sets both the internal buffer and CSS dimensions,
so the 10% resolution canvas was only covering 10% of the screen.
Now explicitly reset canvas.style.width/height to 100% after setSize()
so the small buffer is upscaled by the browser to full viewport.
2026-02-08 17:46:23 +03:00
Fringg
56788b12e7 perf: reduce Aurora animated background GPU load by ~95%
- Render WebGL canvas at 10% viewport resolution (~20K px vs 2M px)
- Replace backdrop-filter: blur(80px) with filter: blur(20px) on canvas
  (backdrop-filter composites ALL layers underneath — 10-20x more expensive)
- Disable antialiasing (useless when output is blurred)
- Lower target FPS from 30 to 20 (imperceptible for ambient background)
- Add CSS contain: strict to isolate layout/paint recalculations
- Remove separate blur overlay div (one element instead of two)

Reported: GTX 1660S showed 30-55% GPU load with cabinet open.
Expected: ~1-5% GPU after this change.
2026-02-08 17:40:35 +03:00
Fringg
de09ea039b fix: hide backend URL from logo by fetching as blob
Logo images were exposing the backend API URL in the DOM via <img src>.
Now preloadLogo() fetches the image as a blob and serves it through
URL.createObjectURL(), so only blob: URLs appear in the page source.
Blob is invalidated on logo upload/delete.
2026-02-08 17:40:24 +03:00
Egor
a449dd6981 Merge pull request #200 from BEDOLAGA-DEV/fix/telegram-miniapp-session-persistence
fix: persist refresh token across Telegram Mini App reopens
2026-02-08 16:08:20 +03:00
Fringg
20ea2006ff fix: persist refresh token across Telegram Mini App reopens
Telegram Mini App creates a new WebView on each open, clearing
sessionStorage. Combined with 24h auth_date validation on backend,
returning users couldn't re-authenticate after closing the app.

- Move refresh token to localStorage for persistence across sessions
- Keep access token in sessionStorage (short-lived, OK to lose)
- Fix auth store initialize() to recover when access token is missing
  but refresh token exists in localStorage
- Remove separate mountThemeParams() call to fix ConcurrentCallError
  (mountMiniApp() handles it internally in SDK v3)
- Update token migration logic for new storage strategy
2026-02-08 16:06:51 +03:00
Egor
1aa0e7f943 Merge pull request #193 from BEDOLAGA-DEV/fix/user-column-min-width
fix: column shrinking on mobile + country dropdown overflow
2026-02-07 13:43:20 +03:00
Fringg
060c9bef54 fix: enforce column maxWidth for proper shrinking on mobile + country dropdown positioning 2026-02-07 13:42:15 +03:00
Egor
84cce93aec Merge pull request #192 from BEDOLAGA-DEV/fix/user-column-min-width
feat: traffic page filters, risk assessment, country filter & CSV export
2026-02-07 13:31:01 +03:00
Fringg
471e2c8c43 feat: add country filter and risk columns to traffic CSV export
- Add CountryFilter dropdown with flag emoji + node count per country
- Country filter merges with node filter for both table and CSV export
- Pass total/node GB/day thresholds to backend for risk columns in CSV
- CSV now includes Risk Level, Risk Ratio, Risk GB/day when thresholds set
2026-02-07 13:29:14 +03:00
Egor
6aa8951ce2 Merge pull request #191 from BEDOLAGA-DEV/fix/user-column-min-width
fix: allow user column to shrink smaller on mobile
2026-02-07 13:18:53 +03:00
Fringg
12663a59a7 fix: allow user column to shrink smaller on mobile
Reduce minSize from 80px to 40px so the user column can be compressed
further on narrow screens.
2026-02-07 13:17:08 +03:00
Egor
c54cc9e577 Merge pull request #190 from BEDOLAGA-DEV/fix/mobile-column-resize
fix: widen column resize touch target for mobile
2026-02-07 13:13:15 +03:00
Fringg
da273d6776 fix: widen column resize touch target for mobile devices
Expand invisible touch area from 4px to 20px for comfortable finger
interaction on iPhone. Visual indicator stays thin (4px) inside the
wider hit zone. Use inline touchAction: none to prevent scroll conflict.
2026-02-07 13:11:01 +03:00
Egor
4fe96bc00c Merge pull request #189 from BEDOLAGA-DEV/fix/risk-display-improvements
fix: improve risk assessment display with GB/d values
2026-02-07 13:01:15 +03:00
Fringg
e60b846eca fix: improve risk calculation display with actual GB/d values
- RiskBadge now shows real daily GB/d value + mini progress bar
- Node cells show daily rate subtitle when threshold is active
- Total column shows daily rate subtitle when threshold is active
- getCompositeRisk returns both ratio and dominant GB/d value
- formatGbPerDay helper for clean number formatting
2026-02-07 12:59:11 +03:00
Egor
88f8e8be7d Merge pull request #188 from BEDOLAGA-DEV/feat/traffic-risk-assessment
feat: traffic abuse risk assessment with color gradation
2026-02-07 12:42:59 +03:00
Fringg
a6507b2cfe feat: add traffic abuse risk assessment with color gradation
Add threshold inputs (total GB/day, per-node GB/day) to admin traffic
usage page. When set, rows get background color gradation (green to red)
and node cells get text color (blue to red) based on threshold ratios.
Conditional Risk column shows composite risk badge with level indicator.
7 i18n keys added across all 4 locales (ru, en, zh, fa).
2026-02-07 12:41:34 +03:00
Egor
8b113a54e3 Merge pull request #186 from BEDOLAGA-DEV/feat/traffic-filters-daterange
feat: node/status filters + custom date range for traffic page
2026-02-07 11:55:02 +03:00
Fringg
90b38e3ef2 feat: add node/status filters and custom date range to traffic page
- Add NodeFilter component with flag emojis and checkbox dropdown
- Add StatusFilter component with colored status dots
- Add custom date range picker (calendar toggle, from/to date inputs)
- Wire all filters to backend params (nodes, statuses, start_date, end_date)
- CSV export passes all active filters and date range
- Add displayNodes memo for table column filtering
- Add i18n keys for nodes, statuses, dates in ru/en/zh/fa
2026-02-07 11:53:09 +03:00
Fringg
b5a0562615 Revert "Merge pull request #185 from BEDOLAGA-DEV/feat/traffic-filters-devices"
This reverts commit e824945b73, reversing
changes made to 81fcf54b15.
2026-02-07 11:29:41 +03:00
Egor
e824945b73 Merge pull request #185 from BEDOLAGA-DEV/feat/traffic-filters-devices
feat: add node/status filters, date range, devices to traffic page
2026-02-07 11:21:35 +03:00
Fringg
0301fd8566 feat: add node/status filters, custom date range, connected devices to traffic page
- Add NodeFilter dropdown with flag emojis and checkbox selection
- Add StatusFilter dropdown with colored status dots
- Add DateRangePicker with From/To date inputs, toggle from period mode
- Devices column now shows N/M (connected/limit) with accent color
- Export CSV passes all active filters to backend
- New i18n keys for nodes, statuses, dates in ru/en/zh/fa
2026-02-07 11:20:17 +03:00
Egor
81fcf54b15 Merge pull request #184 from BEDOLAGA-DEV/fix/traffic-smooth-loading
fix: client-side caching and smooth loading for traffic page
2026-02-07 09:49:16 +03:00
Fringg
471c37b7b3 fix: add client-side caching and smooth loading for traffic page
- Add 5-min in-memory cache in API layer keyed by request params
- Replace blocking spinner with animated progress bar during refresh
- Keep stale data visible while fetching (opacity dim)
- Prefetch all periods in background for instant switching
2026-02-07 09:47:02 +03:00
Egor
c383c78213 Merge pull request #183 from BEDOLAGA-DEV/feat/traffic-tariff-filter
feat: tariff checkbox filter + column resizing for traffic
2026-02-07 09:32:18 +03:00
Fringg
cfb7ce72f2 feat: add tariff checkbox filter, column resizing to traffic page
- TariffFilter dropdown with checkboxes for filtering by tariff
- Column resizing via TanStack Table resize handles
- Add allTariffs locale key to all 4 languages
- Pass tariffs param to API
2026-02-07 09:30:23 +03:00
Egor
8c8fa407f5 Merge pull request #182 from BEDOLAGA-DEV/feat/admin-traffic-usage
feat: add admin traffic usage page
2026-02-07 09:05:54 +03:00
Fringg
a034a6068c feat: add admin traffic usage page with TanStack Table
Add AdminTrafficUsage page showing per-user traffic statistics by node
with period filtering (1/3/7/14/30d), server-side sorting, search,
pagination, and CSV export. Uses @tanstack/react-table with manual
sorting and dynamic node columns.
2026-02-07 09:04:55 +03:00
Egor
280f4aef0d Merge pull request #181 from BEDOLAGA-DEV/feat/admin-user-promo-management
feat: promo group & offer management in AdminUserDetail
2026-02-07 08:15:55 +03:00
Fringg
8bd3c007bc feat: add promo group and promo offer management to AdminUserDetail
- Info tab: promo group card with inline dropdown to change/remove group
- Balance tab: active promo offer display with deactivate button
- Balance tab: send promo offer form (discount %, valid hours)
- Add deactivateDiscount API method to promocodesApi
- Add locale keys for ru/en/zh/fa
- Fix race condition in subscription create (stale state read)
- Fix unhandled promise in handleInlineConfirm
- Remove unused legacy adminUsers block from ru.json
2026-02-07 08:10:44 +03:00
Fringg
de28463b79 chore: bump version to 1.9.0 2026-02-07 07:17:46 +03:00
Egor
fa48cc438b Merge pull request #178 from BEDOLAGA-DEV/feat/desktop-info-nav
feat: add Info page link to desktop top navigation
2026-02-07 07:11:32 +03:00
Fringg
18a14d64ea feat: add Info page link to desktop top navigation
The Info button was only accessible via mobile hamburger menu.
Added it to the desktop header nav bar between Support and Profile.
2026-02-07 07:11:09 +03:00
Egor
fb055c04e8 Merge pull request #177 from BEDOLAGA-DEV/feat/info-telegram-formatting
feat: support Telegram HTML formatting in privacy/offer content
2026-02-07 07:02:30 +03:00
Fringg
3e70008b81 feat: support Telegram HTML formatting in privacy/offer content
- Fix formatContent to handle mixed content (inline HTML + newlines)
- Only skip paragraph conversion for content with block-level HTML
- Add sanitizer support for <s>, <del>, <ins>, <tg-spoiler>
- Add prose styles for underline, strikethrough, and spoiler tags
- Light theme variants included
2026-02-07 07:02:24 +03:00
Egor
f36ee60c0b Merge pull request #176 from BEDOLAGA-DEV/feat/node-usage-more-periods
feat: add 1d and 3d period filters for node usage
2026-02-07 06:55:48 +03:00
Fringg
944b2eca02 feat: add 1d and 3d period filters for node usage 2026-02-07 06:55:42 +03:00
Egor
64ea75738f Merge pull request #175 from BEDOLAGA-DEV/feat/node-usage-local-period
feat: local period calculation and refresh button for node usage
2026-02-07 06:51:25 +03:00
Fringg
bc6985f522 feat: local period calculation and refresh button for node usage
- Load panel + node data once on tab open (not per period change)
- Compute 7/14/30 day totals locally from cached daily data
- Add refresh button to subscription section
- No API calls when switching periods
2026-02-07 06:50:50 +03:00
Egor
14b73f6db5 Merge pull request #174 from BEDOLAGA-DEV/fix/node-usage-accessible-nodes
fix: add country flags to node usage display
2026-02-07 06:22:58 +03:00
Fringg
80bad9d623 fix: add country flags to node usage display
- Add country_code to UserNodeUsageItem type
- Add getCountryFlag helper for country code to emoji mapping
- Show country flag next to node name in usage bars
2026-02-07 06:22:08 +03:00
Egor
0083b47d04 Merge pull request #173 from BEDOLAGA-DEV/feature/admin-user-detail-enhanced
feat: enhance admin user detail with campaign, panel data, node usage
2026-02-07 06:09:55 +03:00
Fringg
7b19f14dc3 feat: enhance admin user detail with campaign, panel data, node usage
- Add campaign card and referrals list to info tab
- Add panel config/links, live traffic, connection info to subscription tab
- Add node usage bars with 7/14/30 day period selector
- Add getPanelInfo/getNodeUsage API methods and types
- Add 18 new i18n keys across 4 languages
2026-02-07 06:07:13 +03:00
Egor
e0c9a89d34 Merge pull request #172 from BEDOLAGA-DEV/feat/ticket-user-profile-link
feat: user profile link in ticket detail
2026-02-07 05:39:51 +03:00
Fringg
d483d84f1c feat: add user profile link button in ticket detail
Add a button next to the ticket sender info that navigates to the
user's admin detail page. Localized in all 4 languages.
2026-02-07 05:39:30 +03:00
Egor
5664b283d6 Merge pull request #171 from BEDOLAGA-DEV/fix/ticket-status-buttons
feat: add ticket status buttons to inline chat
2026-02-07 05:36:32 +03:00
Fringg
dafa69f736 feat: add ticket status change buttons to inline chat
Add status buttons (open/pending/answered/closed) to the ticket
chat view in admin user detail page.
2026-02-07 05:36:04 +03:00