copy phone number too
This commit is contained in:
+34
-9
@@ -645,10 +645,15 @@
|
|||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phone-link {
|
.phone-cell {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phone-link {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
color: var(--orange);
|
color: var(--orange);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: all 0.15s ease;
|
transition: all 0.15s ease;
|
||||||
@@ -662,6 +667,20 @@
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.phone-text {
|
||||||
|
color: var(--orange);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phone-text:hover {
|
||||||
|
color: #ffaa44;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phone-text:active {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
.result {
|
.result {
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
@@ -1445,14 +1464,17 @@
|
|||||||
const row = document.createElement('tr');
|
const row = document.createElement('tr');
|
||||||
row.innerHTML = `
|
row.innerHTML = `
|
||||||
<td class="phone-number">
|
<td class="phone-number">
|
||||||
<a href="tel:${escapeHtml(entry.phone)}" class="phone-link">
|
<span class="phone-cell">
|
||||||
<span class="material-icons">phone</span>
|
<a href="tel:${escapeHtml(entry.phone)}" class="phone-link">
|
||||||
${escapeHtml(entry.phone)}
|
<span class="material-icons">phone</span>
|
||||||
</a>
|
</a>
|
||||||
|
<span class="phone-text">${escapeHtml(entry.phone)}</span>
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="result">${resultHtml}</td>
|
<td class="result">${resultHtml}</td>
|
||||||
<td class="datetime">${formatDate(entry.timestamp)}</td>
|
<td class="datetime">${formatDate(entry.timestamp)}</td>
|
||||||
`;
|
`;
|
||||||
|
row.querySelector('.phone-text').addEventListener('click', () => copyToClipboard(entry.phone));
|
||||||
const resultCell = row.querySelector('.result');
|
const resultCell = row.querySelector('.result');
|
||||||
if (entry.status === 'success') {
|
if (entry.status === 'success') {
|
||||||
resultCell.classList.add('copyable');
|
resultCell.classList.add('copyable');
|
||||||
@@ -1464,14 +1486,17 @@
|
|||||||
const mobileRow = document.createElement('tr');
|
const mobileRow = document.createElement('tr');
|
||||||
mobileRow.innerHTML = `
|
mobileRow.innerHTML = `
|
||||||
<td class="phone-number">
|
<td class="phone-number">
|
||||||
<a href="tel:${escapeHtml(entry.phone)}" class="phone-link">
|
<span class="phone-cell">
|
||||||
<span class="material-icons">phone</span>
|
<a href="tel:${escapeHtml(entry.phone)}" class="phone-link">
|
||||||
${escapeHtml(entry.phone)}
|
<span class="material-icons">phone</span>
|
||||||
</a>
|
</a>
|
||||||
|
<span class="phone-text">${escapeHtml(entry.phone)}</span>
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="result">${resultHtml}</td>
|
<td class="result">${resultHtml}</td>
|
||||||
<td class="datetime">${formatDate(entry.timestamp)}</td>
|
<td class="datetime">${formatDate(entry.timestamp)}</td>
|
||||||
`;
|
`;
|
||||||
|
mobileRow.querySelector('.phone-text').addEventListener('click', () => copyToClipboard(entry.phone));
|
||||||
const mobileResultCell = mobileRow.querySelector('.result');
|
const mobileResultCell = mobileRow.querySelector('.result');
|
||||||
if (entry.status === 'success') {
|
if (entry.status === 'success') {
|
||||||
mobileResultCell.classList.add('copyable');
|
mobileResultCell.classList.add('copyable');
|
||||||
|
|||||||
Reference in New Issue
Block a user