WebHost: fix host room not updating (ports in) slot table (#4308)
This commit is contained in:
parent
c9625e1b35
commit
6c69f590cf
|
@ -178,8 +178,15 @@
|
|||
})
|
||||
.then(text => new DOMParser().parseFromString(text, 'text/html'))
|
||||
.then(newDocument => {
|
||||
let el = newDocument.getElementById("host-room-info");
|
||||
document.getElementById("host-room-info").innerHTML = el.innerHTML;
|
||||
["host-room-info", "slots-table"].forEach(function(id) {
|
||||
const newEl = newDocument.getElementById(id);
|
||||
const oldEl = document.getElementById(id);
|
||||
if (oldEl && newEl) {
|
||||
oldEl.innerHTML = newEl.innerHTML;
|
||||
} else if (newEl) {
|
||||
console.warn(`Did not find element to replace for ${id}`)
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{%- endmacro %}
|
||||
{% macro list_patches_room(room) %}
|
||||
{% if room.seed.slots %}
|
||||
<table>
|
||||
<table id="slots-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
|
|
Loading…
Reference in New Issue