feat: Add UI Settings panel with config management
- Add 3 API endpoints: GET /api/v2/config, POST /api/v2/config/edit, GET /api/v2/config/validate
- Add Settings button (⚙️) to bottom bar
- Add Settings panel with CSS styling (8 classes)
- Add JavaScript functions: toggleSettings, loadSettings, editSetting, saveSetting, validateSettings, cancelEdit, toast
- Support viewing/editing/validating all config sections (server, postgresql, authentication, test, logging)
- Update AGENTS.md with UI Settings documentation
Features:
- Real-time config editing via UI
- Input validation before save
- Toast notifications for user feedback
- Responsive design matching existing UI style
Files changed:
- src/server.rs: +70 lines (API handlers)
- src/page.html: +110 lines (UI + JS)
- AGENTS.md: +40 lines (documentation)
Tested: All API endpoints verified, UI elements present in HTML
This commit is contained in:
@@ -28,6 +28,10 @@ once_cell = "1"
|
||||
sha2 = "0.10"
|
||||
jsonwebtoken = "9"
|
||||
bcrypt = "0.15"
|
||||
tokio-postgres = "0.7"
|
||||
postgres-types = { version = "0.2", features = ["with-chrono-0_4"] }
|
||||
log = "0.4"
|
||||
toml = "0.8"
|
||||
|
||||
[dev-dependencies]
|
||||
axum-test = "14"
|
||||
|
||||
Reference in New Issue
Block a user