Fix homekit pairing table

This commit is contained in:
Alexey Khit
2023-09-02 09:14:09 +03:00
parent b1c4bcc508
commit d87cc9ddb6
+2 -2
View File
@@ -130,11 +130,11 @@
await getSources('homekit-table', 'api/homekit');
const rows = document.querySelectorAll('#homekit-table tr');
rows.forEach((row) => {
rows.forEach((row, i) => {
let commands = '';
if (row.children[2].innerText.indexOf('status=1') > 0) {
commands += '<a href="#">pair</a>';
} else if (row.children[3].innerText) {
} else if (i > 0 && row.children[3].innerText) {
commands += '<a href="#">unpair</a>';
}
row.innerHTML += `<td>${commands}</td>`;