Commit Graph

1514 Commits

Author SHA1 Message Date
c0mrade
5d3f2bb60b Merge pull request #371 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.43.1
2026-03-31 20:23:41 +03:00
github-actions[bot]
5ff856df95 chore(main): release 1.43.1 2026-03-31 17:22:53 +00:00
c0mrade
c1b95e2635 Merge pull request #370 from BEDOLAGA-DEV/dev
Release: dev → main
2026-03-31 20:22:24 +03:00
c0mrade
fe609a505b fix: admin users search not working on pages beyond first
Separated input state (searchInput/emailSearchInput) from committed
search state (search/emailSearch) to prevent every keystroke from
triggering API calls with stale pagination offset.
2026-03-31 18:19:39 +03:00
c0mrade
3472ff994c Merge remote-tracking branch 'origin/main' into dev 2026-03-31 15:13:44 +03:00
c0mrade
826a82aa1c fix: unblock page rendering when Telegram CDN is unavailable
- Google Fonts: non-render-blocking via media="print" onload trick
- telegram-web-app.js: load only inside Telegram environment
- Telegram SDK init: skip entirely outside Telegram
- Script load timeout: 8000ms → 2000ms for faster deep link fallback
- Email login form: expanded by default (80% of registrations)
2026-03-31 14:10:22 +03:00
Egor
61a08feb75 Merge pull request #368 from BEDOLAGA-DEV/release-please--branches--main--components--cabinet-frontend
chore(main): release 1.43.0
2026-03-29 07:59:17 +03:00
github-actions[bot]
5cc37730b8 chore(main): release 1.43.0 2026-03-29 04:58:43 +00:00
Egor
f5b6e9a855 Merge pull request #367 from BEDOLAGA-DEV/dev
Dev
2026-03-29 07:57:47 +03:00
Fringg
60f11e97a2 feat: show MULTI_TARIFF_ENABLED setting only in tariffs sales mode
Hide MULTI_TARIFF_ENABLED and MAX_ACTIVE_SUBSCRIPTIONS from admin
settings when SALES_MODE is not 'tariffs'. Add Russian translations.
2026-03-29 07:04:34 +03:00
Fringg
859bd24d8e fix: gift code activation URL encoding and prefix handling
- Encode underscores as %5F in share URLs (bot link + cabinet link)
  to prevent Telegram auto-link detection from stripping trailing _
- Strip GIFT-/GIFT_ prefix from URL code param before pre-filling input
- Use ?? instead of || for prefix stripping to preserve empty strings
2026-03-29 06:47:50 +03:00
Fringg
2b03e7e514 feat: send language in payment requests for localized descriptions
- Add language field to balance topup and landing purchase requests
- Cap news article featured image height with max-h-96

Cherry-picked from PR #362 (without favicon change — files don't exist)
2026-03-29 05:18:40 +03:00
Fringg
07500ed215 feat: dynamic language list from API instead of hardcoded array
Hide language switcher when only 1 language is available.

Cherry-picked from PR #365
2026-03-29 05:15:31 +03:00
Fringg
0d4ddb26d9 fix: handle merge flow from email register endpoint
- Update registerEmail return type to include merge_required/merge_token
- Redirect to /merge/{token} when email register returns merge_required
2026-03-29 04:50:09 +03:00
Fringg
48fe9235ff fix: filter existing referrals from search and clear stale results
- Add-referral search: exclude users already in referrals list
- Both search debounces: clear stale results immediately when query
  changes to prevent previous results flashing during debounce
2026-03-29 04:07:31 +03:00
Fringg
222a1239ef feat: add "Add Referral" button to referrals tab
- New search UI in referrals list section to find and bind users
  as this user's referrals (calls assign-referrer on target user)
- Debounced search with cancelled flag and loading state
- Click-outside to close dropdown
- i18n: addReferral, referralAdded keys in all 4 locales
2026-03-29 04:02:40 +03:00
Fringg
63f7fa0a31 fix: four bugs in referrals tab from review
- Commission display: use conditional instead of nullish coalescing
  to avoid rendering "default%" (now shows "default" without %)
