mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
feat: replace animated backgrounds with Aceternity UI system
- Add 16 animated background components (aurora, sparkles, vortex, shooting-stars, beams, beams-collision, gradient-animation, wavy, lines, boxes, meteors, grid, dots, spotlight, noise, ripple, gemini-effect) - Add full admin BackgroundEditor with live preview, type gallery, per-type settings - Add BackgroundRenderer with lazy loading, localStorage cache, mobile reduction - Add input sanitization (sanitizeColor, clampNumber) across all components - Add translations for en, ru, zh, fa locales - Remove old Aurora (WebGL/OGL) and AnimatedBackground (CSS wave-blob) - Remove ogl dependency, add simplex-noise
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
import apiClient from './client';
|
||||
import type { AnimationConfig } from '@/components/ui/backgrounds/types';
|
||||
import { DEFAULT_ANIMATION_CONFIG } from '@/components/ui/backgrounds/types';
|
||||
|
||||
export type { AnimationConfig };
|
||||
|
||||
export interface BrandingInfo {
|
||||
name: string;
|
||||
@@ -180,6 +184,25 @@ export const brandingApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Get animation config (public, no auth required)
|
||||
getAnimationConfig: async (): Promise<AnimationConfig> => {
|
||||
try {
|
||||
const response = await apiClient.get<AnimationConfig>('/cabinet/branding/animation-config');
|
||||
return response.data;
|
||||
} catch {
|
||||
return DEFAULT_ANIMATION_CONFIG;
|
||||
}
|
||||
},
|
||||
|
||||
// Update animation config (admin only, partial update)
|
||||
updateAnimationConfig: async (config: Partial<AnimationConfig>): Promise<AnimationConfig> => {
|
||||
const response = await apiClient.patch<AnimationConfig>(
|
||||
'/cabinet/branding/animation-config',
|
||||
config,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Get fullscreen enabled (public, no auth required)
|
||||
getFullscreenEnabled: async (): Promise<FullscreenEnabled> => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user