Commit Graph

682 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
de613d909d fix: remove quick actions section and optimize build chunks
- Remove "Quick Actions" section from Dashboard
- Remove unused SupportLottieIcon component
- Add missing Radix UI components to vendor-radix chunk
- Add dompurify and cmdk to vendor chunks
- Increase chunk size warning limit to 550KB
2026-02-02 05:53:44 +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
0b4c75d7f7 merge: integrate trial subscription support from main 2026-02-02 05:38:28 +03:00
Egor
6e2a0de958 Merge pull request #131 from BEDOLAGA-DEV/dev
Dev
2026-02-02 05:25:44 +03:00
Egor
1af7dee04d Update Subscription.tsx 2026-02-02 05:22:18 +03:00
Egor
f35277ad3a Add files via upload 2026-02-02 05:20:13 +03:00
Egor
196c826aa8 Add files via upload 2026-02-02 05:19:42 +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
8cd95b84fb fix: add placeholders to all tariff form number inputs
Add placeholders for all remaining inputs in AdminTariffCreate:
- Periods tab: days, price inputs
- Extra tab: device price, max devices, traffic limit
- Traffic packages: 5/10/20/50 GB prices
- Custom days: price per day, min/max days
- Custom traffic: price per GB, min/max traffic
2026-02-02 03:25:09 +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
d623cd41e9 fix: AdminTariffCreate back button and daily tariff colors
- AdminBackButton now navigates to /admin/tariffs instead of /admin
- Fixed dynamic Tailwind classes for daily tariff (warning colors)
- Tabs, servers, and reset mode buttons now use proper warning
  colors for daily tariffs
2026-02-02 01:58:15 +03:00
c0mrade
1ca34fa3d1 style: align AdminTariffCreate with other admin create pages
Added gap-3 to footer for consistency with AdminCampaignCreate
and AdminBroadcastCreate pages
2026-02-02 01:49:04 +03:00
c0mrade
dc17695206 feat: replace tariff creation modal with dedicated page 2026-02-02 01:38:01 +03:00
c0mrade
7aeb47f583 fix: use native Telegram popup for email preview restriction 2026-02-02 01:07:39 +03:00
c0mrade
9b0be280d2 fix: disable Telegram swipe-to-close globally to prevent accidental app closures 2026-02-02 00:55:39 +03:00
c0mrade
09584fc901 fix: use pill-style tabs in admin user detail page 2026-02-02 00:45:08 +03:00
c0mrade
45dac039f9 fix: improve admin user detail tabs scroll and sync buttons design 2026-02-01 23:49:52 +03:00
c0mrade
f6854c6c3a fix: use single shared WebSocket connection and optimize build chunks 2026-02-01 23:34:29 +03:00
c0mrade
e884860ab8 fix: add Russian translation for device limit reduction reason 2026-02-01 23:14:10 +03:00
c0mrade
bce4d94229 feat: replace campaign creation modal with dedicated page
- Create AdminCampaignCreate.tsx with full form for new campaigns
- Update AdminCampaigns.tsx to navigate to create page
- Keep edit functionality as modal
- Add route /admin/campaigns/create in App.tsx
2026-02-01 23:03:25 +03:00
c0mrade
8deca2fa5b fix: disable Telegram vertical swipes during drag operations
- Add useTelegramDnd hook for @dnd-kit integration
- Update Sheet components to disable swipes when open
- Update AdminPaymentMethods to use the new hook
- Prevents conflict between app drag gestures and Telegram swipe-to-close
2026-02-01 22:46:16 +03:00
c0mrade
0773afdf6e feat: add Telegram/Email channel selection to broadcast create page 2026-02-01 22:37:53 +03:00
c0mrade
175516ec9b feat: replace broadcast creation modal with dedicated page 2026-02-01 22:26:12 +03:00
c0mrade
4a25d8df03 fix: unify card styles across the project
- Set --bento-radius to 16px (was 24px) for more modern look
- Unified .card, .bento-card and Card component to use same:
  - border-radius: var(--bento-radius)
  - border: border-dark-700/40
  - background: bg-dark-900/70
  - inset shadow for glass effect
- Reduced padding from 24px to 20px
2026-02-01 22:07:54 +03:00
c0mrade
2926a5a89c fix: remove dark backgrounds causing black rectangles
- PageLoader: remove bg-dark-950, use transparent background
- AdminLayout: remove motion animations
- Now lazy-loaded pages show Aurora background during loading
2026-02-01 21:57:13 +03:00
c0mrade
dda8323b45 fix: remove page transition animations to prevent flashing
AnimatePresence was causing black flash between page transitions.
Removed page-level animations - stagger animations inside pages still work.
2026-02-01 21:48:28 +03:00
c0mrade
5ad5e8d365 fix: restore page animations, improve checkbox visibility
- Re-enable page transition animations in Telegram Mini App
- Change AnimatePresence mode from popLayout to wait (prevents black squares)
- Add initial={false} to skip animation on first render
- Add custom checkbox styling with better visibility (bg-dark-700, border-dark-600)
- Custom checkmark appearance when checked
- Light theme checkbox support
2026-02-01 21:32:08 +03:00
c0mrade
768b340c35 fix: UI improvements - reduce Android header, hide mobile scrollbar, disable animations in Telegram, consistent menu overlay 2026-02-01 21:22:42 +03:00
c0mrade
093c9f2893 fix: add Telegram header padding for Android fullscreen mode 2026-02-01 21:09:16 +03:00
c0mrade
6f8bc4fca5 fix: revert to native Telegram WebApp API, remove SDK usage 2026-02-01 20:37:23 +03:00
c0mrade
e5ea09dd3a fix: wrap all SDK isSupported() calls in try-catch 2026-02-01 20:29:38 +03:00
c0mrade
baa57b907e fix: handle unmounted SDK components gracefully 2026-02-01 20:23:45 +03:00
c0mrade
edb5be09ae feat: migrate to @tma.js/sdk-react for Telegram Mini App
- Add useTelegramSDK hook with reactive signals for viewport, safe area, fullscreen
- Migrate TelegramAdapter to use SDK components (backButton, mainButton, hapticFeedback, cloudStorage, themeParams, popup)
- Update Login, TelegramRedirect to use SDK helpers
- Update PlatformProvider, api/client to use centralized SDK functions
- Simplify useTelegramWebApp as backward-compatible wrapper
- Add automatic CSS variable binding for theme and viewport
2026-02-01 20:13:50 +03:00
c0mrade
55ae55f4af fix: Aurora uses theme colors from API with blur overlay 2026-02-01 18:58:10 +03:00
c0mrade
851e6a353b fix: make Aurora colors vibrant and increase speed 2026-02-01 18:58:10 +03:00
c0mrade
cffef41f63 feat: replace MovingGradient with Aurora WebGL background 2026-02-01 18:58:10 +03:00
c0mrade
24781f32ec feat: add animated MovingGradient background 2026-02-01 18:58:10 +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
929634aac4 Merge pull request #129 from BEDOLAGA-DEV/dev
Уменьшение кол-ва устройств
2026-02-01 17:22:01 +03:00
Egor
92905770e4 Update subscription.ts 2026-02-01 17:21:03 +03:00
Egor
8a0ff740e1 Add files via upload 2026-02-01 17:20:27 +03:00
Egor
de7c911a7e Update Subscription.tsx 2026-02-01 17:19:59 +03:00
Egor
b8f3621b22 Merge pull request #128 from BEDOLAGA-DEV/dev
Update package-lock.json
2026-02-01 00:58:51 +03:00
Egor
13790d057a Update package-lock.json 2026-02-01 00:58:13 +03:00