feat: Complete frontend master upgrade with PWA, SEO, Bundle Analysis, and State Management
- Install nanostores for lightweight state management - Add enhanced Directus client with auth and realtime - Configure PWA with offline support and service worker - Enable auto-sitemap generation for SEO - Add Partytown for web worker analytics - Implement image optimization with astro-imagetools - Add bundle visualizer for performance analysis - Enable Brotli compression for all assets - Add Vite Inspect for debugging - Create sidebar state management store - Install TipTap rich text editor - Add React Hook Form + Zod validation - Add TanStack Query for data fetching All plugins tested and build verified successfully.
This commit is contained in:
17
frontend/src/stores/sidebarStore.ts
Normal file
17
frontend/src/stores/sidebarStore.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { atom } from 'nanostores';
|
||||
|
||||
// Sidebar open/close state
|
||||
export const isSidebarOpen = atom(true);
|
||||
|
||||
// Active route for highlighting
|
||||
export const activeRoute = atom('/admin');
|
||||
|
||||
// Helper to toggle sidebar
|
||||
export function toggleSidebar() {
|
||||
isSidebarOpen.set(!isSidebarOpen.get());
|
||||
}
|
||||
|
||||
// Helper to set active route
|
||||
export function setActiveRoute(route: string) {
|
||||
activeRoute.set(route);
|
||||
}
|
||||
Reference in New Issue
Block a user