Commit Graph

994 Commits

Author SHA1 Message Date
Egor
1cce741afa Merge pull request #138 from BEDOLAGA-DEV/dev
Update promo.ts
2026-02-04 04:56:18 +03:00
Egor
f89573a1f3 Update promo.ts 2026-02-04 04:56:05 +03:00
c0mrade
98d90a99c6 Use native Telegram back button in AdminPaymentMethods
Replace desktop-style back button with native Telegram BackButton API:
- Use useBackButton hook for Telegram Mini App
- Show UI back button only on web (when !capabilities.hasBackButton)
- Improves native feel in Telegram environment
2026-02-04 04:26:15 +03:00
c0mrade
b2a6b959c1 Restore drag-and-drop and add promo deactivation with Telegram popup
Payment methods drag-and-drop fixes:
- Restore original working drag-and-drop from commit 84c6d26
- Use position: relative instead of opacity for dragged items
- Remove closestCenter collision detection
- Use PointerSensor with distance: 5 without TouchSensor
- Restore touch-none and responsive padding on drag handles
- Restore original shadow and background colors

Promo deactivation feature:
- Add deactivation button to active discount banner in PromoOffersSection
- Use Telegram native popup (showPopup) in Mini App environment
- Fallback to modal for web browsers
- Add confirmation modal with warning about permanent action
- Integrate with useTelegramSDK for proper platform detection
2026-02-04 04:08:35 +03:00
c0mrade
6d5ee3856e Fix ESLint fast-refresh warnings
Refactor to resolve react-refresh/only-export-components warnings:
- Move buttonVariants export to separate file (Button.variants.ts)
- Extract WebSocketContext to dedicated context file
- Move useWebSocketContext hook to separate file
- Update imports across affected files

All component files now export only components, improving fast refresh reliability
2026-02-04 04:08:11 +03:00
c0mrade
9042603e67 Move payment method editing to separate page and fix auth error handling
- Replace modal with dedicated AdminPaymentMethodEdit page
- Add route /admin/payment-methods/:methodId/edit
- Fix 401 error handling for auth endpoints to show error messages instead of reloading page
- Update client.ts to use window.Telegram.WebApp.initData directly
- Maintain useTelegramDnd for drag and drop functionality
2026-02-04 03:39:38 +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
dd51552074 Update README.md 2026-02-04 03:13:17 +03:00
Egor
f65281ba9d Merge pull request #137 from BEDOLAGA-DEV/dev
Add files via upload
2026-02-04 02:12:35 +03:00
Egor
0b127a5f85 Add files via upload 2026-02-04 02:12:18 +03:00
Egor
c0f828d7a3 Merge pull request #136 from BEDOLAGA-DEV/dev
Update Subscription.tsx
2026-02-04 02:11:29 +03:00
Egor
7f5c0c83b3 Add files via upload 2026-02-04 02:10:26 +03:00
Egor
73212e508d Update PromoDiscountBadge.tsx 2026-02-04 02:10:08 +03:00
Egor
8c9b161b58 Update promo.ts 2026-02-04 02:09:31 +03:00
Egor
6c8d2ad69e Update Subscription.tsx 2026-02-04 01:17:05 +03:00
Egor
ac1b9db462 Merge pull request #135 from BEDOLAGA-DEV/dev
Dev
2026-02-04 01:08:21 +03:00
Egor
026cb47694 Update Subscription.tsx 2026-02-04 01:08:05 +03:00
Egor
9804e3a874 Update Subscription.tsx 2026-02-04 01:00:49 +03:00
Egor
9e590247e0 Add files via upload 2026-02-04 00:51:07 +03:00
Egor
158a47e1e1 Update Subscription.tsx 2026-02-04 00:50:50 +03:00
c0mrade
84c6d265cf Fix drag-and-drop multiple reorders and wheel lights pattern
- Allow multiple prize reorders before saving by using current displayed order
- Simplify lights pattern calculation using distance-based logic
- Fixes: drag only worked once, lights appeared to go through wheel
2026-02-04 00:22:46 +03:00
c0mrade
b6561f32b3 Fix TypeScript error in WheelLegend
Remove prize.value reference - WheelPrize type doesn't contain value field
(only display_name, emoji, color, prize_type)
2026-02-03 23:47:22 +03:00
Egor
01d5c3b248 Merge pull request #134 from BEDOLAGA-DEV/dev
Update ConnectionModal.tsx
2026-02-03 23:46:07 +03:00
Egor
676817caed Update ConnectionModal.tsx 2026-02-03 23:45:32 +03:00
c0mrade
f6feb592d2 Add deferred save for prize reordering in admin
- Remove auto-save on drag-and-drop (prevents UI jumps)
- Store prize order changes locally
- Show warning banner with unsaved changes
- Add Save and Cancel buttons
- Only trigger API call when user clicks Save
- Add translations for unsaved order messages
2026-02-03 23:42:59 +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
d826277247 Improve mobile layout for admin users list
- Stack name and username vertically on mobile
- Move Telegram ID to separate line
- Make status badges wrap when needed
- Reduce font sizes and spacing on small screens
- Hide purchase count on mobile
- Hide chevron icon on mobile, keep only action menu
2026-02-03 23:15:24 +03:00
c0mrade
ef6863081e Redesign wheel UI with linear design system
- Improve wheel rotation animation with accumulated rotation tracking
- Enhance LED lights with running animation effect
- Replace sidebar history with collapsible section
- Unify spin button for all payment methods
- Update admin prize card styles with new borders and backgrounds
- Add improved drag-and-drop collision detection
- Prefer Telegram Stars payment in Mini App by default
2026-02-03 22:27:57 +03:00
c0mrade
f147c10a25 Merge remote-tracking branch 'origin/main' into feat/linear-ui-redesign
# Conflicts:
#	src/pages/AdminUsers.tsx
2026-02-03 21:48:38 +03:00
Egor
733674bcc7 Merge pull request #133 from BEDOLAGA-DEV/dev
Dev
2026-02-03 04:42:31 +03:00
Egor
bab722385d Update AdminUsers.tsx 2026-02-03 04:41:34 +03:00
Egor
efb8113647 Add files via upload 2026-02-03 04:40:00 +03:00
Egor
42bb563ab6 Update AdminUsers.tsx 2026-02-03 04:39:42 +03:00
Egor
eae12e2694 Update adminUsers.ts 2026-02-03 04:39:13 +03:00
Egor
cb0d269857 Merge pull request #132 from BEDOLAGA-DEV/dev
Dev
2026-02-03 04:01:39 +03:00
Egor
334b2718ee Add files via upload 2026-02-03 03:49:26 +03:00
Egor
192ac71a02 Update Subscription.tsx 2026-02-03 03:49:06 +03:00
Egor
7783cbc61d Update index.ts 2026-02-03 03:48:45 +03:00
c0mrade
494285bcbf feat: redesign fortune wheel with improved UX
Wheel.tsx (user page):
- Always show history sidebar on desktop
- Show placeholder when no history
- Remove history toggle button

AdminWheel.tsx:
- Replace auto-save with form + Save button
- Fix toggle switch styling
- Replace HTML5 drag-drop with @dnd-kit for mobile/Telegram
- Improve mobile responsiveness (tabs, cards, buttons)
- Add live wheel preview on desktop
- Group settings into sections

FortuneWheel.tsx:
- Slow down LED animation (250ms -> 600ms)

Navigation:
- Add wheel to mobile bottom nav (replaces Support when enabled)
2026-02-02 18:21:50 +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
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