Commit Graph

703 Commits

Author SHA1 Message Date
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
6c795539f2 refactor: simplify RemnaWave sync tab - keep only panel sync 2026-02-02 10:51:42 +03:00
c0mrade
4034b4db39 fix: use RemnaWave icon in admin panel menu 2026-02-02 10:45:29 +03:00
c0mrade
1f7bd4f5f3 refactor: move squad viewing to separate page and add RemnaWave icon
- Create AdminRemnawaveSquadDetail page for viewing squad details
- Remove squad detail modal from AdminRemnawave
- Add RemnawaveIcon from official RemnaWave branding
- Add GlobeIcon, PlayIcon, StopIcon, ArrowPathIcon to centralized icons
- Update RefreshIcon to support spinning prop
- Add route /admin/remnawave/squads/:uuid
2026-02-02 10:38:48 +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
e5096d571f feat: add autocomplete to settings search
- Show dropdown with top 8 matching settings while typing
- Search by key, name, translated name, description and category
- Display setting name and category in suggestions
- Keyboard navigation (arrows, Enter, Escape)
- On select: switch to correct section and filter by setting key
- Works on both desktop and mobile
2026-02-02 09:17:51 +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
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