This commit is contained in:
oliver
2026-09-03 14:42:37 -03:00
parent b299bf3627
commit 80a52ed790
3 changed files with 151 additions and 90 deletions
+17 -7
View File
@@ -592,7 +592,7 @@ function showCredentialPrompt() {
</div>
</div>
<div class="form-actions">
<button type="button" class="btn-secondary" onclick="closeCredentialPrompt()">Cancel</button>
<button type="button" class="btn-secondary" id="cancelAuthBtn">Cancel</button>
<button type="submit" class="btn-primary">Connect</button>
</div>
</form>
@@ -606,12 +606,22 @@ function showCredentialPrompt() {
`;
document.body.appendChild(prompt);
document.getElementById('credentialForm').addEventListener('submit', handleCredentials);
document.querySelector('.credential-overlay').addEventListener('click', function(e) {
if (e.target === this) {
closeCredentialPrompt();
}
});
const form = document.getElementById('credentialForm');
form.addEventListener('submit', handleCredentials);
const cancelBtn = document.getElementById('cancelAuthBtn');
if (cancelBtn) {
cancelBtn.addEventListener('click', closeCredentialPrompt);
}
const overlay = document.querySelector('#credentialPrompt .credential-overlay');
if (overlay) {
overlay.addEventListener('click', function(e) {
if (e.target === overlay) {
closeCredentialPrompt();
}
});
}
}
function closeCredentialPrompt() {