-
Created:
/src/templates/pages/admin-settings.template.ts- Complete settings page with 5 main sections
- Glass morphism design matching the existing theme
-
Modified:
/src/routes/admin.ts- Added settings routes (
GET /admin/settingsandPOST /admin/settings) - Added mock settings data structure
- Added settings routes (
-
Modified:
/src/templates/layouts/admin-layout-v2.template.ts- Added "Settings" to the sidebar navigation
- Background: Gradient from gray-900 via purple-900 to violet-800
- Glass Cards:
backdrop-blur-md bg-black/20withborder border-white/10 - Interactive Tabs: Smooth transitions with active state highlighting
- Form Elements: Consistent glass-style inputs with proper focus states
- Hover Effects: Subtle transitions and glass morphism hover states
- Site name and description
- Admin email configuration
- Timezone selection
- Language preferences
- Maintenance mode toggle
- Theme selection (Light/Dark/Auto)
- Primary color picker with live preview
- Logo and favicon URL configuration
- Custom CSS editor with syntax highlighting
- Two-factor authentication toggle
- Session timeout configuration
- Password requirements (length, complexity)
- IP whitelist management
- Email notification preferences
- Content update alerts
- System notifications
- Notification frequency settings (immediate/daily/weekly)
- File size limits
- Allowed file types configuration
- Storage provider selection (Local/Cloudflare R2/Amazon S3)
- Backup frequency and retention settings
- Client-side tab switching with smooth animations
- Tab state persistence via URL parameters
- Loading states during tab transitions
- Comprehensive form validation
- Bulk save functionality for all settings
- Individual section saving capability
- Reset to defaults option with confirmation
- Loading indicators during save operations
- Success/error notifications using the existing notification system
- Visual status indicators for system health
- Mobile-friendly tab navigation
- Responsive grid layouts
- Touch-friendly form elements
GET /admin/settings
GET /admin/settings?tab=general
GET /admin/settings?tab=appearance
GET /admin/settings?tab=security
GET /admin/settings?tab=notifications
GET /admin/settings?tab=storage
POST /admin/settings
The settings page perfectly integrates with the existing SonicJS AI design system:
- Colors: Uses the established color palette with proper contrast ratios
- Typography: Follows the Inter font family hierarchy
- Spacing: Consistent with the 8px grid system
- Components: Reuses existing button, input, and card styles
- Icons: Uses Heroicons for consistency with other admin pages
/* Main background gradient */
bg-gradient-to-br from-gray-900 via-purple-900 to-violet-800
/* Overlay for depth */
bg-black/20 backdrop-blur-sm
/* Card glass effect */
backdrop-blur-md bg-black/20 border border-white/10 shadow-xl/* Hover effects */
hover:bg-white/20 transition-colors
/* Active tab states */
bg-white/20 text-white border-white/20
/* Focus states */
focus:ring-2 focus:ring-blue-500- Database Integration: Replace mock data with actual database storage
- Real-time Preview: Live preview of appearance changes
- Import/Export: Settings backup and restore functionality
- Advanced Security: RBAC-based settings access control
- Plugin Settings: Dynamic settings for installed plugins
The settings page is ready for:
- Manual testing via the admin interface
- Integration with the existing authentication system
- Form validation testing
- Responsive design testing across devices
Access the settings page at /admin/settings after logging into the admin interface.