06/01 Fix PDF statement import issue
This commit is contained in:
@@ -339,16 +339,15 @@
|
||||
}
|
||||
|
||||
function setParseLoading(on) {
|
||||
$('parse-spinner').classList.toggle('d-none', !on);
|
||||
$('parse-icon').classList.toggle('d-none', on);
|
||||
$('parse-btn').disabled = on;
|
||||
// PDF parsing calls Groq and can take 15-30 s — show a helpful message
|
||||
if (on && selectedFile && selectedFile.name.toLowerCase().endsWith('.pdf')) {
|
||||
$('parse-btn').textContent = '';
|
||||
$('parse-btn').appendChild($('parse-spinner'));
|
||||
$('parse-btn').append(' Analysing PDF with AI… (may take ~20s)');
|
||||
} else if (!on) {
|
||||
$('parse-btn').innerHTML =
|
||||
const btn = $('parse-btn');
|
||||
btn.disabled = on;
|
||||
if (on) {
|
||||
const isPdf = selectedFile && selectedFile.name.toLowerCase().endsWith('.pdf');
|
||||
const label = isPdf ? 'Analysing PDF with AI… (may take ~20s)' : 'Parsing…';
|
||||
btn.innerHTML =
|
||||
'<span class="spinner-border spinner-border-sm me-1"></span>' + label;
|
||||
} else {
|
||||
btn.innerHTML =
|
||||
'<span id="parse-spinner" class="spinner-border spinner-border-sm me-1 d-none"></span>' +
|
||||
'<i class="bi bi-search me-1" id="parse-icon"></i>Parse Statement';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user