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 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-03-09 20:03:46 +01:00
parent 09fbc56956
commit b709cc7b14

View File

@@ -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 = '<i class="bi bi-cpu text-success" title="On device"></i>';
} else {
sourceIcon.innerHTML = '<i class="bi bi-cloud text-secondary" title="Cache only"></i>';
}
infoRow.appendChild(nameDiv);
infoRow.appendChild(typeBadge);
infoRow.appendChild(sourceIcon);
// Public key row (clickable to copy)
const keyDiv = document.createElement('div');