- loadReferrals: add || [] guard on data.users to prevent crash
- Search debounce: add cancelled flag to prevent stale responses
  overwriting fresher results
- Search dropdown: add loading state to prevent "No users found"
  flash during debounce wait
2026-03-29 03:49:49 +03:00
Fringg
e32663f291 feat: add Referrals tab to admin user detail page
- New Рефералы tab with three sections:
  - Referred By: shows who referred this user, assign/remove referrer
  - Stats grid: total referrals, earnings, commission, referral code
  - Referrals list: all referred users with navigate and remove buttons
- User search with debounce for assigning referrer
- Shows warning when selected user already has a referrer
- API methods: assignReferrer, removeReferrer, removeReferral
- i18n translations for all 4 locales (en, ru, zh, fa)
2026-03-29 03:43:47 +03:00
Fringg
3e6c0212a6 fix: desktop vertical alignment regression and touch target sizing
- SettingsTableRow: use max-lg:self-end instead of self-end to prevent
  bottom-aligning controls on desktop (self-end overrides items-center)
- QuickToggles: add min-h-[44px] matching Toggle component pattern
2026-03-29 03:22:45 +03:00
Fringg
e004d8103b fix: mobile layout and touch target improvements for admin settings
- SettingsTableRow: stack name above controls on mobile, show action
  buttons without hover (max-lg:opacity-100)
- SettingsMobileTabs: increase touch targets to 44px, add scroll spacers
- QuickToggles: increase chip touch targets
- SettingInput: increase display button touch target
- AdminSettings: add bottom padding buffer to mobile layout
2026-03-29 03:18:21 +03:00
Fringg
67055d58f7 fix: whitespace search guard and unknown section fallback
- SettingsTab: use searchQuery.trim() instead of searchQuery to prevent
  whitespace-only input from triggering empty search results view
- AdminSettings: fallback to branding when activeSection is unknown
  instead of rendering blank content area
2026-03-29 03:08:02 +03:00
Fringg
28ef6c97f5 fix: three bugs found in second review round
- SettingsSearchMobile: change sm:hidden to lg:hidden to match mobile
  layout breakpoint (search was invisible on 640-1023px tablets)
- SettingsTableRow: sync isLongValue suffixes with SettingInput
  (_list, _json, _periods, _discounts were missing)
- SettingsTableRow: read-only bools now show enabled/disabled labels
  instead of raw "true"/"false" strings
2026-03-29 03:03:26 +03:00
Fringg
ea1c7359ce fix: stabilize useMemo deps and add category search to sidebar
- Use activeSection instead of activeTreeInfo as useMemo dependency
  (activeTreeInfo is derived from activeSection, new object each render)
- Add category label matching to sidebar autocomplete search filter
  to match global search behavior
2026-03-29 02:56:54 +03:00
Fringg
21813ef82e feat: redesign admin settings with tree navigation and compact layout
- Replace flat sidebar with collapsible tree groups (7 groups, 52 sub-items)
- Map all 61 backend category keys to sidebar navigation
- Add QuickToggles panel for boolean settings
- Replace card-style SettingRow with compact SettingsTableRow
- Add breadcrumb navigation for tree sub-items
- Add source badges (modified/DB/ENV) on settings
- Implement two-level mobile navigation with group chips
- Add i18n translations for all new keys (en, ru, zh, fa)
2026-03-29 02:38:52 +03:00
Fringg
88c93e2b5f feat: show country emoji and provider name in traffic tab 2026-03-28 23:55:50 +03:00
Fringg
06f6cbeb8e fix: handle undefined inbounds/outbounds in traffic tab
API may return nodes without inbounds/outbounds arrays. Made fields
optional in NodeRealtimeStats and added null safety guards in TrafficTab.
2026-03-28 23:33:06 +03:00
Fringg
5d7b94fc48 fix: add i18n keys for Traffic tab, prevent sort mutation
- Add traffic tab/section locale keys to ru, en, zh, fa
- Use spread copy before .sort() to avoid mutating React Query cache
2026-03-28 22:52:30 +03:00
Fringg
4ebc21b348 feat: add Traffic tab with per-inbound breakdown in admin remnawave
- Add NodeRealtimeStats and InboundTraffic TypeScript interfaces
- Type getNodesRealtime return as NodeRealtimeStats[]
- Add new Traffic tab to AdminRemnawave page showing per-node
  inbound/outbound traffic sorted by total bytes
