MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / populateParentModelDropdown

Function populateParentModelDropdown

renderer.js:15714–15740  ·  view source on GitHub ↗
(selectedParent, elementId = 'model-parent')

Source from the content-addressed store, hash-verified

15712 let confirm;
15713 try {
15714 confirm = await window.electron.showMessage(
15715 'Confirm Delete',
15716 `Are you sure you want to DELETE ${selectedFiles.length} files?\nThis cannot be undone!\n\nFiles:\n${fileList}${moreFiles}`,
15717 ['Yes', 'No']
15718 );
15719 } finally {
15720 // Reset flag after confirmation dialog closes (whether Yes or No)
15721 isDeletingDuplicates = false;
15722 }
15723
15724 if (confirm === 'Yes') {
15725 try {
15726 for (const filePath of selectedFiles) {
15727 console.log('Attempting to delete:', filePath);
15728 const success = await window.electron.deleteFile(filePath);
15729 console.log('Delete result:', success);
15730 if (!success) {
15731 await window.electron.showMessage('Error', `Failed to delete file: ${filePath}`);
15732 }
15733 }
15734
15735 const dialog = document.getElementById('dedup-dialog');
15736 // Keep dialog open: refresh grid in background, then refresh duplicate list in place until user clicks Close
15737 selectedModels.clear();
15738
15739 // Refresh the main grid (non-blocking feel: don't await before refreshing de-dupe list)
15740 const sortSelect = document.getElementById('sort-select');
15741 window.electron.getAllModels(sortSelect ? sortSelect.value : 'date-desc').then(models => {
15742 renderFiles(models);
15743 });

Callers 4

showModelDetailsFunction · 0.85
renderer.jsFile · 0.85
refreshMetadataDropdownsFunction · 0.85
handleFileClickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected