Release v2.5.4

This commit is contained in:
2026-08-03 21:20:54 +01:00
parent a5e8ecb21f
commit a45552fed3
22 changed files with 371 additions and 9 deletions
@@ -9,6 +9,29 @@
var methodSelect = form.querySelector('[data-api-source-auth-method]');
var authDetailsSection = form.querySelector('[data-api-source-auth-details-section]');
var panels = Array.prototype.slice.call(form.querySelectorAll('[data-api-source-auth-panel]'));
var bearerTokenInput = form.querySelector('[data-api-source-bearer-token-input]');
var bearerTokenToggle = form.querySelector('[data-api-source-bearer-token-toggle]');
function updateBearerTokenToggle() {
if (!bearerTokenInput || !bearerTokenToggle) {
return;
}
var isVisible = bearerTokenInput.type === 'text';
bearerTokenToggle.setAttribute('aria-pressed', String(isVisible));
bearerTokenToggle.setAttribute('aria-label', isVisible ? 'Hide bearer token' : 'Show bearer token');
bearerTokenToggle.innerHTML = '<i class="bi ' + (isVisible ? 'bi-eye-slash' : 'bi-eye') + '" aria-hidden="true"></i>';
}
function toggleBearerTokenVisibility() {
if (!bearerTokenInput) {
return;
}
bearerTokenInput.type = bearerTokenInput.type === 'password' ? 'text' : 'password';
updateBearerTokenToggle();
bearerTokenInput.focus();
}
function updatePanels() {
var method = String(methodSelect && methodSelect.value || 'none').trim();
@@ -28,5 +51,10 @@
methodSelect.addEventListener('change', updatePanels);
}
if (bearerTokenToggle && bearerTokenInput) {
bearerTokenToggle.addEventListener('click', toggleBearerTokenVisibility);
updateBearerTokenToggle();
}
updatePanels();
}());