File tree Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change 55</template >
66
77<script setup lang="ts">
8- import type { LGraphNode } from ' @comfyorg/litegraph'
9- import { BadgePosition } from ' @comfyorg/litegraph'
10- import { LGraphBadge } from ' @comfyorg/litegraph'
8+ import {
9+ BadgePosition ,
10+ LGraphBadge ,
11+ type LGraphNode
12+ } from ' @comfyorg/litegraph'
1113import _ from ' lodash'
1214import { computed , onMounted , watch } from ' vue'
1315
@@ -83,6 +85,29 @@ onMounted(() => {
8385 })
8486
8587 node .badges .push (() => badge .value )
88+
89+ if (node .constructor .nodeData ?.api_node ) {
90+ const creditsBadge = computed (() => {
91+ return new LGraphBadge ({
92+ text: ' ' ,
93+ iconOptions: {
94+ unicode: ' \ue96b ' ,
95+ fontFamily: ' PrimeIcons' ,
96+ color: ' #FABC25' ,
97+ bgColor: ' #353535' ,
98+ fontSize: 8
99+ },
100+ fgColor:
101+ colorPaletteStore .completedActivePalette .colors .litegraph_base
102+ .BADGE_FG_COLOR ,
103+ bgColor:
104+ colorPaletteStore .completedActivePalette .colors .litegraph_base
105+ .BADGE_BG_COLOR
106+ })
107+ })
108+
109+ node .badges .push (() => creditsBadge .value )
110+ }
86111 }
87112 })
88113})
You can’t perform that action at this time.
0 commit comments