3.8 KiB
3.8 KiB
Web UI Complete Rebuild Documentation
Overview
The Web UI has been completely rebuilt from scratch to provide a clean, modern, intuitive interface.
What Changed
Before (Old UI)
- 3,926 total lines (796 HTML + 2,371 JS + 759 CSS)
- Overly complex with nested menus
- Confusing navigation structure
- LCD Builder buried in settings
- Poor mobile responsiveness
- Cluttered layout with too many competing features
After (New UI)
- ~1,200 total lines (clean, focused code)
- 70% reduction in code complexity
- Simple 4-page navigation
- Clear visual hierarchy
- Mobile-first responsive design
- Modern card-based layout
New Structure
4 Main Pages
-
Dashboard (
#dashboard)- Real-time status overview
- Primary stats (temp, target, heater, mode)
- Weather & network info
- Energy usage & system health
- Live LCD preview
-
Control (
#control)- Mode selection (Off, Manual, Auto, AI)
- Temperature control with presets
- Quick actions (Boost, Eco, Away, Schedule)
-
Builder (
#builder)- LCD page builder (dedicated page, not hidden)
- Visual canvas editor
- Properties panel
- Page management
-
Settings (
#settings)- Display & theme settings
- Weather & location config
- Network settings
- System actions
- Device information
Key Features
Clean Navigation
- Top navbar with icons + text
- Single-click access to all pages
- Connection status indicator
- No hidden menus or modals
Modern Design
- Card-based layout
- Consistent spacing & typography
- Color-coded status indicators
- Smooth animations & transitions
- Responsive grid system
Better UX
- Touch-friendly buttons (min 44px)
- Clear visual feedback
- Toast notifications
- Loading states
- Error handling
Simplified Settings
- Grouped by category
- Inline form validation
- Live previews where applicable
- One-click system actions
API Endpoints Used
The new UI connects to these ESP32 endpoints:
GET /api/status- Real-time system statusPOST /api/config- Update configurationPOST /api/mode- Set control modePOST /api/temp- Set target temperatureGET /api/pages/all- List LCD pagesGET /api/pages/{name}- Get page dataPOST /api/pages/{name}- Save page dataDELETE /api/pages/{name}- Delete pagePOST /api/system/restart- Restart devicePOST /api/system/reset- Factory reset
File Structure
data/
index.html # Main HTML (clean structure)
css/
style.css # Modern styles (organized)
js/
app.js # JavaScript logic (modular)
Browser Support
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Mobile browsers (iOS 14+, Android 10+)
Future Enhancements
Possible improvements (not yet implemented):
- Dark mode toggle
- Multi-language support
- Custom themes
- Advanced scheduling
- Data export/import
- OTA firmware updates
- User authentication (if needed)
Backup Files
Original files are backed up:
index.html.backupapp.js.backupstyle.css.backup
To revert: rename backup files back to originals.
Testing Checklist
- Dashboard loads and displays data
- Control mode switching works
- Temperature control functions
- Builder canvas is interactive
- Settings save correctly
- Mobile layout works properly
- Toast notifications appear
- LCD preview updates
- All API calls succeed
- Error handling works
Notes
- Removed persona switcher (unused complexity)
- Removed setup wizard (streamlined onboarding)
- Removed sparkline charts (visual clutter)
- Focused on core functionality
- Prioritized usability over features
- Designed for touch interaction
Built with: Clean HTML5, Modern CSS3, Vanilla JavaScript Target Device: ESP32-S3 Touch Controller (480x272 LCD) Design Philosophy: Simplicity, Clarity, Usability