feat(ui): clear panel form inputs when closed

This commit replaces the SSH key-specific code in favor of resetting
panel forms when closed, which thus carries the same behavior over to
the GPG key field.
This commit is contained in:
Jordan Atwood 2025-08-29 14:29:18 -07:00
commit 4dcec32505
No known key found for this signature in database
GPG key ID: 615A619C2D73A6DF
5 changed files with 29 additions and 12 deletions

View file

@ -51,6 +51,14 @@ export function isElemHidden(el) {
return res[0];
}
export function resetForms(el) {
queryElemChildren(el, 'form', resetForm);
}
function resetForm(form) {
form.reset();
}
function applyElemsCallback(elems, fn) {
if (fn) {
for (const el of elems) {