u
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user