feat: Enhance file metadata and notification components

- Added sorting capabilities to file metadata lists, including SortBy and SortDir fields.
- Integrated a toast notification system for user feedback on actions.
- Updated templates and JavaScript for improved user interaction and responsiveness.
- Refactored file metadata handlers to utilize new sorting features and ensure proper data flow.
- Introduced new notification dialog components for better user confirmation on actions.
This commit is contained in:
StarFleetCPTN
2025-03-28 22:22:35 -07:00
parent c52edb75df
commit 28fa65df9d
49 changed files with 6153 additions and 926 deletions
@@ -0,0 +1,20 @@
package dialog
// DialogScripts provides the JavaScript function specific to the notification delete confirmation dialog.
templ DialogScripts() {
<script type="text/javascript">
// Called when the delete confirmation button is clicked.
// Primarily closes the modal; the actual delete is handled by hx-delete.
function triggerServiceDelete(dialogId, serviceId, serviceName) {
console.log(`Confirmed delete for service: ${serviceName} (ID: ${serviceId}). Closing modal: ${dialogId}`);
// Call the global closeModal function defined elsewhere (e.g., app.js)
if (typeof closeModal === 'function') {
closeModal(dialogId);
} else {
console.error('Global closeModal function not found.');
}
// Optional: Show a "Deleting..." toast here if desired.
// The hx-delete attribute on the button will trigger the actual backend request.
}
</script>
}