mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-07-07 10:35:09 +00:00
Improve scanner UI
This commit is contained in:
@@ -27,7 +27,7 @@ export class ToolsComponent {
|
|||||||
this.scanErrorModal.nativeElement.showModal()
|
this.scanErrorModal.nativeElement.showModal()
|
||||||
} else if (status === 'done') {
|
} else if (status === 'done') {
|
||||||
this.scanning = false
|
this.scanning = false
|
||||||
this.buttonText = 'Complete! (click to scan again)'
|
this.buttonText = message + ' (click to scan again)'
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,14 +54,16 @@ export async function scanIssues() {
|
|||||||
|
|
||||||
limiter.on('idle', async () => {
|
limiter.on('idle', async () => {
|
||||||
const issues = getChartIssues(charts)
|
const issues = getChartIssues(charts)
|
||||||
|
if (issues.length > 0) {
|
||||||
const xlsx = await getIssuesXLSX(issues)
|
const xlsx = await getIssuesXLSX(issues)
|
||||||
const outputPath = [settings.spreadsheetOutputPath, `chart_issues_${dayjs().format('YYYY.MM.DD_HH.mm.ss')}.xlsx`].join('/')
|
const outputPath = [settings.spreadsheetOutputPath, `chart_issues_${dayjs().format('YYYY.MM.DD_HH.mm.ss')}.xlsx`].join('/')
|
||||||
await writeFile(outputPath, new Uint8Array(xlsx))
|
await writeFile(outputPath, new Uint8Array(xlsx))
|
||||||
await new Promise<void>(resolve => setTimeout(resolve, 500)) // Delay for OS file processing
|
await new Promise<void>(resolve => setTimeout(resolve, 500)) // Delay for OS file processing
|
||||||
await shell.openPath(outputPath)
|
await shell.openPath(outputPath)
|
||||||
|
}
|
||||||
emitIpcEvent('updateIssueScan', {
|
emitIpcEvent('updateIssueScan', {
|
||||||
status: 'done',
|
status: 'done',
|
||||||
message: `${issues.length} issues found in ${charts.length} charts. Spreadsheet saved to ${outputPath}`,
|
message: `${issues.length} issues found in ${charts.length} charts.`,
|
||||||
})
|
})
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user