mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-15 07:52:35 +08:00
tidy
This commit is contained in:
parent
32cdc7161d
commit
b440f86618
File diff suppressed because it is too large
Load Diff
@ -169,44 +169,48 @@ class ManageTemplates extends ComfyDialog {
|
|||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
$el("div", {}, [
|
$el(
|
||||||
$el("button", {
|
"div",
|
||||||
textContent: "Export",
|
{},
|
||||||
style: {
|
[
|
||||||
fontSize: "12px",
|
$el("button", {
|
||||||
fontWeight: "normal",
|
textContent: "Export",
|
||||||
},
|
style: {
|
||||||
onclick: (e) => {
|
fontSize: "12px",
|
||||||
const json = JSON.stringify({ templates: [t] }, null, 2); // convert the data to a JSON string
|
fontWeight: "normal",
|
||||||
const blob = new Blob([json], { type: "application/json" });
|
},
|
||||||
const url = URL.createObjectURL(blob);
|
onclick: (e) => {
|
||||||
const a = $el("a", {
|
const json = JSON.stringify({templates: [t]}, null, 2); // convert the data to a JSON string
|
||||||
href: url,
|
const blob = new Blob([json], {type: "application/json"});
|
||||||
download: (nameInput.value || t.name) + ".json",
|
const url = URL.createObjectURL(blob);
|
||||||
style: { display: "none" },
|
const a = $el("a", {
|
||||||
parent: document.body,
|
href: url,
|
||||||
});
|
download: (nameInput.value || t.name) + ".json",
|
||||||
a.click();
|
style: {display: "none"},
|
||||||
setTimeout(function () {
|
parent: document.body,
|
||||||
a.remove();
|
});
|
||||||
window.URL.revokeObjectURL(url);
|
a.click();
|
||||||
}, 0);
|
setTimeout(function () {
|
||||||
},
|
a.remove();
|
||||||
}),
|
window.URL.revokeObjectURL(url);
|
||||||
$el("button", {
|
}, 0);
|
||||||
textContent: "Delete",
|
},
|
||||||
style: {
|
}),
|
||||||
fontSize: "12px",
|
$el("button", {
|
||||||
color: "red",
|
textContent: "Delete",
|
||||||
fontWeight: "normal",
|
style: {
|
||||||
},
|
fontSize: "12px",
|
||||||
onclick: (e) => {
|
color: "red",
|
||||||
nameInput.value = "";
|
fontWeight: "normal",
|
||||||
e.target.parentElement.style.display = "none";
|
},
|
||||||
e.target.parentElement.previousElementSibling.style.display = "none";
|
onclick: (e) => {
|
||||||
},
|
nameInput.value = "";
|
||||||
}),
|
e.target.parentElement.style.display = "none";
|
||||||
]),
|
e.target.parentElement.previousElementSibling.style.display = "none";
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
),
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user