(thumbnailString, newThumbnails)
| 8189 | notes: model.notes, |
| 8190 | license: model.license |
| 8191 | }); |
| 8192 | } |
| 8193 | } |
| 8194 | } |
| 8195 | |
| 8196 | // Show confirmation dialog if any models have existing data |
| 8197 | const win = BrowserWindow.fromWebContents(event.sender); |
| 8198 | if (modelsWithData.length > 0) { |
| 8199 | const message = modelsWithData.length === 1 |
| 8200 | ? `This will overwrite existing metadata for:\n\n${modelsWithData[0].fileName}\n\nExisting data:\n${modelsWithData[0].designer ? `Designer: ${modelsWithData[0].designer}\n` : ''}${modelsWithData[0].parentModel ? `Parent Model: ${modelsWithData[0].parentModel}\n` : ''}${modelsWithData[0].notes ? `Notes: ${modelsWithData[0].notes.substring(0, 50)}${modelsWithData[0].notes.length > 50 ? '...' : ''}\n` : ''}${modelsWithData[0].license ? `License: ${modelsWithData[0].license}\n` : ''}\n\nContinue?` |
| 8201 | : `This will overwrite existing metadata for ${modelsWithData.length} model(s).\n\nContinue?`; |
| 8202 | |
| 8203 | const confirm = await dialog.showMessageBox(win, { |
| 8204 | type: 'warning', |
| 8205 | title: 'Confirm Metadata Overwrite', |
| 8206 | message: message, |
| 8207 | buttons: ['Yes', 'No'], |
| 8208 | defaultId: 1, |
| 8209 | cancelId: 1 |
no test coverage detected