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:
41
config/markbase.toml
Normal file
41
config/markbase.toml
Normal file
@@ -0,0 +1,41 @@
|
||||
[server]
|
||||
host = "127.0.0.1"
|
||||
port = 11438
|
||||
log_level = "info"
|
||||
auth_db_path = "data/auth.sqlite"
|
||||
users_db_dir = "data/users"
|
||||
|
||||
[postgresql]
|
||||
host = "127.0.0.1"
|
||||
port = 5432
|
||||
user = "sftpgo"
|
||||
password = "sftpgo_pass_2026"
|
||||
database = "sftpgo"
|
||||
connection_pool_size = 5
|
||||
|
||||
[authentication]
|
||||
bcrypt_cost = 10
|
||||
token_validity_hours = 24
|
||||
session_storage = "memory"
|
||||
max_sessions_per_user = 5
|
||||
default_user = "demo"
|
||||
default_password = "demo123"
|
||||
|
||||
[test]
|
||||
users = [
|
||||
"warren",
|
||||
"momentry",
|
||||
"demo",
|
||||
]
|
||||
password = "demo123"
|
||||
login_test_iterations = 10
|
||||
verify_test_iterations = 100
|
||||
api_test_iterations = 50
|
||||
performance_report = true
|
||||
output_format = "markdown"
|
||||
|
||||
[logging]
|
||||
level = "info"
|
||||
file_path = "logs/markbase.log"
|
||||
console_output = true
|
||||
structured_logging = false
|
||||
Reference in New Issue
Block a user