(node = "", widget = "", value = "")
| 178 | } |
| 179 | |
| 180 | addRow(node = "", widget = "", value = "") { |
| 181 | let nameInput; |
| 182 | this.rows.append( |
| 183 | $el( |
| 184 | "div", |
| 185 | { |
| 186 | style: { |
| 187 | display: "contents", |
| 188 | }, |
| 189 | className: "pysssss-widget-defaults-row", |
| 190 | }, |
| 191 | [ |
| 192 | $el("input", { |
| 193 | placeholder: "e.g. CheckpointLoaderSimple", |
| 194 | value: node, |
| 195 | }), |
| 196 | $el("input", { |
| 197 | placeholder: "e.g. ckpt_name", |
| 198 | value: widget, |
| 199 | $: (el) => (nameInput = el), |
| 200 | }), |
| 201 | $el("input", { |
| 202 | placeholder: "e.g. myBestModel.safetensors", |
| 203 | value, |
| 204 | }), |
| 205 | $el("button", { |
| 206 | textContent: "Delete", |
| 207 | style: { |
| 208 | fontSize: "12px", |
| 209 | color: "red", |
| 210 | fontWeight: "normal", |
| 211 | }, |
| 212 | onclick: (e) => { |
| 213 | nameInput.value = ""; |
| 214 | e.target.parentElement.style.display = "none"; |
| 215 | }, |
| 216 | }), |
| 217 | ] |
| 218 | ) |
| 219 | ); |
| 220 | } |
| 221 | |
| 222 | save() { |
| 223 | const rows = this.rows.children; |
no outgoing calls
no test coverage detected