mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-10-19 04:24:05 +02:00
feat: Implement command flag management for rclone configurations
- Added functionality to manage command flags and their values in the configuration form. - Updated the database schema to include a new field for storing command flag values. - Enhanced backend logic to process and store flag values for non-boolean flags during configuration creation and updates. - Improved the user interface to dynamically require destination fields based on selected commands. - Refactored related templates and handlers to support the new command flag management features.
This commit is contained in:
1 parent
0cebfcf1f5
commit
233f1779d8
20 files changed
+457
-239
No files matched your search
@@ -198,44 +198,3 @@ templ UserEdit(ctx context.Context, data UserEditData) {
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
// JavaScript to handle URL parameters for displaying messages
|
||||
script handleUrlParams() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const error = params.get('error');
|
||||
const details = params.get('details');
|
||||
const status = params.get('status');
|
||||
|
||||
if (error) {
|
||||
const errorMsgEl = document.getElementById('error-message');
|
||||
const errorTitleEl = errorMsgEl.querySelector('.error-title');
|
||||
const errorDetailsEl = errorMsgEl.querySelector('.error-details');
|
||||
|
||||
errorTitleEl.textContent = error;
|
||||
if (details) {
|
||||
errorDetailsEl.textContent = details;
|
||||
} else {
|
||||
errorDetailsEl.textContent = '';
|
||||
}
|
||||
|
||||
errorMsgEl.classList.remove('hidden');
|
||||
|
||||
// If notyf is available, use it
|
||||
if (window.notyf) {
|
||||
window.notyf.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
if (status) {
|
||||
const statusMsgEl = document.getElementById('status-message');
|
||||
statusMsgEl.textContent = status;
|
||||
statusMsgEl.classList.remove('hidden');
|
||||
|
||||
// If notyf is available, use it
|
||||
if (window.notyf) {
|
||||
window.notyf.success(status);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user