mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-09-08 15:41:20 +02:00
feat: Add connection testing functionality for Rclone providers
- Introduced a new endpoint to test connections for source and destination providers. - Implemented a TestResult component to display success or error messages based on connection outcomes. - Enhanced the configuration form with buttons to initiate connection tests, improving user experience. - Updated backend logic to handle connection testing and return appropriate feedback to the frontend. - Refactored existing handlers and routes to accommodate the new testing functionality.
This commit is contained in:
@@ -446,3 +446,20 @@ function enhanceMobileForms() {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Listen for custom 'showToast' event triggered by HX-Trigger
|
||||
document.body.addEventListener('showToast', function(event) {
|
||||
// Debug logs removed
|
||||
if (event.detail && event.detail.message && event.detail.type) {
|
||||
// Call the globally defined showToast function from toast_js.templ
|
||||
if (typeof showToast === 'function') {
|
||||
showToast(event.detail.message, event.detail.type);
|
||||
} else {
|
||||
console.error('showToast function not found. Ensure toast_js.templ is loaded.');
|
||||
}
|
||||
} else {
|
||||
console.warn('Received showToast event without expected detail:', event.detail);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user