Commit Graph

994 Commits

Author SHA1 Message Date
c0mrade
1027deb134 feat: move campaign statistics to dedicated page 2026-02-02 08:34:35 +03:00
c0mrade
643d4fd3af fix: improve header layout for mobile - stack button below title
- AdminPromocodes, AdminCampaigns, AdminPromoGroups, AdminTariffs, AdminServers
- Use flex-col on mobile, flex-row on desktop (sm:)
- Button now appears below header on small screens
- Prevents text wrapping in buttons
2026-02-02 08:17:03 +03:00
c0mrade
68c9cee52f style: make buttons more compact across admin pages
- Reduce base .btn padding from px-5 py-2.5 to px-4 py-2
- Change rounded-xl to rounded-lg for buttons
- Remove hover:scale effect for cleaner look
- Fix large buttons in AdminBanSystem, AdminBroadcastDetail
- Compact toggle buttons in AdminPromoOfferSend
2026-02-02 07:56:53 +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
fc922671d2 feat: add user search autocomplete for promo offer sending
- Replace plain input with search autocomplete
- Search by name, username, or Telegram ID
- Show user info with subscription status
- Filter to show only users with Telegram ID
2026-02-02 07:30:25 +03:00
c0mrade
822b9a6265 fix: remove small discount badge and improve large badge UX
- Remove unused PromoDiscountBadge component
- Fix undefined isPromoActive variable in AppHeader
- Restore language switcher visibility on mobile
- Enhance active discount banner with better hover effects
- Add arrow indicator and scale animation on hover
2026-02-02 07:20:37 +03:00
c0mrade
c815ac29ea fix: scroll to start of tariffs section and wait for data to load 2026-02-02 07:02:50 +03:00
c0mrade
3613294a78 feat: scroll to tariffs section when clicking discount badge 2026-02-02 06:45:41 +03:00
c0mrade
7f72adc902 refactor: simplify PromoDiscountBadge to link without modal
Remove redundant dropdown/modal since discount info already shows
in PromoOffersSection on Dashboard. Badge now navigates directly
to subscription page on click.
2026-02-02 06:40:48 +03:00
c0mrade
1d4a99c474 fix: promo offer button mobile layout 2026-02-02 06:30:40 +03:00
c0mrade
dee89fb118 improve: enhance promo offers visibility and design
- Move PromoOffersSection higher on dashboard (after subscription card)
- Replace SVG icons with expressive emojis (🏷️ for discounts, 🚀 for test access, 🎁 for general)
- Redesign activate button with gradient, shimmer effect, and hover animation
- Add shadow glow effect to make button more clickable
2026-02-02 06:26:10 +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
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