Commit Graph

239 Commits

Author SHA1 Message Date
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
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
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
c0mrade
b24f5083d0 Add proper plural forms for all localized strings
- Russian: add _one/_few/_many forms for proper declension
- English: add _one/_other forms for singular/plural
- Chinese: add _other form (no plural changes in Chinese)
- Farsi: add _other form (no plural changes in Farsi)

Fixed plural forms for:
- purchaseCount, registrations, subscriptions, tariffs
- device limits, members, hours, templates
- offers, notifications, promocodes, groups
- showMore and other count-based strings
2026-02-03 23:15:37 +03:00
c0mrade
7e2802c5b5 feat: redesign fortune wheel UI and add to mobile nav
- Add wheel button to mobile bottom nav (replaces Support when enabled)
- Slow down LED lights animation (250ms -> 600ms)
- Replace result modal with inline card in Wheel.tsx
- Add haptic feedback on spin result
- AdminWheel.tsx: inline prize editing instead of modal
- AdminWheel.tsx: drag-and-drop for prize reordering
- AdminWheel.tsx: live wheel preview on desktop
- AdminWheel.tsx: group settings into sections
- Replace confirm() with native dialog
- Add translations for all languages
2026-02-02 17:51:46 +03:00
c0mrade
e9af285dad fix: improve mobile layout for bandwidth and add pluralization support 2026-02-02 11:14:29 +03:00
c0mrade
ed86dfa8bd fix: add full i18n support for RemnaWave section and improve sync UI 2026-02-02 11:04:25 +03:00
c0mrade
1873d6d9dc refactor: move campaign editing from modal to separate page
- Create AdminCampaignEdit page for editing campaigns
- Remove CampaignModal from AdminCampaigns
- Use centralized icons (CampaignIcon, ChartIcon added)
- Add route /admin/campaigns/:id/edit
- Add localization keys for loadError and updateError
2026-02-02 10:18:57 +03:00
c0mrade
803609c1fb refactor: consolidate icons and move server edit to separate page
- Create centralized icons file at src/components/icons/index.tsx
- Update admin and AppShell icons to re-export from centralized location
- Replace trial "T" button with GiftIcon in AdminServers
- Move server editing from modal to dedicated page /admin/servers/:id/edit
- Add localization keys for server edit page (mainSettings, pricingAndLimits, updateError)
2026-02-02 10:03:47 +03:00
c0mrade
ead4606bb5 feat: move ticket settings to dedicated page 2026-02-02 08:47:35 +03:00
c0mrade
1027deb134 feat: move campaign statistics to dedicated page 2026-02-02 08:34:35 +03:00
c0mrade
0c9d09280c feat: add locales for user search in promo offer sending
- Add searchUserPlaceholder, noUsersFound, hasSubscription keys
- Support all 4 languages: en, ru, zh, fa
- Remove fallback strings from component
2026-02-02 07:40:05 +03:00
c0mrade
f73579b37f refactor: extract promo offers modals to separate pages
- Create AdminPromoOfferTemplateEdit.tsx for template editing
- Create AdminPromoOfferSend.tsx for sending offers with result screen
- Add routes for /admin/promo-offers/templates/:id/edit and /admin/promo-offers/send
- Simplify AdminPromoOffers.tsx by removing modals
- Add i18n keys for new pages
2026-02-02 06:14:15 +03:00
c0mrade
2920ca45e8 refactor: convert promocode stats modal to separate page
- Create AdminPromocodeStats.tsx with responsive mobile layout
- Add route /admin/promocodes/:id/stats
- Fix mobile layout in AdminPromocodes.tsx (badges and buttons no longer overlap)
- Remove PromocodeStatsModal component
2026-02-02 06:05:15 +03:00
c0mrade
a96ddde314 feat: extract promocodes and promo groups into separate pages
- Add AdminPromocodeCreate page for creating/editing promocodes
- Add AdminPromoGroups page for listing discount groups
- Add AdminPromoGroupCreate page for creating/editing discount groups
- Move promo groups from Promocodes section to separate admin section
- Simplify AdminPromocodes by removing embedded modals and groups tab
- Add routes and navigation for new pages
- Add i18n keys for all 4 locales (ru, en, zh, fa)
2026-02-02 05:40:25 +03:00
c0mrade
e19767af82 feat: improve tariff builder UI
- Move promo groups from Servers tab to Extra tab
- Add isActive toggle in Extra tab (tariff status)
- Remove trial toggle from form (not needed for now)
- Replace "T" letter with gift icon for trial toggle in tariff list
- Add i18n translations for new status fields
2026-02-02 04:46:00 +03:00
c0mrade
d6edb659a3 refactor: align tariff builder with bot functionality
- Remove unused fields: custom_days, custom_traffic (bot doesn't use them)
- Add promo groups selection to tariff form
- Add API endpoint for fetching available promo groups
- Make traffic topup packages dynamic (add/remove any number)
- Fix stuck 0 in number inputs when clearing
- Add validation messages explaining why save button is blocked
- Match bot validation: name 2-50 chars, device_limit >= 1, tier_level 1-10
- Add missing i18n translations for new fields and validation errors
2026-02-02 04:27:52 +03:00
c0mrade
47e28ee78f fix: allow clearing number inputs and add validation
- Add inputHelpers utility for number inputs that allow empty values
- Update tariff, campaign, promo offers, and server forms
- Add validation for required fields (deviceLimit, tierLevel, dailyPrice)
- Add placeholders and error indicators for empty required fields
- Add fieldRequired and dailyPriceRequired translations
2026-02-02 03:10:54 +03:00
c0mrade
36cc01ca7e fix: improve Toast visibility and allow tariff deletion with subscriptions
- Toast: use solid bg-dark-800 background instead of transparent gradient
- Toast: increase border opacity for better visibility
- Tariffs: allow deletion even with active subscriptions (shows warning)
- Add confirmDeleteWithSubscriptions translation to all locales
2026-02-02 02:34:11 +03:00
c0mrade
6f4d1ef085 feat: add useNotify hook for unified notifications
- Created useNotify hook (src/platform/hooks/useNotify.ts):
  - In Telegram Mini App: uses native showPopup
  - In browser: uses beautiful Toast component
  - Methods: notify(), success(), error(), warning(), info()

- AdminTariffs: improved deletion UX
  - Uses useNotify.warning when tariff has subscriptions
  - Uses useDestructiveConfirm for delete confirmation
  - Shows success toast after deletion
  - Removed custom modal dialog

- AdminEmailTemplates: unified notification style
  - Replaced dialog.alert with useNotify.warning
  - Now shows beautiful Toast on mobile browser

- Added deleteSuccess i18n translations (ru, en, zh, fa)
2026-02-02 02:17:19 +03:00
c0mrade
5b30f24e7e fix: improve tariff delete button visibility
- Added visual styling for disabled delete button (when tariff has
  active subscriptions)
- Added tooltip explaining why delete is disabled
- Added i18n translations for cannotDeleteHasSubscriptions
2026-02-02 02:04:41 +03:00
c0mrade
dc17695206 feat: replace tariff creation modal with dedicated page 2026-02-02 01:38:01 +03:00
c0mrade
c60a242f1d fix: add missing i18n keys for broadcast detail page 2026-02-01 18:58:10 +03:00
c0mrade
b953ee0b8c feat: Linear-style UI redesign with improved mobile experience
Major changes:
- Redesign cabinet with Linear-style components and top navigation
- Replace detail modals with dedicated pages (users, broadcasts, email templates)
- Add email channel support for broadcasts
- Remove pull-to-refresh, improve drag-and-drop on touch devices
- Fix Telegram Mini App: fullscreen, back button, scroll restoration
- Unify admin pages color scheme to design system
- Mobile-first improvements: horizontal tabs for settings, better touch targets
2026-02-01 18:58:10 +03:00