make the apply& vanish

This commit is contained in:
Laura Klünder 2023-12-02 01:48:06 +01:00
parent a11fe365d1
commit e0916dfecd
2 changed files with 4 additions and 1 deletions

View file

@ -227,6 +227,9 @@ function connect() {
row.querySelectorAll('button[name=reboot]').forEach(
x => x.style.display = ((data.msg.received_bytes >= total && data.msg.status === "STARTED") || data.msg.status === "APPLIED") ? 'inline-block' : 'none'
);
row.querySelectorAll('.apply_and').forEach(
x => x.style.display = (data.msg.status === 'APPLIED') ? 'none' : 'inline'
);
{% endif %}
{% if send_uuid and msg_type == "MESH_ROUTE_REQUEST" %}
if (data.msg.route) {

View file

@ -37,7 +37,7 @@
<br>
<progress id="file" max="{{ update.build.binary.size }}" value="0"></progress>
<br>
<button name="cancel">cancel</button> <button name="apply">apply</button> <button name="reboot">apply &amp; reboot</button>
<button name="cancel">cancel</button> <button name="apply">apply</button> <button name="reboot"><span class="apply_and">apply &amp; </span>reboot</button>
</td>
</tr>
{% endfor %}