From b709cc7b14204345aec86b15cda785187343f211 Mon Sep 17 00:00:00 2001 From: MarekWo Date: Mon, 9 Mar 2026 20:03:46 +0100 Subject: [PATCH] feat(contacts): add device/cache source icon to contact cards Green chip icon for device contacts, grey cloud icon for cache-only. Co-Authored-By: Claude Opus 4.6 --- app/static/js/contacts.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/static/js/contacts.js b/app/static/js/contacts.js index 66dd792..72ef708 100644 --- a/app/static/js/contacts.js +++ b/app/static/js/contacts.js @@ -1938,8 +1938,19 @@ function createExistingContactCard(contact, index) { typeBadge.title = 'Not on device - type unknown'; } + // Source icon (device vs cache) + const sourceIcon = document.createElement('span'); + sourceIcon.className = 'ms-1'; + sourceIcon.style.fontSize = '0.85rem'; + if (contact.on_device !== false) { + sourceIcon.innerHTML = ''; + } else { + sourceIcon.innerHTML = ''; + } + infoRow.appendChild(nameDiv); infoRow.appendChild(typeBadge); + infoRow.appendChild(sourceIcon); // Public key row (clickable to copy) const keyDiv = document.createElement('div');