Commit Graph

50 Commits

Author SHA1 Message Date
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
Egor
562376bb11 Add files via upload 2026-01-31 20:14:45 +03:00
c0mrade
175b5608b2 feat: add success notification modal for balance and subscription events
- Add zustand store for global success notifications
- Create SuccessNotificationModal component with prominent UI
- Update WebSocketNotifications to show modal for important events:
  - balance.topup shows balance topped up modal
  - subscription.activated shows activation modal
  - subscription.renewed shows renewal modal
- Add translations for all locales (ru, en, zh, fa)
2026-01-30 19:39:14 +03:00
c0mrade
ca227f3975 feat(websocket): add global handler for subscription and balance notifications
- Extend WSMessage interface with balance, subscription, autopay, account, referral fields
- Create WebSocketNotifications component to handle all WS events
- Add component to Layout for global event listening
- Show toasts and invalidate queries on subscription/balance events
- Add translations for all notification types (ru, en, zh, fa)
2026-01-30 19:04:45 +03:00
Egor
6faf8a641b Add files via upload 2026-01-30 16:22:16 +03:00
Egor
a0461c7a89 Add files via upload 2026-01-30 15:55:08 +03:00
Egor
a9e7f0ae3d Add files via upload 2026-01-28 21:13:15 +03:00
Egor
4622c4fb2c Add files via upload 2026-01-28 20:37:16 +03:00
Egor
2ab978edcc Add files via upload 2026-01-28 20:34:20 +03:00
c0mrade
4b35d8c392 fix(i18n): rename subscription.servers object to subscription.serverManagement
Resolves conflict where subscription.servers existed as both a nested
object (for server management UI keys) and a pluralization base key.
Renamed the nested object to serverManagement in all 4 locales and
updated all t() references in Subscription.tsx.
2026-01-27 22:47:41 +03:00
c0mrade
ff7e4d42a0 fix(i18n): remove duplicate subscription.servers string key
The key existed as both a string and an object in subscription
section, causing i18next to return an object instead of a string.
Removed the redundant string — serversLabel is used for plain text,
plural suffixes (_one/_few/_many/_other) handle counted usage.
2026-01-27 22:34:05 +03:00
c0mrade
9707ad97a4 feat(i18n): migrate all hardcoded Russian text to i18n
- Replace all hardcoded Russian strings with t() calls across 30+ files
- Add ~500 new translation keys to all 4 locales (ru, en, zh, fa)
- Convert module-level config objects to labelKey pattern
- Remove Russian fallbacks from t() calls (fallbackLng handles it)
- Replace DeepLinkRedirect custom i18n with standard t() calls
- Fix subscription.servers key collision (string vs object)
2026-01-27 22:19:41 +03:00
Egor
b523da2fb0 Merge pull request #101 from BEDOLAGA-DEV/feat/husky-eslint-security
feat/husky eslint security
2026-01-27 17:50:15 +03:00
c0mrade
bc90ba3779 refactor: migrate to eslint flat config and format codebase with prettier
- Remove legacy .eslintrc.cjs and .eslintignore
- Add eslint.config.js with flat config, security rules (no-eval, no-implied-eval, no-new-func, no-script-url)
- Add .prettierrc and .prettierignore
- Format entire codebase with prettier
2026-01-27 17:37:31 +03:00
Egor
85594a23a6 Add files via upload 2026-01-27 17:36:56 +03:00
Egor
89aba6d034 Add files via upload 2026-01-27 01:20:42 +03:00
Egor
b82c07bfbd Add files via upload 2026-01-26 23:22:49 +03:00
Egor
d23fc68730 Add files via upload 2026-01-26 22:40:20 +03:00
Egor
024ad7e2b5 Add files via upload 2026-01-26 22:00:19 +03:00
Egor
f1bd3da7b3 Add files via upload 2026-01-26 20:35:58 +03:00
Egor
7169988d20 Add files via upload 2026-01-25 09:26:48 +03:00
Egor
1b5e616700 Add files via upload 2026-01-25 08:53:29 +03:00
Egor
e866eb237f Add files via upload 2026-01-25 08:47:09 +03:00
Egor
f5bd2544c9 Add files via upload 2026-01-23 11:32:52 +03:00
Egor
50ed5bbc2b Add files via upload 2026-01-22 23:54:25 +03:00
Egor
06d3b8c090 Add files via upload 2026-01-21 08:14:01 +03:00
Egor
93a50c975d Add files via upload 2026-01-21 07:36:24 +03:00
Egor
3532d26ffa Add files via upload 2026-01-21 05:32:27 +03:00
PEDZEO
215a65dbae Refactor theme settings with two collapsible sections
- Quick Presets: collapsible section with 8 theme presets
- Custom Colors: collapsible section with all color pickers
- Added translations for quickPresets, customColors in all locales (ru, en, zh, fa)
- Chevron icon rotates when section is expanded
- Preview section moved inside Custom Colors
2026-01-21 02:11:39 +03:00
PEDZEO
7f0d6a7d18 Enhance TopUpModal styling and update localization files
- Updated button styles in TopUpModal for improved visual feedback during interactions.
- Adjusted modal positioning for better user experience on desktop.
- Added 'paymentMethod' key to localization files for English, Persian, Russian, and Chinese languages, enhancing multi-language support.
2026-01-20 17:25:43 +03:00
PEDZEO
236c36f1ab Enhance ConnectionModal and TopUpModal with improved mobile support, new icons, and keyboard accessibility. Update localization files to include 'enterAmount' key for multiple languages. 2026-01-20 16:52:01 +03:00
Egor
b777e9b1a1 Add files via upload 2026-01-20 14:41:49 +03:00
PEDZEO
472cd27320 Refactor TicketNotificationBell to improve toast notifications for new tickets and replies. Update localization files to include new notification strings for user replies and enhance existing messages. 2026-01-19 01:15:48 +03:00
Egor
9513d3cc51 Add files via upload 2026-01-18 06:12:20 +03:00
evansvl
9bb4809a3a feat: integrate branding API and enhance referral sharing functionality
- Added branding API integration to fetch branding details.
- Updated share link functionality to include branding name in the share message.
2026-01-17 20:22:15 +03:00
Egor
fb66be094c Add files via upload 2026-01-17 03:11:09 +03:00
Egor
94295b2179 Add files via upload 2026-01-16 18:13:59 +03:00
Egor
f051828aa7 Add files via upload 2026-01-16 02:23:38 +03:00
Egor
2706b1678a Add files via upload 2026-01-16 01:33:22 +03:00
Egor
7be6b5c0ae Add files via upload 2026-01-15 19:18:17 +03:00