mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-09 19:27:40 +08:00
tidy
This commit is contained in:
parent
32cdc7161d
commit
b440f86618
File diff suppressed because it is too large
Load Diff
@ -169,7 +169,10 @@ class ManageTemplates extends ComfyDialog {
|
|||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
$el("div", {}, [
|
$el(
|
||||||
|
"div",
|
||||||
|
{},
|
||||||
|
[
|
||||||
$el("button", {
|
$el("button", {
|
||||||
textContent: "Export",
|
textContent: "Export",
|
||||||
style: {
|
style: {
|
||||||
@ -177,13 +180,13 @@ class ManageTemplates extends ComfyDialog {
|
|||||||
fontWeight: "normal",
|
fontWeight: "normal",
|
||||||
},
|
},
|
||||||
onclick: (e) => {
|
onclick: (e) => {
|
||||||
const json = JSON.stringify({ templates: [t] }, null, 2); // convert the data to a JSON string
|
const json = JSON.stringify({templates: [t]}, null, 2); // convert the data to a JSON string
|
||||||
const blob = new Blob([json], { type: "application/json" });
|
const blob = new Blob([json], {type: "application/json"});
|
||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
const a = $el("a", {
|
const a = $el("a", {
|
||||||
href: url,
|
href: url,
|
||||||
download: (nameInput.value || t.name) + ".json",
|
download: (nameInput.value || t.name) + ".json",
|
||||||
style: { display: "none" },
|
style: {display: "none"},
|
||||||
parent: document.body,
|
parent: document.body,
|
||||||
});
|
});
|
||||||
a.click();
|
a.click();
|
||||||
@ -206,7 +209,8 @@ class ManageTemplates extends ComfyDialog {
|
|||||||
e.target.parentElement.previousElementSibling.style.display = "none";
|
e.target.parentElement.previousElementSibling.style.display = "none";
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
]),
|
]
|
||||||
|
),
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user