[Extension API] Register about panel badge (#1436)

* Custom about panel badge

* Add playwright test

* Update README

* nit

* nit

* nit

* nit
This commit is contained in:
Chenlei Hu
2024-11-05 19:06:38 -05:00
committed by GitHub
parent c56533bb23
commit c560628f1f
6 changed files with 112 additions and 31 deletions

10
src/types/comfy.d.ts vendored
View File

@@ -16,6 +16,12 @@ export type Widgets = Record<
) => { widget?: IWidget; minWidth?: number; minHeight?: number }
>
export interface AboutPageBadge {
label: string
url: string
icon: string
}
export type MenuCommandGroup = {
/**
* The path to the menu group.
@@ -65,6 +71,10 @@ export interface ComfyExtension {
* Bottom panel tabs to add to the bottom panel
*/
bottomPanelTabs?: BottomPanelExtension[]
/**
* Badges to add to the about page
*/
aboutPageBadges?: AboutPageBadge[]
/**
* Allows any initialisation, e.g. loading resources. Called after the canvas is created but before nodes are added
* @param app The ComfyUI app instance