Skip to content

Conversation

@michelroegl-brunner
Copy link
Member

🌙☀️ Light/Dark Mode Implementation

✨ Features Added

  • Complete theme system with light and dark mode support
  • Theme persistence using localStorage
  • Two theme switchers: Header toggle + Settings modal
  • Semantic color system with CSS variables for both themes
  • 200+ hardcoded colors replaced across 30+ components

🎨 UI Improvements

  • Toggle switches with proper visual states and contrast
  • Dropdown menus with consistent grey styling and hover effects
  • Start/Stop/Destroy buttons with proper color coding and hover states
  • Status indicators using semantic colors throughout the app

🔧 Technical Improvements

  • Fixed dependency loops in status checking functionality
  • Added missing CSS utility classes for hover states
  • Build optimizations and ESLint fixes
  • Theme-aware components that adapt to light/dark modes

🎯 Components Updated

  • High-priority: InstalledScriptsTab, ScriptInstallationCard, LXCSettingsModal, ScriptsGrid
  • All modal components: ErrorModal, ConfirmationModal, AuthModal, SetupModal
  • Form components: ServerForm, FilterBar, CategorySidebar
  • Display components: ScriptCard, ScriptCardList, DiffViewer, TextViewer
  • UI components: button variants, toggle, badge components

🧪 Testing

  • ✅ Build completes successfully without warnings
  • ✅ All ESLint issues resolved
  • ✅ No circular dependencies
  • ✅ Both light and dark modes work seamlessly
  • ✅ Theme persistence across page reloads

📱 User Experience

  • Intuitive theme switching with sun/moon icons
  • Consistent visual feedback across all interactive elements
  • Accessible color contrast in both themes
  • Smooth transitions between theme changes

Ready for review and testing! 🚀

- Add semantic color CSS variables (success, warning, info, error) for both themes
- Create ThemeProvider with React context and localStorage persistence
- Add ThemeToggle component with sun/moon icons for header region
- Add theme switcher in General Settings modal
- Replace 200+ hardcoded Tailwind colors with CSS variables across 30+ components
- Update layout.tsx to remove forced dark mode
- Keep terminal colors unchanged as requested
- Default to dark mode, with seamless light/dark switching

Components updated:
- High-priority: InstalledScriptsTab, ScriptInstallationCard, LXCSettingsModal, ScriptsGrid
- All remaining component files with hardcoded colors
- UI components: button, toggle, badge variants
- Modal components: ErrorModal, ConfirmationModal, AuthModal, SetupModal
- Form components: ServerForm, FilterBar, CategorySidebar
- Display components: ScriptCard, ScriptCardList, DiffViewer, TextViewer

Theme switchers:
- Header: Small nuanced toggle in top-right
- Settings: Detailed Light/Dark selection in General Settings
- Fix missing dependencies in useCallback and useEffect hooks
- Prefix unused parameter with underscore to satisfy ESLint rules
- Build now completes without warnings
- Use explicit gray colors instead of CSS variables for toggle background
- Ensure proper contrast in both light and dark modes
- Toggle switches now display correctly with proper visual states
- Use explicit conditional styling instead of peer classes
- Active toggles now clearly show primary color background
- Inactive toggles show gray background for clear distinction
- Much easier to tell which toggles are on/off at a glance
- Change inactive toggle background from gray-700 to gray-600 for better visibility
- Add darker border color (gray-500) for toggle handle in dark mode
- Toggles now have proper contrast against dark backgrounds
- Both light and dark modes now have clear visual distinction
- Fix circular dependency in InstalledScriptsTab status check
- Remove fetchContainerStatuses function and inline logic in useEffect
- Make all dropdown menu items grey with consistent hover effects
- Update both ScriptInstallationCard and InstalledScriptsTab dropdowns
- Remove unused useCallback import
- Build now completes without warnings or errors
- Restore red color for Stop/Destroy buttons and green for Start buttons
- Fix circular dependency by using ref for containerStatusMutation
- Update both InstalledScriptsTab and ScriptInstallationCard dropdowns
- Maintain grey color for other menu items (Update, Shell, Open UI, etc.)
- Build now completes without warnings or dependency loops
- Add hover states for success, warning, info, error colors
- Add hover:bg-success/20, hover:bg-error/20, etc. classes
- Add hover:text-success-foreground, hover:text-error-foreground classes
- Start/Stop and Destroy buttons now have proper hover effects
- All dropdown menu items now have consistent hover behavior
@michelroegl-brunner michelroegl-brunner requested a review from a team as a code owner October 17, 2025 13:22
@michelroegl-brunner michelroegl-brunner added the enhancement New feature or request label Oct 17, 2025
@michelroegl-brunner michelroegl-brunner self-assigned this Oct 17, 2025
@michelroegl-brunner michelroegl-brunner added the enhancement New feature or request label Oct 17, 2025
@michelroegl-brunner michelroegl-brunner linked an issue Oct 17, 2025 that may be closed by this pull request
- Replace useless 'Successful/Failed/In Progress' cards with meaningful data
- Show 'Running LXC' count in green (actual running containers)
- Show 'Stopped LXC' count in red (actual stopped containers)
- Keep 'Total Installations' for overall count
- Change layout from 4 columns to 3 columns for better spacing
- Status cards now show real-time container states instead of installation status
- Add text-center class to each individual status card
- Numbers and labels now centered within each card
- Improves visual balance and readability
- All three cards (Total, Running LXC, Stopped LXC) now have centered content
@michelroegl-brunner michelroegl-brunner merged commit c896380 into main Oct 17, 2025
3 checks passed
@michelroegl-brunner michelroegl-brunner added feature and removed enhancement New feature or request labels Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lack of light mode?

2 participants