Content deleted Content added
Polygnotus (talk | contribs) No edit summary |
Polygnotus (talk | contribs) No edit summary |
||
Line 358:
if (this.getCurrentApiKey()) {
// Enable verify button if we have API key and either claim+source OR just show it enabled
this.buttons.verify.setDisabled(!this.activeClaim || !this.activeSource);▼
const hasClaimAndSource = this.activeClaim && this.activeSource;
this.buttons.verify.setDisabled(!hasClaimAndSource);
container.appendChild(this.buttons.verify.$element[0]);
container.appendChild(this.buttons.changeKey.$element[0]);
container.appendChild(this.buttons.removeKey.$element[0]);
// Debug logging
console.log('Button visibility update:', {
hasApiKey: !!this.getCurrentApiKey(),
activeClaim: !!this.activeClaim,
activeSource: !!this.activeSource,
buttonDisabled: !hasClaimAndSource
});
} else {
this.buttons.verify.setDisabled(true);
Line 447 ⟶ 457:
sourceElement.textContent = sourceContent.substring(0, 1000) + (sourceContent.length > 1000 ? '...' : '');
// Enable verify button now that we have both claim and source
this.updateButtonVisibility();
this.updateStatus('Ready to verify claim against source');
console.log('Reference click completed:', {
claim: this.activeClaim ? 'Set' : 'Missing',
source: this.activeSource ? 'Set' : 'Missing',
apiKey: this.getCurrentApiKey() ? 'Set' : 'Missing'
});
} catch (error) {
Line 744 ⟶ 760:
this.updateButtonVisibility();
this.updateStatus('API key set successfully!');
// If we already have claim and source, enable verify button
console.log('API key set - enabling verification');
this.updateButtonVisibility();
}
}
}
|