fix(control): add error handler for shutdown

closes: #53
This commit is contained in:
E44
2026-06-14 19:09:20 +02:00
parent 5ecf2da8a9
commit 2dcf5a7758
2 changed files with 13 additions and 8 deletions
@@ -114,12 +114,13 @@
async function shutdown_action() {
popup_content.open = false;
await run_on_all_selected_displays((d) => {
shutdown(d.ip); // no await here because we want to be fast
db.displays.update(d.id, {
status: 'app_offline',
preview: { currently_updating: false, url: null }
});
await run_on_all_selected_displays(async (d) => {
if (await shutdown(d.ip)) {
db.displays.update(d.id, {
status: 'app_offline',
preview: { currently_updating: false, url: null }
});
}
}, false);
}