Overview
The Settings page allows you to personalize your CicloVital experience by choosing from multiple theme options and managing your account. Access settings through the application header or menu. Route:/settings
Accessing Settings
Theme Customization
CicloVital offers five distinct themes to match your mood and preferences:Available Themes
Dark
Classic dark mode for comfortable viewing in low-light environments
Ocean
Calming blue and teal tones inspired by the ocean
Sunset
Warm oranges and purples reminiscent of sunset
Berry
Rich berry tones with purple and pink accents
Forest
Natural green tones inspired by forest landscapes
How Themes Work
- Instant application - Theme changes apply immediately across the entire app
- Persistent storage - Your theme choice is saved in browser localStorage
- Consistent styling - All pages, components, and features adapt to your chosen theme
- Accessibility - Each theme maintains proper contrast ratios for readability
Switching Themes
Account Management
Sign Out
The Settings page provides a secure sign-out option:The Sign Out button is only enabled when you’re logged in. If you’re not authenticated, the button appears disabled.
User Interface
The Settings page is organized into clear sections:Theme Settings Section
- Title: “Ajustes de Tema” (Theme Settings)
- Layout: Horizontal button group with all theme options
- Active state: Currently selected theme is highlighted
- Disabled state: Active theme button is disabled to prevent redundant clicks
User Settings Section
- Title: “Ajustes de Usuario” (User Settings)
- Sign Out button: Large, prominent button with logout icon
- Disabled when logged out: Prevents errors if no user session exists
Visual Elements
- CicloVital logo: Displayed at the bottom of the settings page
- Clean spacing: Generous padding for comfortable reading and interaction
- Responsive design: Adapts to different screen sizes and orientations
Technical Implementation
Settings integrates with several contexts and hooks:src/pages/Settings/Settings.jsx:14-16
Theme Persistence
Themes are stored using theuseLocalStorage hook:
Theme Application
When you change themes, the new theme class is applied to the document:Best Practices
Troubleshooting
Theme not changing
Theme not changing
If theme selection doesn’t work:
- Refresh the page
- Clear your browser cache
- Check that JavaScript is enabled
- Ensure localStorage is not disabled in your browser
Sign out button disabled
Sign out button disabled
Theme not persisting
Theme not persisting
If your theme resets after closing the browser:
- Check browser privacy settings
- Ensure cookies and localStorage are allowed
- Verify you’re not in private/incognito mode
Related Features
Theme Context
Learn how themes are managed at the code level
Authentication
Understand user authentication and sessions
useAuth Hook
Technical details of the logout function
useLocalStorage
Learn about persistent storage
