mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 04:01:32 -06:00
WebHost: fix host room not updating (ports in) slot table (#4308)
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user