feat: Add mail test functionality

Adds a dialog to test email settings and integrates with the `/api/settings/test/email` API endpoint.
- Added a "Test Email" button to the Mail Settings tab.
- Implemented a dialog for entering the recipient email and selecting a template.
- Added UI elements for the dialog (input fields, radio buttons, and a send button).
- Updated `src/services/settingsService.ts` to include the test email API call.
- Added UI components for the dialog (using existing UI components).
- Updated `src/components/settings/general/MailSettingsTab.tsx` to include the test email functionality.
This commit is contained in:
Tola Leng
2025-06-05 21:06:48 +08:00
parent a88b356bf5
commit 039a832b79
6 changed files with 325 additions and 42 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ const api = {
if (path === '/api/realtime') {
console.log("Routing to realtime handler");
return await realtime(body);
} else if (path === '/api/settings') {
} else if (path === '/api/settings' || path.startsWith('/api/settings/')) {
console.log("Routing to settings handler");
return await settingsApi(body);
}