From 6fc79e90ac4c5a8419675e7eecbba14870b4fead Mon Sep 17 00:00:00 2001 From: pewdiepie-archdaemon Date: Thu, 11 Jun 2026 09:47:28 +0900 Subject: [PATCH] Settings/Contacts (CardDAV): show '(unchanged)' placeholder when password is saved MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GET /api/contacts/config masks the saved password as '***' (or '' when none). Mirror that into the password input's placeholder so users can see at a glance that a password is on file — matching the email account form's '(unchanged)' pattern. --- static/js/settings.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/settings.js b/static/js/settings.js index 990e78065..0e058484d 100644 --- a/static/js/settings.js +++ b/static/js/settings.js @@ -4024,6 +4024,11 @@ async function initUnifiedIntegrations() { try { const r = await fetch('/api/contacts/config', { credentials: 'same-origin' }); const d = await r.json(); el('uf-carddav-url').value = d.url || ''; el('uf-carddav-user').value = d.username || ''; + // Server masks the password as '***' when one is saved (or '' when + // none). Surface that state via the input's placeholder so users + // can tell their password is already on file without us echoing it. + const passInput = el('uf-carddav-pass'); + if (passInput && d.password) passInput.placeholder = '(unchanged)'; } catch (_) {} el('uf-carddav-cancel').addEventListener('click', () => { formEl.style.display = 'none'; }); el('uf-carddav-save').addEventListener('click', async () => {