From 03ee716c10ca773dc729cf450605336755bac332 Mon Sep 17 00:00:00 2001 From: p
Date: Wed, 12 Aug 2026 14:19:27 +0800 Subject: [PATCH] fix: workspace - single container into content_w, subwidgets inside --- wwwroot/index.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 42737e4..1a90f02 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -115,7 +115,7 @@ "event": "click", "actiontype": "script", "target": "self", - "script": "fetch('/pipeline-sdlc/api/cockpit_context.dspy').then(function(r){return r.json()}).then(function(d){var pid=d.project_id||'';var pn=d.project_name||'';if(!pid){var pw=new bricks.PopupWindow({title:'提示',cwidth:30,cheight:8,auto_open:true});pw.content_w.add_widget(new bricks.Text({text:'请先选择项目',cfontsize:1,color:'#64748b',padding:'20px'}));return;}var pw=new bricks.PopupWindow({title:pn+' - 工作空间',cwidth:80,cheight:36,auto_open:true});var tv={'widgettype':'Tree','id':'ws_tree','options':{'dataurl':'/pipeline-sdlc/api/workspace_tree.dspy','css':'filler','padding':'4px','cheight':'100%'},'binds':[{'wid':'self','event':'selected','actiontype':'urlwidget','target':'ws_files','options':{'url':'/pipeline-sdlc/api/workspace_files.dspy'}}]};var fv={'widgettype':'VScrollPanel','id':'ws_files','options':{'css':'filler','padding':'8px','gap':'4px'}};var hsplit={'widgettype':'Splitter','options':{'direction':'horizontal','split':'30%'},'subwidgets':[tv,fv]};var hb=new bricks.HBox({css:'filler',gap:'0'});var tv2=bricks.widgetBuild({widgettype:'Tree',id:'ws_tree',options:{dataurl:'/pipeline-sdlc/api/workspace_tree.dspy',css:'filler',padding:'4px',cheight:'100%'},binds:[{wid:'self',event:'selected',actiontype:'urlwidget',target:'ws_files',options:{url:'/pipeline-sdlc/api/workspace_files.dspy'}}]},hb);var fv2=bricks.widgetBuild({widgettype:'VScrollPanel',id:'ws_files',options:{css:'filler',padding:'8px',gap:'4px'}},hb);Promise.all([tv2,fv2]).then(function(){pw.content_w.add_widget(hb);hb.dom_element.style.width='100%';hb.dom_element.style.height='100%';});});" + "script": "fetch('/pipeline-sdlc/api/cockpit_context.dspy').then(function(r){return r.json()}).then(function(d){var pid=d.project_id||'';var pn=d.project_name||'';if(!pid){var pw=new bricks.PopupWindow({title:'提示',cwidth:30,cheight:8,auto_open:true});pw.content_w.add_widget(new bricks.Text({text:'请先选择项目',cfontsize:1,color:'#64748b',padding:'20px'}));return;}var pw=new bricks.PopupWindow({title:pn+' - 工作空间',cwidth:80,cheight:36,auto_open:true});var tv={'widgettype':'Tree','id':'ws_tree','options':{'dataurl':'/pipeline-sdlc/api/workspace_tree.dspy','css':'filler','padding':'4px','cheight':'100%'},'binds':[{'wid':'self','event':'selected','actiontype':'urlwidget','target':'ws_files','options':{'url':'/pipeline-sdlc/api/workspace_files.dspy'}}]};var fv={'widgettype':'VScrollPanel','id':'ws_files','options':{'css':'filler','padding':'8px','gap':'4px'}};var hsplit={'widgettype':'Splitter','options':{'direction':'horizontal','split':'30%'},'subwidgets':[tv,fv]};var container=new bricks.VBox({css:'filler'});var tree=bricks.widgetBuild({widgettype:'Tree',id:'ws_tree',options:{dataurl:'/pipeline-sdlc/api/workspace_tree.dspy',css:'filler',padding:'4px'},binds:[{wid:'self',event:'selected',actiontype:'urlwidget',target:'ws_files',options:{url:'/pipeline-sdlc/api/workspace_files.dspy'}}]},container);var files=bricks.widgetBuild({widgettype:'VScrollPanel',id:'ws_files',options:{css:'filler',padding:'8px',gap:'4px'}},container);Promise.all([tree,files]).then(function(){pw.content_w.add_widget(container);});});" } ] }