- Display download/upload/total per inbound tag for each node
2026-03-28 22:47:29 +03:00
Fringg
a34a34204c refactor: update remnawave API types for v2.7.0
- ServerInfo: remove cpu_physical_cores, memory_available
- NodeInfo: replace cpu_count/cpu_model/total_ram with versions/system,
  xray_uptime changed to number, users_online now required
- NodeStatus: same field updates, remove dead uptime field
- Extract formatUptime to shared utils/format.ts
- Update AdminRemnawave and AdminDashboard components
2026-03-28 22:32:22 +03:00
Fringg
59e65283e1 fix: remove duplicate floating orbs background from admin panel
The CosmosBackground orbs were overlapping the app's existing theme
background, creating a double-layer effect. Removed the component
entirely so only the theme background is visible.
2026-03-28 21:25:20 +03:00
Fringg
0bb064e2c0 feat: redesign admin panel with glass morphism UI, animated background, and stats bar
- Rewrite AdminPanel with cosmic floating orbs background using theme colors
- Add stats bar: uptime, bot version, cabinet version, trial/paid counts from API
- Glass morphism cards with 3D tilt effect (rAF-throttled) and entry animations
- Live search with Cmd+K shortcut, highlight matches, permission-aware filtering
- Register Tailwind `light:` variant for proper light theme support
- Mobile optimizations: reduced orbs (3), lower blur (80px), compact 2-col stats
- Telegram MiniApp safe area support via useTelegramSDK
- Full accessibility: aria-hidden on decorative SVGs, aria-labels, role="status"
- React.memo on StatsBar, GlassCard, CosmosBackground for render performance
- Memo-stable section refs via Set<id> pattern to preserve GlassCard memo during search
- i18n keys added to all 4 locales (ru, en, zh, fa)
2026-03-28 21:17:51 +03:00
Fringg
aa989a6ade feat: add subscription selector to admin sync tab for multi-tariff
- Add subscription dropdown to sync tab when user has 2+ subscriptions
- Pass subscription_id to getSyncStatus, syncFromPanel, syncToPanel
- loadSyncStatus re-fetches when selected subscription changes
- Show tariff name in UUID info section from API response
- Add selectSubscription i18n keys to all 4 locales
2026-03-28 19:50:10 +03:00
c0mrade
8ba5ceae10 fix: allow zero price for device and traffic topup in tariff settings
- device_price_kopeks: change > 0 to >= 0 so 0 (free) is sent instead of undefined
- traffic_topup_packages: change > 0 to >= 0 so free traffic packages can be added
2026-03-28 13:30:19 +03:00
c0mrade
a50c06c101 feat: add Remnawave panel 2.7.0 support
- Add MONTH_ROLLING traffic reset mode (button, locales: ru/en/zh/fa)
- Add NodeInfo config_profile and active_plugin_uuid fields
- Update bandwidth display: remove /s suffix, label as Inbound Traffic
- Update tariffs.ts type comment with MONTH_ROLLING
2026-03-28 12:35:47 +03:00
c0mrade
a57674c22b chore: disable i18next promotional console message 2026-03-27 14:12:52 +03:00
c0mrade
3b659b7450 fix: bottom nav disappears after visiting payment page in Telegram
- Reset isKeyboardOpen on route change so bottom nav always restores
- Disable autoFocus on payment input in Telegram Mini App
- Skip auto-focus on Profile email inputs in Telegram
2026-03-27 13:40:13 +03:00
c0mrade
5246ad2a09 feat: add server selection for test_access promo offer templates
AdminPromoOfferTemplateEdit now shows checkboxes to select test
squad servers when editing a test_access template.
2026-03-27 12:31:46 +03:00
c0mrade
c697ddb224 fix: auto-reload on stale chunk errors after deploy
When a new build changes chunk hashes, users with cached index.html
get "Failed to fetch dynamically imported module" errors. Now:
- lazyWithRetry() wraps all lazy imports with auto-reload on failure
- ErrorBoundary catches chunk errors and auto-reloads once
- 30s guard in sessionStorage prevents reload loops
2026-03-26 20:55:29 +03:00
c0mrade
94b9b9eb94 feat: tariff selector for trial subscription promo codes
- Add tariff_id/tariff_name to PromoCode types
- AdminPromocodeCreate: tariff dropdown for trial_subscription type
- Shows default trial tariff or warns if none configured
2026-03-26 20:09:29 +03:00
c0mrade
6de864ac43 fix: promocode multi-tariff support in cabinet
- Balance page: handle select_subscription response — show subscription
  picker when promo code adds days and user has multiple tariffs
