diff --git a/.gitignore b/.gitignore index f1dedd9..144982e 100644 --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,4 @@ yarn-error.log* node.zip .vscode/ .claude/ +.*/ \ No newline at end of file diff --git a/ts/cryptioSettings.ts b/ts/cryptioSettings.ts index 6254748..68ee58c 100644 --- a/ts/cryptioSettings.ts +++ b/ts/cryptioSettings.ts @@ -204,14 +204,14 @@ app.registerExtension({ name: "cryptio.Settings", settings: [ { - id: "cryptio.category", + id: "cryptio.category" as any, name: "CryptIO Settings", type: "hidden", defaultValue: "", category: ["CryptIO🔒"] }, { - id: "cryptio.download_client_keys", + id: "cryptio.download_client_keys" as any, name: "Download Client Keys", type: "boolean", defaultValue: false, @@ -228,7 +228,7 @@ app.registerExtension({ } }, { - id: "cryptio.upload_client_keys", + id: "cryptio.upload_client_keys" as any, name: "Upload Client Keys", type: "boolean", category: ["CryptIO🔒", "Client Keys", "Upload"], @@ -248,7 +248,7 @@ app.registerExtension({ } }, { - id: "cryptio.download_server_keys", + id: "cryptio.download_server_keys" as any, name: "Download Server Keys", type: "boolean", defaultValue: false, @@ -265,7 +265,7 @@ app.registerExtension({ } }, { - id: "cryptio.upload_server_keys", + id: "cryptio.upload_server_keys" as any, name: "Upload Server Keys", type: "boolean", defaultValue: false, @@ -284,7 +284,7 @@ app.registerExtension({ } }, { - id: "cryptio.generate_new_keys", + id: "cryptio.generate_new_keys" as any, name: "Generate New Client Keys", type: "boolean", defaultValue: false, @@ -301,7 +301,7 @@ app.registerExtension({ } }, { - id: "cryptio.clear_all_keys", + id: "cryptio.clear_all_keys" as any, name: "Clear All Keys", type: "boolean", defaultValue: false, diff --git a/ts/cryptioUploadImage.ts b/ts/cryptioUploadImage.ts index e78de02..4609083 100644 --- a/ts/cryptioUploadImage.ts +++ b/ts/cryptioUploadImage.ts @@ -38,8 +38,11 @@ app.registerExtension({ nodeType.prototype.onNodeCreated = function (this: CryptIONode) { const r = onNodeCreated?.apply(this, arguments); - // 移除默认的upload widget - this.removeWidgetByName("upload") + // Remove default upload widget + const uploadWidgetIndex = this.widgets.findIndex(w => w.name === "upload"); + if (uploadWidgetIndex !== -1) { + this.removeWidget(this.widgets[uploadWidgetIndex]); + } // 添加上传button widget const uploadWidget = this.addWidget( "button", diff --git a/ts/cryptioUploadVideo.ts b/ts/cryptioUploadVideo.ts index c6ea99c..9c097c6 100644 --- a/ts/cryptioUploadVideo.ts +++ b/ts/cryptioUploadVideo.ts @@ -86,7 +86,10 @@ app.registerExtension({ const r = onNodeCreated?.apply(this, arguments); // Remove default upload widget - this.removeWidgetByName("upload"); + const uploadWidgetIndex = this.widgets.findIndex(w => w.name === "upload"); + if (uploadWidgetIndex !== -1) { + this.removeWidget(this.widgets[uploadWidgetIndex]); + } // Add upload button widget const uploadWidget = this.addWidget( diff --git a/ts/package.json b/ts/package.json index 56d31eb..d155dfa 100644 --- a/ts/package.json +++ b/ts/package.json @@ -14,7 +14,7 @@ "author": "", "license": "ISC", "devDependencies": { - "@comfyorg/comfyui-frontend-types": "^1.29.0", + "@comfyorg/comfyui-frontend-types": "^1.43.3", "typescript": "^5.9.3" } } \ No newline at end of file diff --git a/ts/pnpm-lock.yaml b/ts/pnpm-lock.yaml index 086c43e..359f25a 100644 --- a/ts/pnpm-lock.yaml +++ b/ts/pnpm-lock.yaml @@ -7,10 +7,11 @@ settings: importers: .: - devDependencies: + dependencies: '@comfyorg/comfyui-frontend-types': - specifier: ^1.29.0 - version: 1.29.0(vue@3.5.22(typescript@5.9.3))(zod@3.25.76) + specifier: ^1.43.3 + version: 1.43.3(vue@3.5.22(typescript@5.9.3))(zod@3.25.76) + devDependencies: typescript: specifier: ^5.9.3 version: 5.9.3 @@ -34,8 +35,8 @@ packages: resolution: {integrity: sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==} engines: {node: '>=6.9.0'} - '@comfyorg/comfyui-frontend-types@1.29.0': - resolution: {integrity: sha512-Gf56EsxLQWe6u24WdqG4WRET4FRVLMhApJj98YmuEGxCMpWuHOqn4meFcpV5t7XoonXf07YFs7dWzVPlkkufRA==} + '@comfyorg/comfyui-frontend-types@1.43.3': + resolution: {integrity: sha512-wgtWJqntN1fKbVssdiIMNGNx4qfPCvOBVG74Dgx2aLZrrqeJ3ZsXLFSqmeFJTSH+whKWx7z+MX6la5Hr4BL+pg==} peerDependencies: vue: ^3.5.13 zod: ^3.23.8 @@ -132,7 +133,7 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 - '@comfyorg/comfyui-frontend-types@1.29.0(vue@3.5.22(typescript@5.9.3))(zod@3.25.76)': + '@comfyorg/comfyui-frontend-types@1.43.3(vue@3.5.22(typescript@5.9.3))(zod@3.25.76)': dependencies: vue: 3.5.22(typescript@5.9.3) zod: 3.25.76 diff --git a/ts/types.ts b/ts/types.ts index 9fd0e7f..fb51d35 100644 --- a/ts/types.ts +++ b/ts/types.ts @@ -21,7 +21,6 @@ export interface CryptIONode { // Methods addDOMWidget: (name: string, type: string, element: HTMLElement, options?: any) => any; removeWidget: (widget: any) => void; - removeWidgetByName: (name: string) => void; addWidget: (type: string, name: string, value: any, callback?: any, options?: any) => any; // Lifecycle hooks