Updated all references to the default admin password across the codebase: - Changed seed script to use 'sonicjs!' instead of 'admin123' - Updated demo-login plugin to prefill new password - Updated all documentation (docs/, www/) - Updated test helpers and e2e test utilities - Updated migration SQL files with new password - Updated auth routes to hash new password - Updated all source code comments - Updated database admin user password via seed-admin endpoint Admin credentials are now: - Email: admin@sonicjs.com - Password: sonicjs! 馃 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2.9 KiB
2.9 KiB
Plugin Settings Feature Test
What's Implemented
-
New Plugin Settings Page Template (
admin-plugin-settings.template.ts)- Comprehensive settings page with tabs for Settings, Activity Log, and Information
- Dynamic form generation based on plugin settings
- Toggle functionality for boolean settings
- Input fields for text and number settings
- Activity log display
- Plugin information panel
-
Updated Plugin Routes (
admin-plugins.ts)- Modified
/:idroute to render the settings page instead of returning JSON - Added proper error handling and authorization
- Maps database plugin data to template format
- Modified
-
Updated Plugin List (
admin-plugins-list.template.ts)- "Settings" button now navigates to
/admin/plugins/{id}instead of showing placeholder
- "Settings" button now navigates to
Features
Settings Tab
- Dynamic Settings Form: Automatically generates form fields based on plugin settings
- Toggle Switches: For boolean settings (e.g.,
enableSearch: true) - Text Inputs: For string settings (e.g.,
demoEmail: "admin@example.com") - Number Inputs: For numeric settings (e.g.,
questionsPerPage: 10) - Save Functionality: AJAX save to
/admin/plugins/{id}/settings
Activity Log Tab
- Activity History: Shows plugin activation, deactivation, settings changes
- Timestamps: Formatted dates for each activity
- User Attribution: Shows which user performed each action
Information Tab
- Plugin Details: Version, author, category, status, last updated
- Dependencies: List of required plugins/packages
- Permissions: Required permissions for the plugin
Plugin Header
- Status Badge: Visual indicator (active/inactive/error)
- Toggle Button: Activate/deactivate functionality
- Plugin Icon: Visual identifier
How to Test
- Navigate to Plugins: Go to
/admin/plugins - Click Settings: Click the "Settings" button on any plugin card
- View Settings Page: Should load the plugin settings page with tabs
- Test Functionality:
- Switch between Settings/Activity/Information tabs
- Try toggling boolean settings
- Modify text/number settings and save
- Toggle plugin on/off from the header
Supported Plugin Settings Examples
The system currently supports these plugin types with settings:
-
FAQ Plugin:
{ "enableSearch": true, "enableCategories": true, "questionsPerPage": 10 } -
Demo Login Plugin:
{ "enableNotice": true, "demoEmail": "admin@sonicjs.com", "demoPassword": "sonicjs!" }
Next Steps
This implementation provides a complete plugin settings interface that allows administrators to:
- Configure plugin-specific settings through a user-friendly interface
- Monitor plugin activity and usage
- View detailed plugin information
- Enable/disable plugins as needed
The interface is responsive and follows the existing admin design patterns.