Commit Graph

343 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Fringg
1a0a5ff453 feat: add per-button enable/disable toggle and custom labels per locale
- Add Toggle per section card to show/hide button in main menu
- Add collapsible locale label inputs (ru, en, ua, zh, fa) per section
- Normalize server response for backward compatibility with older API
- Update all 4 locale files with new translation keys
2026-02-12 23:42:58 +03:00
Fringg
e586129c37 feat: add 'no color' option for button style customization
Adds a 'default' style option that removes color from buttons, showing
Telegram's native default style. Updates type, UI chip, preview, and
translations for all 4 locales.
2026-02-12 23:25:49 +03:00
Fringg
b2898730b9 feat: add ButtonsTab for per-section button style customization
Visual editor in admin settings for configuring Telegram button colors
and custom emoji IDs per menu section. Includes API client, draft state
management, save/reset, and translations for ru/en/fa/zh locales.
2026-02-12 23:16:08 +03:00
Fringg
aa5113b8e3 feat: add admin pinned messages section
- API client with full CRUD, broadcast, activate/deactivate, unpin endpoints
- List page with active/inactive badges, action buttons, pagination
- Create/edit form with content editor, media upload, display settings toggles
- Routes and navigation in admin marketing group
- i18n translations for ru, en, fa, zh
2026-02-12 19:33:18 +03:00
Fringg
1d6ec70116 fix: handle unlimited traffic package selection and button text
- Fix falsy check: selectedTrafficPackage !== null instead of truthy
  (gb=0 for unlimited was evaluated as false, hiding the buy button)
- Show "Buy Unlimited" instead of "Buy 0 GB" for unlimited packages
- Add buyUnlimited translation key to all 4 locales
2026-02-11 18:20:21 +03:00
Fringg
f10a02ceb6 feat: show affected subscriptions count on tariff deletion
Update delete mutation to use affected_subscriptions from API response.
Show contextual success notification with subscription count.
Add deleteSuccessWithSubscriptions translation key in all 4 locales.
2026-02-09 22:30:28 +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
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
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
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
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
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
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
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
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
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
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
Fringg
995c0348dc feat: add tickets tab to admin user detail page
Add ability to view user's tickets directly from the user detail page.
Backend gets user_id filter on tickets endpoint, frontend shows ticket
list with status badges, message preview and navigation to ticket.
2026-02-07 05:21:16 +03:00
Fringg
772dcf7236 feat: dual-channel broadcast form (Telegram + Email simultaneously)
Replace single channel radio with independent toggles allowing both
channels to be enabled at once with separate audiences and content.
When both enabled, sends two sequential API requests.
2026-02-07 04:59:02 +03:00
Fringg
83aeae81b8 feat: add OAuth 2.0 login UI (Google, Yandex, Discord, VK)
- Add OAuthProvider type and extend User.auth_type union
- Add OAuth API methods (providers, authorize, callback)
- Add loginWithOAuth to auth store
- Create OAuthCallback page with state validation
- Create OAuthProviderIcon component with brand SVGs
- Add OAuth buttons to Login page between Telegram and Email
- Add OAuth callback route to App.tsx
- Add translations for ru, en, zh, fa
2026-02-07 01:59:05 +03:00
Fringg
2490399f8e feat: move user action buttons to detail page and fix full delete
- Add fullDeleteUser API method calling DELETE /admin/users/{id}/full
- Add Reset trial, Reset subscription, Disable, Delete buttons to AdminUserDetail info tab
- Implement inline confirm pattern (click → "Are you sure?" → execute, 3s timeout)
- Delete now calls /full endpoint removing user from bot DB and Remnawave panel
- Remove UserActionsMenu dropdown, ConfirmationModal and related code from AdminUsers list
- Update delete confirmation text in ru/en locales to reflect full deletion
2026-02-07 00:48:56 +03:00
c0mrade
a1c0ceba19 fix: add retry logic for Telegram Mini App auth failures
Auto-retry once on 401 with 1.5s delay, plus a manual retry button
with a hint to reopen the app if auth keeps failing.
2026-02-06 21:53:56 +03:00
Fringg
ef365db16b feat: add drag-and-drop tariff sorting in admin panel
Implement DnD reorder for tariffs using @dnd-kit, matching the
pattern from AdminPaymentMethods. Add updateOrder API method
and i18n keys for all locales.
2026-02-06 17:30:11 +03:00
Fringg
5a8c1e7e33 feat: add blacklisted user blocking screen
Add BlacklistedScreen component, blocking store type, API error interceptor,
and i18n translations (ru, en, zh, fa) for blacklisted users.
2026-02-06 15:48:24 +03:00
c0mrade
a50dea9a3d feat: connect RemnaWave baseTranslations and fix SVG icons
- Wire baseTranslations from RemnaWave config to connection page UI
  (copyLink, openApp, installApp, addSubscription, connectAndUse,
  tutorial, close) with locale fallback: current lang → en → ru → first
- Add tutorial button when baseSettings.isShowTutorialButton is enabled
- Fix SVG icon rendering on admin apps settings page with proper scaling
- Add colored circle backgrounds for block and app icons in admin panel
- Add tutorial translation key to all locale files
2026-02-05 09:44:42 +03:00
c0mrade
8068f84724 fix: inline Stars confirmation and unified payment type display
- Replace confirm dialog with inline UI panel to avoid browser popup
  blockers — pay button click is a direct user gesture
- Pre-open browser window synchronously on pay click for fallback
- Unify payment type display: show same styled panel whether one or
  both methods are enabled (single method = full-width button)
- Remove getCostSubtitle text, add payStars translation key (ru, en,
  zh, fa)
2026-02-04 16:53:58 +03:00
c0mrade
e6f8ae6ab0 feat: add Stars payment confirmation and admin validation
- Show confirmation dialog before redirecting to Telegram for Stars
  payment (native popup in Mini App, confirm in browser)
- Warn admin when saving wheel config with Stars enabled but
  Telegram Stars payment method is disabled globally
- Add translation keys: confirmStarsTitle, confirmStarsPayment,
  starsNotEnabledGlobally (ru, en, zh, fa)
2026-02-04 16:41:25 +03:00
c0mrade
02640d1c38 fix: unify wheel Stars payment across desktop and mobile
- Use Telegram Stars invoice on all platforms instead of balance
  payment on desktop
- Show star cost in toggle and subtitle everywhere
- Show popup/toast when Stars are not enabled and user tries to spin
- Remove platform-specific payment type auto-select logic
- Add starsNotAvailable translation key (ru, en, zh, fa)
2026-02-04 16:26:07 +03:00
c0mrade
c8c9920ade Merge remote-tracking branch 'origin/main' into feat/linear-ui-redesign
# Conflicts:
#	src/components/PromoDiscountBadge.tsx
2026-02-04 03:25:35 +03:00
Egor
0b127a5f85 Add files via upload 2026-02-04 02:12:18 +03:00
Egor
9e590247e0 Add files via upload 2026-02-04 00:51:07 +03:00
c0mrade
4fa9d7f47c Improve wheel: fix lights animation and add prize legend
- Fix lights animation to run continuously (even when idle)
- Lights now move sequentially around the circle
- Remove text labels from wheel, keep only emoji
- Add WheelLegend component with color indicators
- Display legend on right (desktop) and bottom (mobile)
- Add 'prizes' translation key for all languages
2026-02-03 23:42:52 +03:00