mirror of https://github.com/aredn/aredn.git
Improve UI feedback when removing packages (#1459)
This commit is contained in:
parent
f616777111
commit
c6d6024537
|
@ -355,6 +355,7 @@ const po = getPackageOptions();
|
||||||
});
|
});
|
||||||
htmx.on("#fetch-and-update", "click", e => {
|
htmx.on("#fetch-and-update", "click", e => {
|
||||||
clearStatus();
|
clearStatus();
|
||||||
|
htmx.find("#fetch-and-update").disabled = true;
|
||||||
const upload = htmx.find("#package-update input[type=file]").files[0];
|
const upload = htmx.find("#package-update input[type=file]").files[0];
|
||||||
const download = htmx.find("#download-package").value;
|
const download = htmx.find("#download-package").value;
|
||||||
const remove = htmx.find("#remove-package").value;
|
const remove = htmx.find("#remove-package").value;
|
||||||
|
@ -392,6 +393,9 @@ const po = getPackageOptions();
|
||||||
htmx.ajax("GET", `{{request.env.REQUEST_URI}}?r=${remove}`, {
|
htmx.ajax("GET", `{{request.env.REQUEST_URI}}?r=${remove}`, {
|
||||||
source: e.currentTarget,
|
source: e.currentTarget,
|
||||||
swap: "none"
|
swap: "none"
|
||||||
|
}).then(_ => {
|
||||||
|
htmx.find("#fetch-and-update").innerText = "Fetch and Install";
|
||||||
|
htmx.find("#remove-package").value = "-";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue