renderFormsTab function exported
Last updated: 2026-03-05T23:42:19.807Z
Metrics
LOC: 32
Complexity: 5
Params: 0
Signature
renderFormsTab(): : void
Source Code
export function renderFormsTab(): void {
const content = document.getElementById("content");
renderTo(
content,
<FormsTabView
savedForms={panelState.savedForms}
formsLoaded={panelState.formsLoaded}
onLoad={() => void loadForms()}
onApply={(form) => void applySavedForm(form)}
onSave={async (updated, isNew) => {
await sendToBackground({ type: "UPDATE_FORM", payload: updated });
if (isNew) {
panelState.savedForms = [...panelState.savedForms, updated];
addLog(`${t("logFormSaved")}: ${updated.name}`, "success");
} else {
const idx = panelState.savedForms.findIndex(
(f) => f.id === updated.id,
);
if (idx >= 0) panelState.savedForms[idx] = updated;
addLog(`${t("logTemplateUpdated")}: ${updated.name}`, "success");
}
renderFormsTab();
}}
onSetDefault={(form) => void setFormAsDefault(form.id)}
onDelete={(form) => {
if (window.confirm(t("msgConfirmDeleteForm"))) {
void deleteFormById(form.id);
}
}}
/>,
);
}
Members
| Name | Kind | Visibility | Status | Signature |
|---|---|---|---|---|
| async | method | - | async(updated, isNew) |
Dependencies (Outgoing)
| Target | Type |
|---|---|
| loadForms | calls |
| applySavedForm | calls |
| setFormAsDefault | calls |
| deleteFormById | calls |
Impact (Incoming)
| Source | Type |
|---|---|
| renderShell | uses |
| renderActiveTab | calls |
| loadForms | calls |
| deleteFormById | calls |
| setFormAsDefault | calls |
| async | calls |