Skip to content

Commit 1a75900

Browse files
committed
未確認ノードのバナーをコントロールパネルに移動
- バナーをワークフローエディター内からコントロールパネルに移動 - ComfyUI/WebUIボタンの上に表示されるように変更 - WebUI切り替え時にバナーをクリア
1 parent 87e0951 commit 1a75900

File tree

4 files changed

+28
-23
lines changed

4 files changed

+28
-23
lines changed

css/comfyui-workflow-editor.css

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -253,25 +253,25 @@
253253
.comfui-node-title-normal {
254254
background: var(--background-color-B);
255255
}
256-
.comfui-unverified-banner {
257-
width: 100%;
258-
background-color: rgba(255, 255, 130, 0.3);
259-
border: 1px solid rgba(255, 200, 0, 0.5);
260-
border-radius: 6px;
261-
padding: 10px 12px;
262-
margin-bottom: 12px;
263-
}
264-
.comfui-unverified-banner-title {
265-
font-weight: 600;
266-
font-size: 13px;
267-
color: #d4a000;
268-
margin-bottom: 6px;
269-
}
270-
.comfui-unverified-banner-desc {
271-
font-size: 11px;
272-
color: #888;
273-
line-height: 1.5;
274-
}
256+
.unverified-banner {
257+
width: 100%;
258+
background-color: rgba(255, 255, 130, 0.3);
259+
border: 1px solid rgba(255, 200, 0, 0.5);
260+
border-radius: 4px;
261+
padding: 6px 8px;
262+
margin-bottom: 6px;
263+
}
264+
.unverified-banner-title {
265+
font-weight: 600;
266+
font-size: 11px;
267+
color: #d4a000;
268+
margin-bottom: 4px;
269+
}
270+
.unverified-banner-desc {
271+
font-size: 10px;
272+
color: #888;
273+
line-height: 1.4;
274+
}
275275
.comfui-unverified-label {
276276
font-size: 11px;
277277
color: #d4a000;

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,6 +1769,7 @@
17691769
<div class="area-header" data-i18n="esApiControls" onclick='changeHiddenById("esApi-controls-mini", "esApiControls", "esApiControlsByClose")'>
17701770
</div>
17711771
<div id="esApi-controls-mini" class="controls-mini">
1772+
<div id="unverified-nodes-banner"></div>
17721773
<div class="input-group" data-group="externalApiGroup">
17731774
<button id="comfyUIButton" data-value="comfyUIButton" onclick="changeExternalAPI(this)" class="selected">
17741775
ComfyUI

js/ai/comfyui/v2/comfyui-workflow-editor-tab.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,13 @@ class_type
400400
.sort((a,b)=>b.inputCount-a.inputCount);
401401

402402
const hasUnverifiedNodes=nodes.some(({class_type})=>notExistsWorkflowNodeVsComfyUI(class_type));
403+
const bannerContainer=document.getElementById("unverified-nodes-banner");
404+
if(bannerContainer){
403405
if(hasUnverifiedNodes){
404-
const bannerElement=document.createElement("div");
405-
bannerElement.className="comfui-unverified-banner";
406-
bannerElement.innerHTML=`<div class="comfui-unverified-banner-title">⚠ ${getText('missingNode')||'ノード情報が確認できないノードがあります'}</div><div class="comfui-unverified-banner-desc">${getText('missingDescription')||''}</div>`;
407-
container.appendChild(bannerElement);
406+
bannerContainer.innerHTML=`<div class="unverified-banner"><div class="unverified-banner-title">⚠ ${getText('missingNode')||'ノード情報が確認できないノードがあります'}</div><div class="unverified-banner-desc">${getText('missingDescription')||''}</div></div>`;
407+
}else{
408+
bannerContainer.innerHTML="";
409+
}
408410
}
409411

410412
nodes.forEach(({id,node,apiNode,class_type})=>{

js/ai/ui/ai-ui-util.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ changeSelected(button);
44
const selectedValue=getSelectedValueByGroup("externalApiGroup");
55

66
var help=getText("help_api_connect_settings");
7+
var bannerEl=$('unverified-nodes-banner');
78
if (selectedValue==="sdWebUIButton") {
89
apiMode=apis.A1111;
910
createToast("API CHANGE!","WebUI(A1111/Forge)",2000);
1011
$('apiSettingsUrlHelpe').innerHTML=`<a href="html/API_Help/sd-api-guide.html" target="_blank">${help}</a>`;
12+
if(bannerEl)bannerEl.innerHTML="";
1113
} else if (selectedValue==="comfyUIButton") {
1214
apiMode=apis.COMFYUI;
1315
createToast("API CHANGE!","COMFYUI",2000);

0 commit comments

Comments
 (0)