diff --git a/public/full.js b/public/full.js
index 454f205..3d97887 100644
--- a/public/full.js
+++ b/public/full.js
@@ -885,26 +885,59 @@ function updateAddressUI() {
const listItem = document.createElement('li')
listItem.className = 'list-group-item'
- listItem.innerHTML = `${displayName} / ${name}
- ${type}`
+ // container d-flex align-items-center gap-2
- listItem.appendChild(dialList)
+ const container = document.createElement('div');
+ container.className = 'container p-0';
+ listItem.appendChild(container);
- Object.entries(address.channels).forEach(([channelName, channelValue]) => {
- const sanitizedValue = escapeHTML(channelValue)
- const li = document.createElement('li')
- li.className = 'list-group-item d-flex align-items-center gap-2'
- li.innerHTML = `${sanitizedValue}`
+ const row = document.createElement('div');
+ row.className = 'row';
+ container.appendChild(row);
+
+ const col1 = document.createElement('div');
+ col1.className = 'col-10';
+ row.appendChild(col1);
+
+ const badge = document.createElement('span');
+ badge.className = 'badge bg-primary me-2';
+ badge.textContent = type;
+ col1.appendChild(badge);
+
+ const b = document.createElement('b');
+ b.textContent = displayName;
+ col1.appendChild(b);
+
+ const col2 = document.createElement('div');
+ col2.className = 'col';
+ row.appendChild(col2);
+ Object.entries(address.channels).forEach(([channelName, channelValue]) => {
const button = document.createElement('button')
button.className = 'btn btn-sm btn-success'
- button.textContent = 'Dial'
+
+ // button.textContent = `Dial ${channelName}`
button.addEventListener('click', () => dialAddress(channelValue))
- li.appendChild(button)
- dialList.appendChild(li)
+ const icon = document.createElement('i');
+ if (channelName === "messaging") {
+ icon.className = 'bi bi-chat';
+ } else if (channelName === "video") {
+ icon.className = 'bi bi-camera-video';
+ } else if (channelName === "audio") {
+ icon.className = 'bi bi-phone';
+ }
+ button.appendChild(icon);
+
+ col2.appendChild(button);
})
+ const row2 = document.createElement('div')
+ const addressUrl = Object.values(address.channels)[0]
+ let strippedUrl = addressUrl.split('?')[0];
+ row2.textContent = strippedUrl
+ container.appendChild(row2)
+
return listItem
}
diff --git a/views/index.ejs b/views/index.ejs
index 4a1b9d2..20b5602 100644
--- a/views/index.ejs
+++ b/views/index.ejs
@@ -13,6 +13,7 @@
+
@@ -346,4 +347,4 @@