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
This commit is contained in:
c0mrade
2026-01-31 22:06:36 +03:00
parent 929634aac4
commit b953ee0b8c
108 changed files with 11711 additions and 4542 deletions

View File

@@ -1,8 +1,10 @@
import { useEffect } from 'react';
import { useEffect, useCallback } from 'react';
import { useQuery } from '@tanstack/react-query';
import { themeColorsApi } from '../api/themeColors';
import { DEFAULT_THEME_COLORS } from '../types/theme';
import { applyThemeColors } from '../hooks/useThemeColors';
import { usePlatform } from '@/platform';
import { useTheme } from '../hooks/useTheme';
interface ThemeColorsProviderProps {
children: React.ReactNode;
@@ -17,10 +19,30 @@ export function ThemeColorsProvider({ children }: ThemeColorsProviderProps) {
retry: 1,
});
const { theme: platformTheme, capabilities } = usePlatform();
const { isDark } = useTheme();
// Apply colors on mount and when they change
useEffect(() => {
applyThemeColors(colors || DEFAULT_THEME_COLORS);
}, [colors]);
// Sync Telegram header and bottom bar colors with theme
const syncTelegramColors = useCallback(() => {
if (!capabilities.hasThemeSync) return;
const themeColors = colors || DEFAULT_THEME_COLORS;
// Use surface color for header/bottom bar to match app UI
const headerColor = isDark ? themeColors.darkSurface : themeColors.lightSurface;
platformTheme.setHeaderColor(headerColor);
platformTheme.setBottomBarColor(headerColor);
}, [capabilities.hasThemeSync, colors, isDark, platformTheme]);
// Apply Telegram colors when theme or colors change
useEffect(() => {
syncTelegramColors();
}, [syncTelegramColors]);
return <>{children}</>;
}