mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 00:47:09 +00:00
fix(control): close popups immediately after submitting -> ui feels faster and second input is not longer possible
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
}
|
||||
|
||||
async function finalize_add_edit_display(existing_display_id: string | null) {
|
||||
popup_close_function();
|
||||
const ip = text_inputs_valid.ip.value;
|
||||
const mac = text_inputs_valid.mac.value === '' ? null : text_inputs_valid.mac.value;
|
||||
const name = text_inputs_valid.name.value;
|
||||
@@ -60,7 +61,6 @@
|
||||
const status = await ping_ip(text_inputs_valid.ip.value);
|
||||
await add_display(ip, mac, name, status);
|
||||
}
|
||||
popup_close_function();
|
||||
}
|
||||
|
||||
function popup_close_function() {
|
||||
@@ -127,8 +127,8 @@
|
||||
active_bg="bg-red-500"
|
||||
className="px-4 flex text-red-400 hover:text-stone-100"
|
||||
click_function={async () => {
|
||||
await remove_display(display_id);
|
||||
popup_close_function();
|
||||
await remove_display(display_id);
|
||||
}}>Löschen</Button
|
||||
>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user