Commit Graph

21 Commits

Author SHA1 Message Date
c0mrade
b81346dbb2 refactor(quieter): tone down AdminPanel + AdminDashboard
Per /impeccable audit findings: admin overview pages concentrated
AI-aesthetic tells. Apply the 'quieter' refinement — strip the loudness,
keep the structure, preserve state-conveying motion.

AdminPanel.tsx
  • Hero h1 — drop bg-clip-text + 3-stop gradient. Solid text-dark-50
    (the absolute ban applied; type weight + size carry hierarchy now).
  • 'Online' dot — drop the 10px-radius glow shadow; the dot + pulse
    animation alone signal liveness.
  • GlassCard — drop the 3D perspective-tilt mouse-tracking (decorative
    motion that didn't convey state), drop the staggered enter
    animation (no orchestrated page-load), drop the top hairline-glow
    gradient, drop the inner shine overlay + drop-shadow-sm on the
    count badge. Keep backdrop-blur on the card body itself — the
    component is literally named GlassCard, the glass identity is the
    point. Hover state stays.
  • Stats-bar pills (2 places) — drop backdrop-blur. Tiny data cells
    don't need glass.
  • Search empty-state icon container — drop backdrop-blur. Decorative
    on a non-interactive surface.

AdminDashboard.tsx
  • Strip backdrop-blur from all 9 stat / node / panel cards. They
    were using it as ambient noise; solid bg-dark-800/{30,50} reads
    better and renders faster.
  • Daily-sales progress bar — drop the from-accent-600 to-accent-400
    gradient (and hover gradient swap). Solid bg-accent-500, hover
    bg-accent-400. Width still animates (functional state change).
  • Animate-pulse on the connected-node status dot kept — it conveys
    'live' state, which is exactly what motion is for in product UI.
2026-05-26 19:11:17 +03:00
c0mrade
0b07af82d4 perf(admin): migrate AdminDashboard to React Query (refetchInterval, no setInterval)
Replace manual fetchStats/fetchExtendedStats (useState + useEffect + setInterval(30s)
+ console.error) with two useQuery hooks using refetchInterval. Keeps existing variable
names (stats/loading/error/referrers/campaigns/payments/systemInfo) so JSX is unchanged.
handleRestartNode/handleToggleNode/retry button now refetch via the query.
2026-05-26 11:52:14 +03:00
Fringg
a34a34204c refactor: update remnawave API types for v2.7.0
- ServerInfo: remove cpu_physical_cores, memory_available
- NodeInfo: replace cpu_count/cpu_model/total_ram with versions/system,
  xray_uptime changed to number, users_online now required
- NodeStatus: same field updates, remove dead uptime field
- Extract formatUptime to shared utils/format.ts
- Update AdminRemnawave and AdminDashboard components
2026-03-28 22:32:22 +03:00
Fringg
e278fec506 feat: кликабельные имена пользователей в последних платежах
Имена в блоке "Последние платежи" теперь ведут на профиль
пользователя /admin/users/:id (десктоп и мобильная версия).
2026-03-05 11:16:55 +03:00
Fringg
ab0270ac58 feat: add system info card to admin dashboard
Shows cabinet version, bot version, Python version, uptime, users and
active subscriptions at the bottom of the dashboard page.
2026-02-08 22:52:14 +03:00
c0mrade
562ab7abf7 refactor: full codebase cleanup, dependency updates, and lint fixes
Phase 0: Remove ~920 lines of dead code (ThemeBentoPicker, PromoDiscountBadge,
AdminLayout, SettingsSidebar, MovingGradient, EmptyState, miniapp API, unused
types/functions/transitions/skeleton helpers). Fix API barrel file (add 20 missing exports).

Phase 1: Add ErrorBoundary (app/page/widget levels), centralize constants,
add axios timeout, fix staleTime:0 in React Query.

Phase 2: Consolidate hexToHsl, extract email validation, fix duplicate code.

Phase 3: Fix auth race condition (await checkAdminStatus), memoize useCurrency,
add WebSocket message validation.

Phase 4: Extract useBranding, useFeatureFlags, useScrollRestoration from AppShell.

Phase 5: Remove all eslint-disable react-hooks/exhaustive-deps (14 total),
simplify logger, remove deprecated hooks (useBackButton, useTelegramDnd,
useTelegramWebApp).

Dependencies: React 19, react-router 7, zustand 5, i18next 25, react-i18next 16,
eslint-plugin-react-refresh 0.5. Remove unused @lottiefiles/dotlottie-react.
Convert vite manualChunks to function-based approach for react-router v7 compat.

Lint: Fix logger.ts no-unused-expressions, fix react-refresh/only-export-components
in 6 Radix primitive files (const re-exports → direct re-exports), fix
WebSocketProvider exhaustive-deps. Result: 0 errors, 0 warnings.

Add CLAUDE.md to .gitignore.
2026-02-06 16:55:55 +03:00
c0mrade
482bdd0b0d Remove replace flag from back button navigation to fix double-click issue
Fixed issue where users had to click the Telegram Mini App back button twice
in many admin pages. The replace flag was causing conflicts between Telegram's
BackButton internal history and React Router's history management.

Updated all 32 admin pages to use simple navigate() calls without replace flag.
2026-02-04 06:11:29 +03:00
c0mrade
55e2068606 Fix back button cycling in Telegram Mini App
Add replace: true to all navigate() calls in useBackButton hooks
Prevents history cycles when navigating back and forth
All 32 admin pages now use navigate(path, { replace: true })
Back button now goes directly to parent without cycling
2026-02-04 05:59:15 +03:00
c0mrade
e948cdc8d2 Complete back button logic for all admin pages in Telegram Mini App
Main sections navigate to /admin (15 pages)
Detail/edit pages navigate to parent lists (16 pages)
All pages use useBackButton hook with proper navigation paths
Native Telegram back button in Mini App, UI button on web
Email template pages keep UI-only back buttons as required
2026-02-04 05:03:06 +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
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
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
ed7d2896dd Update AdminDashboard.tsx 2026-01-19 09:15:06 +03:00
PEDZEO
fac733f150 Refactor AdminDashboard and AdminPanel components for improved icon consistency and layout
- Updated icon components in AdminDashboard to use modern, styled icons for better visual consistency.
- Replaced existing icons with new versions across various sections, enhancing the overall UI.
- Refactored AdminPanel to streamline the structure, introducing grouped sections for better organization.
- Improved card layouts and hover effects for a more responsive user experience.
2026-01-19 07:46:14 +03:00
PEDZEO
638f1d5456 Refactor Dockerfile and Vite configuration to remove VITE_APP_VERSION and streamline build process
- Removed VITE_APP_VERSION from Dockerfile and GitHub workflows.
- Simplified Vite configuration by eliminating the Git version retrieval function and global constant for app version.
- Updated ColorPicker and other components to enhance accessibility with aria-labels.
- Introduced unique identifiers for buttons in the AppEditorModal for better React key management.
- Improved error handling in the Login component to provide user-friendly messages without exposing sensitive data.
2026-01-19 07:39:09 +03:00
PEDZEO
8667945501 Implement back navigation in admin pages by adding a BackIcon and linking to the admin dashboard across multiple components. 2026-01-18 07:42:29 +03:00
Egor
c8eee801cd Update AdminDashboard.tsx 2026-01-16 03:54:39 +03:00
Egor
704469b491 Update AdminDashboard.tsx 2026-01-16 03:53:01 +03:00
Egor
16e62bc14d Update AdminDashboard.tsx 2026-01-16 03:29:38 +03:00
Egor
663e4b32fa Update AdminDashboard.tsx 2026-01-16 03:20:44 +03:00
Egor
7be6b5c0ae Add files via upload 2026-01-15 19:18:17 +03:00