- API: activatePromocode now accepts optional subscriptionId
- AdminPromocodeCreate: show trial tariff info when creating
  trial_subscription promo code, warn if no trial tariff configured
2026-03-26 19:43:42 +03:00
Fringg
9546e0ffe6 fix: add missing balance cache invalidation after mutations
- Subscription.tsx: devicePurchase + trafficPurchase onSuccess → invalidate ['balance']
- RenewSubscription.tsx: renewMutation onSuccess → invalidate ['balance']
- SubscriptionPurchase.tsx: purchaseMutation onSuccess → invalidate ['balance'] + ['subscriptions-list']
- subscription.ts: refreshTraffic uses withSubId (already fixed, formatting)
2026-03-26 10:44:00 +03:00
c0mrade
96ff2585f2 Merge pull request #359 from BEDOLAGA-DEV/feat/multi-subscription
feat: multi-subscription frontend support
2026-03-25 18:48:38 +03:00
c0mrade
45b7c857fc fix: back button goes to dashboard in single-tariff to prevent redirect loop
In single-tariff mode, Subscriptions list auto-redirects to detail page.
Back button from detail now goes to / (dashboard) instead of /subscriptions,
breaking the redirect loop.
2026-03-25 18:40:50 +03:00
c0mrade
98e9cfadc6 fix: use declarative Navigate instead of navigate() in render + fix useEffect deps
Subscriptions.tsx: navigate() in render → <Navigate> component (React safe).
Subscription.tsx: same fix for multi-tariff redirect.
AdminUserDetail.tsx: useRef guard for one-time auto-select instead of
activeSubscriptionId in dependency array (prevented manual selection).
2026-03-25 18:11:30 +03:00
c0mrade
29003a6cbe fix: make buy-another-tariff button more prominent on dashboard
Changed from faded dashed border (opacity-50, text-xs) to accent-colored
background with larger text for better visibility in multi-tariff mode.
2026-03-25 16:53:32 +03:00
c0mrade
16ccf78c95 fix: show warning hint when subscription must be selected before wheel spin
When user has 2+ eligible subscriptions and chooses subscription_days
payment, a visible warning hint now appears explaining they need to
select a subscription before spinning.
2026-03-25 16:49:45 +03:00
c0mrade
e86b214008 fix: resolve eslint warnings in NewsSection and AdminTickets
NewsSection: wrap items in useMemo to stabilize dependency reference.
AdminTickets: copy ref values to local vars for cleanup function.
2026-03-25 11:47:41 +03:00
c0mrade
fd01c0f393 fix: preserve subscription context in navigation and cache keys
SubscriptionCardActive: passes ?sub= to /connection navigation.
Connection: QR state includes subscriptionId for back-navigation.
ConnectionQR: preserves subscription context on back button.
Dashboard + Subscription: localStorage traffic cache keyed per-subscription
to prevent cooldown bleed between different subscriptions.
2026-03-25 11:47:31 +03:00
c0mrade
4de47cfa94 fix: multi-subscription frontend improvements
- Connection page: reads subscription_id from ?sub= query param
- Subscription detail: passes subscriptionId to /connection URL
- Dashboard: skip single-subscription and devices queries in multi-tariff
  mode (data comes from subscriptions-list instead)
2026-03-24 22:18:02 +03:00
c0mrade
324aaa1f33 redesign: inline delete confirmation on web — expands in place instead of modal/sheet 2026-03-24 19:11:48 +03:00