Commit Graph

927 Commits

Author SHA1 Message Date
c0mrade
32998697c3 Merge pull request #209 from BEDOLAGA-DEV/feat/connection-empty-state
Feat/connection empty state
2026-02-09 12:31:58 +03:00
c0mrade
a4e6e35da1 fix: check apps before subscription on connection page
Move the empty apps check before the subscription check so that
an empty or unconfigured appConfig shows "not configured" instead
of the misleading "no subscription" message.
2026-02-09 12:29:00 +03:00
c0mrade
772d83d1c9 fix: remove @floating-ui from radix chunk to resolve circular dependency 2026-02-09 11:45:19 +03:00
c0mrade
2c126f5e12 perf: extract locales into separate chunk
Move locale JSON files into a dedicated 'locales' chunk to reduce
the main index bundle from ~565 KB to ~186 KB.
2026-02-09 11:40:06 +03:00
c0mrade
fb25df6f0f feat: add empty state for connection page when no apps configured
Show different messages depending on user role:
- Regular users see a friendly "check back later" message
- Admins see a prompt with a link to /admin/apps settings
2026-02-09 11:23:33 +03:00
c0mrade
03a7db53fb Merge pull request #208 from BEDOLAGA-DEV/fix/hide-back-button-on-bottom-nav
fix: hide Telegram back button on bottom nav pages
2026-02-09 10:53:13 +03:00
c0mrade
e5ed6d0401 fix: hide Telegram back button on bottom nav pages
Back button was showing on all non-root routes including top-level
pages reachable from the bottom navigation menu (subscription, balance,
referral, support, wheel). These pages don't need a back button since
users navigate between them via the bottom tab bar.
2026-02-09 10:48:25 +03:00
Fringg
0389acdf83 fix: prevent useCloseOnSuccessNotification from firing on mount
The hook checked closeOthersSignal > 0 which only skipped signal=0.
After first payment, signal stays at 1+ forever causing TopUpAmount
to immediately navigate away on every mount. Now tracks the signal
value at mount time and only reacts to changes after mount.
2026-02-09 05:53:33 +03:00
Fringg
0c34668e40 feat: render GitHub markdown in release changelogs
Replace raw preformatted text with rendered markdown:
headers, bold, links, lists, inline code. Sanitized
with DOMPurify. Styled with Tailwind child selectors.
2026-02-08 23:28:07 +03:00
Fringg
a15b3d4101 feat: add admin updates page with release history
Shows bot and cabinet releases with version badges,
changelogs, and update detection via __APP_VERSION__.
2026-02-08 23:20:49 +03:00
Fringg
ab0270ac58 feat: add system info card to admin dashboard
Shows cabinet version, bot version, Python version, uptime, users and
active subscriptions at the bottom of the dashboard page.
2026-02-08 22:52:14 +03:00
Fringg
5678dfd558 feat: enable sorting on enrichment columns 2026-02-08 22:39:31 +03:00
Fringg
a8ea5c958f fix: show email for OAuth/email users in traffic table
Add email field to UserTrafficItem type and display it below
user name when no Telegram username is present.
2026-02-08 22:04:57 +03:00
Fringg
893c69ab6f feat: add enrichment columns to admin traffic usage table
Add 5 new columns (connected devices, spending, start/end dates, last node)
with progressive loading shimmer placeholders and 4-language translations.
2026-02-08 21:49:45 +03:00
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