Files
melMass-comfy_mtb/web/mtb_sidebar.js
T
Mel Massadian cd9e614b1a feat: ✨ improve the I/O sidebar
- better options (sort, count)
- uses the new toast api instead of MTB.notify
2024-11-20 22:42:32 +01:00

26 lines
786 B
JavaScript

import { app } from '../../scripts/app.js'
// import { api } from '../../scripts/api.js'
import * as shared from './comfy_shared.js'
import { createOutliner } from './dist/mtb_inspector.js'
if (window?.__COMFYUI_FRONTEND_VERSION__) {
const version = window?.__COMFYUI_FRONTEND_VERSION__
console.log(`%c ${version}`, 'background: orange; color: white;')
const panel = app.extensionManager.registerSidebarTab({
id: 'mtb-nodes',
icon: 'pi pi-bolt',
title: 'MTB',
tooltip: 'MTB: API outliner',
type: 'custom',
// this is run everytime the tab's diplay is toggled on.
render: (el) => {
const outliner = createOutliner(el)
const inputs = shared.getAPIInputs()
console.log('INPUTS', inputs)
outliner.$$set({ inputs })
},
})
}