update
This commit is contained in:
parent
023511075c
commit
f688712e27
@ -19,6 +19,7 @@ If you have ComfyUI-Manager, you can simply search "Easyai for ComfyUI" from `Cu
|
||||
If you have a comfy-cli, you can simply execute `comfy node registry-install comfyui-easyai` in command line.
|
||||
|
||||
## Usage
|
||||

|
||||
- After installation, you can use the Easyai nodes in your ComfyUI workflows.
|
||||
- For more detailed usage, please refer to the [金华岩石](https://jinhuayanshi.cn) or [三景AI](https://easyai.jinhuayanshi.cn) websites.
|
||||
- Follow me: <img src="./docs/douyin.jpg" width="200" />
|
||||
|
BIN
docs/use.gif
Normal file
BIN
docs/use.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.9 MiB |
@ -6,17 +6,8 @@ app.registerExtension({
|
||||
name: "ComfyUI-Easyai",
|
||||
async setup() {
|
||||
const menu = document.querySelector(".comfy-menu");
|
||||
const separator = document.createElement("hr");
|
||||
|
||||
separator.style.margin = "20px 0";
|
||||
separator.style.width = "100%";
|
||||
menu.append(separator);
|
||||
|
||||
const uploadEasyaiButton = document.createElement("button");
|
||||
uploadEasyaiButton.id = "uploadEasyaiButton";
|
||||
uploadEasyaiButton.textContent = "上传Easyai";
|
||||
// 点击按钮时弹出对话框
|
||||
uploadEasyaiButton.onclick = () => {
|
||||
const upload = () => {
|
||||
// 创建遮罩层
|
||||
const overlay = document.createElement('div');
|
||||
overlay.style.position = 'fixed';
|
||||
@ -209,6 +200,27 @@ app.registerExtension({
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
let cmGroup = new (await import("../../scripts/ui/components/buttonGroup.js")).ComfyButtonGroup(
|
||||
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
|
||||
icon: "upload",
|
||||
action: upload,
|
||||
tooltip: "上传Easyai"
|
||||
}).element
|
||||
);
|
||||
|
||||
app.menu?.settingsGroup.element.after(cmGroup.element);
|
||||
}
|
||||
catch(exception) {
|
||||
console.log('ComfyUI is outdated. New style menu based features are disabled.');
|
||||
}
|
||||
|
||||
const uploadEasyaiButton = document.createElement("button");
|
||||
uploadEasyaiButton.id = "uploadEasyaiButton";
|
||||
uploadEasyaiButton.textContent = "上传Easyai";
|
||||
// 点击按钮时弹出对话框
|
||||
uploadEasyaiButton.onclick = upload;
|
||||
|
||||
uploadEasyaiButton.style.background = "linear-gradient(135deg, #8A00FF 0%, #00FFC6 100%)";
|
||||
uploadEasyaiButton.style.color = "black";
|
||||
uploadEasyaiButton.style.display = "inline-block";
|
||||
|
Loading…
Reference in New Issue
Block a user