From b7b49a766cf850f0fde24182512ecffee5261315 Mon Sep 17 00:00:00 2001 From: ymq Date: Thu, 17 Sep 2026 13:45:54 +0800 Subject: [PATCH] chore: commit pending local changes (2026-09-17 github sync) --- wwwroot/api/cockpit_timeline.dspy | 4 +-- wwwroot/api/my_todos_popup.dspy | 2 +- wwwroot/api/task_io.dspy | 12 ++++----- wwwroot/api/todo_detail.dspy | 4 +-- wwwroot/api/workspace_files.dspy | 6 ++--- wwwroot/api/workspace_open.dspy | 2 +- wwwroot/api/workspace_popup.dspy | 2 +- wwwroot/api/workspace_view.dspy | 2 +- wwwroot/index.ui | 2 +- wwwroot/index_cockpit.ui | 8 +++--- wwwroot/sd_bug_list/index.ui | 2 +- wwwroot/sd_dashboard/index.ui | 20 +++++++-------- wwwroot/sd_deploy_env_list/index.ui | 2 +- wwwroot/sd_org_remote/index.ui | 4 +-- wwwroot/sd_review/index.ui | 40 ++++++++++++++--------------- wwwroot/wechat_config/index.ui | 12 ++++----- 16 files changed, 62 insertions(+), 62 deletions(-) diff --git a/wwwroot/api/cockpit_timeline.dspy b/wwwroot/api/cockpit_timeline.dspy index d271247..d9fe164 100644 --- a/wwwroot/api/cockpit_timeline.dspy +++ b/wwwroot/api/cockpit_timeline.dspy @@ -19,7 +19,7 @@ if not task_id: "options": {"padding": "20px", "alignItems": "center"}, "subwidgets": [ {"widgettype": "Text", "options": { - "text": "暂无产线任务。\n请先创建迭代以启动开发产线。", + "otext": "暂无产线任务。\n请先创建迭代以启动开发产线。", "text": "暂无产线任务。\n请先创建迭代以启动开发产线。", "i18n": True, "cfontsize": 0.9, "color": "#94a3b8", "textAlign": "center" }} ] @@ -147,7 +147,7 @@ if not step_widgets: step_widgets.append({ "widgettype": "Text", "options": { - "text": "产线步骤尚未生成。\n任务初始化中...", + "otext": "产线步骤尚未生成。\n任务初始化中...", "text": "产线步骤尚未生成。\n任务初始化中...", "i18n": True, "cfontsize": 0.9, "color": "#94a3b8", "padding": "20px" } }) diff --git a/wwwroot/api/my_todos_popup.dspy b/wwwroot/api/my_todos_popup.dspy index b79f4ca..ec2fc61 100644 --- a/wwwroot/api/my_todos_popup.dspy +++ b/wwwroot/api/my_todos_popup.dspy @@ -158,7 +158,7 @@ for t in (todos or []): if not cards: cards = [{"widgettype": "Text", - "options": {"text": "暂无待办", "cfontsize": 0.9, "color": "#94a3b8", "padding": "16px"}}] + "options": {"otext": "暂无待办", "text": "暂无待办", "i18n": True, "cfontsize": 0.9, "color": "#94a3b8", "padding": "16px"}}] # embed=1(手机端「待办」Tab 整页渲染):返回纯 VBox,不套 PopupWindow 弹窗壳 _embed = ((params_kw or {}).get('embed') or '').strip() diff --git a/wwwroot/api/task_io.dspy b/wwwroot/api/task_io.dspy index 86064a2..7375f51 100644 --- a/wwwroot/api/task_io.dspy +++ b/wwwroot/api/task_io.dspy @@ -28,7 +28,7 @@ _state_colors = { if not task_id: return json.dumps({ "widgettype": "Text", - "options": {"text": "请选择左侧任务查看输入输出", "cfontsize": 0.9, "color": "#94a3b8", "padding": "16px"}, + "options": {"otext": "请选择左侧任务查看输入输出", "text": "请选择左侧任务查看输入输出", "i18n": True, "cfontsize": 0.9, "color": "#94a3b8", "padding": "16px"}, }, ensure_ascii=False) async with DBPools().sqlorContext(dbname) as sor: @@ -38,7 +38,7 @@ async with DBPools().sqlorContext(dbname) as sor: if not recs: return json.dumps({ "widgettype": "Text", - "options": {"text": "任务不存在", "cfontsize": 0.9, "color": "#94a3b8", "padding": "16px"}, + "options": {"otext": "任务不存在", "text": "任务不存在", "i18n": True, "cfontsize": 0.9, "color": "#94a3b8", "padding": "16px"}, }, ensure_ascii=False) task = recs[0] @@ -80,7 +80,7 @@ async with DBPools().sqlorContext(dbname) as sor: "options": {"gap": "12px", "width": "100%"}, "subwidgets": [ {"widgettype": "Text", "options": {"text": state, "cfontsize": 0.75, "color": "#ffffff", "halign": "left", "padding": "1px 10px", "style": {"background": sc, "borderRadius": "12px", "fontWeight": "bold"}}}, - {"widgettype": "Text", "options": {"text": "角色: " + role, "cfontsize": 0.8, "color": "#64748b", "halign": "left"}}, + {"widgettype": "Text", "options": {"otext": "角色: ${p0}", "text": "角色: ${p0}", "i18n": True, "i18n_params": {"p0": str(role)}, "cfontsize": 0.8, "color": "#64748b", "halign": "left"}}, {"widgettype": "Text", "options": {"text": "更新: " + updated_at, "cfontsize": 0.75, "color": "#94a3b8", "halign": "left"}}, {"widgettype": "Filler"}, ], @@ -95,7 +95,7 @@ async with DBPools().sqlorContext(dbname) as sor: # 输入 subwidgets.append({ "widgettype": "Text", - "options": {"text": "—— 输入 ——", "halign": "left", "cfontsize": 0.85, "style": {"fontWeight": "bold", "color": "#3b82f6", "marginTop": "8px"}}, + "options": {"otext": "—— 输入 ——", "text": "—— 输入 ——", "i18n": True, "halign": "left", "cfontsize": 0.85, "style": {"fontWeight": "bold", "color": "#3b82f6", "marginTop": "8px"}}, }) subwidgets.append({ "widgettype": "Text", @@ -105,12 +105,12 @@ async with DBPools().sqlorContext(dbname) as sor: # 输出 subwidgets.append({ "widgettype": "Text", - "options": {"text": "—— 输出(交付件)——", "halign": "left", "cfontsize": 0.85, "style": {"fontWeight": "bold", "color": "#16a34a", "marginTop": "8px"}}, + "options": {"otext": "—— 输出(交付件)——", "text": "—— 输出(交付件)——", "i18n": True, "halign": "left", "cfontsize": 0.85, "style": {"fontWeight": "bold", "color": "#16a34a", "marginTop": "8px"}}, }) if not dels: subwidgets.append({ "widgettype": "Text", - "options": {"text": "(暂无交付件)", "halign": "left", "cfontsize": 0.8, "color": "#94a3b8"}, + "options": {"otext": "(暂无交付件)", "text": "(暂无交付件)", "i18n": True, "halign": "left", "cfontsize": 0.8, "color": "#94a3b8"}, }) else: from pipeline_service.task_io_render import deliverable_card diff --git a/wwwroot/api/todo_detail.dspy b/wwwroot/api/todo_detail.dspy index ec218d9..5665692 100644 --- a/wwwroot/api/todo_detail.dspy +++ b/wwwroot/api/todo_detail.dspy @@ -442,7 +442,7 @@ async with DBPools().sqlorContext(dbname) as sor: "widgettype": "HBox", "options": {"width": "100%", "gap": "8px", "padding": "4px 14px", "alignItems": "center"}, "subwidgets": [ - {"widgettype": "Text", "options": {"text": "📑 报告已存为 PPT:", + {"widgettype": "Text", "options": {"otext": "📑 报告已存为 PPT:", "text": "📑 报告已存为 PPT:", "i18n": True, "cfontsize": 0.8, "color": "#64748b", "halign": "left"}}, {"widgettype": "Button", "options": {"label": "下载 PPT", "css": "small"}, "binds": [{"wid": "self", "event": "click", "actiontype": "script", @@ -781,7 +781,7 @@ if _file_rows: "widgettype": "VBox", "options": {"width": "100%", "gap": "6px", "padding": "8px 14px 2px 14px"}, "subwidgets": [ - {"widgettype": "Text", "options": {"text": "📎 输出文件", "cfontsize": 0.85, + {"widgettype": "Text", "options": {"otext": "📎 输出文件", "text": "📎 输出文件", "i18n": True, "cfontsize": 0.85, "fontWeight": "bold", "color": "#334155"}} ] + _file_rows }] diff --git a/wwwroot/api/workspace_files.dspy b/wwwroot/api/workspace_files.dspy index 29bb847..b5f145b 100644 --- a/wwwroot/api/workspace_files.dspy +++ b/wwwroot/api/workspace_files.dspy @@ -40,7 +40,7 @@ async with DBPools().sqlorContext(dbname) as sor: full_dir = resolve_workspace_path(project_dir, space_dir, folder_id) if not os.path.isdir(full_dir): - return {"widgettype": "Text", "options": {"text": "目录不可用: " + folder_id, "cfontsize": 0.9}} + return {"widgettype": "Text", "options": {"otext": "目录不可用: ${p0}", "text": "目录不可用: ${p0}", "i18n": True, "i18n_params": {"p0": str(folder_id)}, "cfontsize": 0.9}} upload_url = entire_url("/pipeline-sdlc/api/workspace_upload.dspy") + (("?session_id=" + session_id) if session_id else "") @@ -68,7 +68,7 @@ droppable = { "widgettype": "Droppable", "options": {"accepts": ["*"], "padding": "10px"}, "subwidgets": [ - {"widgettype": "Text", "options": {"text": "📥 拖拽文件到此处上传", "cfontsize": 0.85, "color": "#64748b", "halign": "middle"}} + {"widgettype": "Text", "options": {"otext": "📥 拖拽文件到此处上传", "text": "📥 拖拽文件到此处上传", "i18n": True, "cfontsize": 0.85, "color": "#64748b", "halign": "middle"}} ], "binds": [{"wid": "self", "event": "filedrop", "actiontype": "script", "target": "self", "script": upload_script}] } @@ -116,7 +116,7 @@ for name in entries: files.append(row) if not files: - file_list_content = [{"widgettype": "Text", "options": {"text": "(空目录)", "cfontsize": 0.85, "color": "#94a3b8", "padding": "8px"}}] + file_list_content = [{"widgettype": "Text", "options": {"otext": "(空目录)", "text": "(空目录)", "i18n": True, "cfontsize": 0.85, "color": "#94a3b8", "padding": "8px"}}] else: file_list_content = files diff --git a/wwwroot/api/workspace_open.dspy b/wwwroot/api/workspace_open.dspy index 3ace8b7..7dedb78 100644 --- a/wwwroot/api/workspace_open.dspy +++ b/wwwroot/api/workspace_open.dspy @@ -127,7 +127,7 @@ return { "widgettype": "PopupWindow", "options": {"title": name, "cwidth": 34, "cheight": 12, "auto_open": True, "resizable": True}, "subwidgets": [ - {"widgettype": "Text", "options": {"text": "该文件类型需下载后用本地应用打开", "cfontsize": 1, "padding": "16px", "halign": "middle"}}, + {"widgettype": "Text", "options": {"otext": "该文件类型需下载后用本地应用打开", "text": "该文件类型需下载后用本地应用打开", "i18n": True, "cfontsize": 1, "padding": "16px", "halign": "middle"}}, {"widgettype": "Button", "options": {"label": "下载文件", "css": "primary"}, "binds": [{"wid": "self", "event": "click", "actiontype": "script", "target": "self", "script": download_script}]} ] diff --git a/wwwroot/api/workspace_popup.dspy b/wwwroot/api/workspace_popup.dspy index 232c9e1..4b5520a 100644 --- a/wwwroot/api/workspace_popup.dspy +++ b/wwwroot/api/workspace_popup.dspy @@ -61,7 +61,7 @@ async with DBPools().sqlorContext(dbname) as sor: "options": {"width": "100%", "gap": "12px", "padding": "18px 22px"}, "subwidgets": [ {"widgettype": "Text", - "options": {"text": "当前会话还没有项目,请先选择或新建项目", + "options": {"otext": "当前会话还没有项目,请先选择或新建项目", "text": "当前会话还没有项目,请先选择或新建项目", "i18n": True, "cfontsize": 1, "color": "#64748b"}}, {"widgettype": "HBox", "options": {"width": "100%", "gap": "10px"}, diff --git a/wwwroot/api/workspace_view.dspy b/wwwroot/api/workspace_view.dspy index 1700957..73d64cd 100644 --- a/wwwroot/api/workspace_view.dspy +++ b/wwwroot/api/workspace_view.dspy @@ -102,7 +102,7 @@ return { "widgettype": "PopupWindow", "options": {"title": name, "cwidth": 34, "cheight": 12, "auto_open": True, "resizable": True}, "subwidgets": [ - {"widgettype": "Text", "options": {"text": "该文件类型需下载后查看", "cfontsize": 1, "padding": "16px", "halign": "middle"}}, + {"widgettype": "Text", "options": {"otext": "该文件类型需下载后查看", "text": "该文件类型需下载后查看", "i18n": True, "cfontsize": 1, "padding": "16px", "halign": "middle"}}, {"widgettype": "Button", "options": {"label": "下载文件", "css": "primary"}, "binds": [{"wid": "self", "event": "click", "actiontype": "script", "target": "self", "script": download_script}]} ] diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 6a15cad..f3ac122 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -1 +1 @@ -{"widgettype": "VBox", "options": {"width": "100%", "height": "100%", "padding": "0"}, "subwidgets": [{"widgettype": "HBox", "options": {"width": "100%", "alignItems": "center", "padding": "16px 24px 8px 24px", "cheight": 6, "gap": "12px"}, "subwidgets": [{"widgettype": "Title2", "options": {"text": "开发产线驾驶舱"}}, {"widgettype": "Text", "options": {"text": "AI驱动的对话式开发", "cfontsize": 0.9, "color": "#94a3b8"}}, {"widgettype": "Filler"}]}, {"widgettype": "HBox", "id": "context_bar", "options": {"width": "100%", "padding": "4px 24px 4px 24px", "cheight": 2.5, "gap": "12px", "alignItems": "center", "bgcolor": "#e8f0fe"}, "subwidgets": [{"widgettype": "Html", "options": {"html": "\u003cscript>setTimeout(function(){fetch('/pipeline-sdlc/api/cockpit_context.dspy?session_id='+window._sid()).then(function(r){return r.json()}).then(function(d){if(d.project_id){var sel=bricks.getWidgetById('project_selector',bricks.app);if(sel)sel.setValue(d.project_id);}})},200);\u003c/script>", "height": "0", "width": "0"}}, {"widgettype": "Form", "id": "project_form", "options": {"name": "project_form", "cols": 1, "fields": [{"name": "project_id", "uitype": "code", "label": "", "placeholder": "选择项目", "cwidth": 20, "dataurl": "/pipeline-sdlc/api/cockpit_project_picker.dspy", "valueField": "value", "textField": "text", "nullable": true}]}, "binds": [{"wid": "self", "event": "changed", "actiontype": "script", "target": "self", "script": "var v=this.getValue();var pid=(v||{}).project_id||'';if(!pid)return;fetch('/pipeline-sdlc/api/cockpit_context_update.dspy',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:'project_id='+encodeURIComponent(pid)+'&session_id='+encodeURIComponent(window._sid())}).then(function(r){return r.json()}).then(function(r){if(r.success){var pl=bricks.getWidgetById('task_btn',bricks.app);if(pl&&pl.text_w)pl.text_w.set_text('任务');var io=bricks.getWidgetById('chat_io',bricks.app);var ms=io&&io.inputw&&io.inputw.model_selector;if(ms&&ms.loadData)ms.loadData();}})"}]}, {"widgettype": "Button", "id": "task_btn", "options": {"label": "任务", "css": "small"}, "binds": [{"wid": "self", "event": "click", "actiontype": "script", "target": "self", "script": "fetch('/pipeline-sdlc/api/cockpit_context.dspy?session_id='+window._sid()).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:32,cheight:16,auto_open:true});var form=new bricks.Form({name:'p_picker',cols:1,fields:[{name:'project_id',uitype:'code',label:'项目',placeholder:'请选择项目',cwidth:26,dataurl:'/pipeline-sdlc/api/cockpit_project_picker.dspy',valueField:'value',textField:'text'}]});var vb=new bricks.VBox({padding:'12px',gap:'12px'});vb.add_widget(new bricks.Text({text:'请选择项目:',cfontsize:0.95,color:'#64748b'}));vb.add_widget(form);pw.content_w.add_widget(vb);setTimeout(function(){var sel=pw.content_w.dom_element.querySelector('select');if(sel)sel.addEventListener('change',function(){var v=sel.value;if(!v)return;fetch('/pipeline-sdlc/api/cockpit_context_update.dspy',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:'project_id='+encodeURIComponent(v)+'&session_id='+encodeURIComponent(window._sid())}).then(function(r){return r.json()}).then(function(r){if(r.success){pw.destroy();var sel2=bricks.getWidgetById('project_selector',bricks.app);if(sel2)sel2.setValue(r.project_id);var tb=bricks.getWidgetById('task_btn',bricks.app);if(tb&&tb.text_w)tb.text_w.set_text('\\u4efb\\u52a1');}});});},500);return;}var upw=new bricks.PopupWindow({title:pn+' - \\u4efb\\u52a1\\u5217\\u8868',cwidth:60,cheight:30,auto_open:true});var vs=new bricks.VScrollPanel({css:'filler',padding:'12px',gap:'8px'});upw.content_w.add_widget(vs);fetch('/pipeline-sdlc/api/cockpit_project_tasks.dspy?session_id='+window._sid()).then(function(r){return r.json()}).then(function(data){var tasks=data.tasks||[];if(tasks.length===0){vs.add_widget(new bricks.Text({text:'\\u6682\\u65e0\\u4efb\\u52a1',cfontsize:0.9,color:'#94a3b8'}));return;}for(var i=0;isetTimeout(function(){fetch('/pipeline-sdlc/api/cockpit_context.dspy?session_id='+window._sid()).then(function(r){return r.json()}).then(function(d){if(d.project_id){var sel=bricks.getWidgetById('project_selector',bricks.app);if(sel)sel.setValue(d.project_id);}})},200);\u003c/script>", "height": "0", "width": "0"}}, {"widgettype": "Form", "id": "project_form", "options": {"name": "project_form", "cols": 1, "fields": [{"name": "project_id", "uitype": "code", "label": "", "placeholder": "选择项目", "cwidth": 20, "dataurl": "/pipeline-sdlc/api/cockpit_project_picker.dspy", "valueField": "value", "textField": "text", "nullable": true}]}, "binds": [{"wid": "self", "event": "changed", "actiontype": "script", "target": "self", "script": "var v=this.getValue();var pid=(v||{}).project_id||'';if(!pid)return;fetch('/pipeline-sdlc/api/cockpit_context_update.dspy',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:'project_id='+encodeURIComponent(pid)+'&session_id='+encodeURIComponent(window._sid())}).then(function(r){return r.json()}).then(function(r){if(r.success){var pl=bricks.getWidgetById('task_btn',bricks.app);if(pl&&pl.text_w)pl.text_w.set_text('任务');var io=bricks.getWidgetById('chat_io',bricks.app);var ms=io&&io.inputw&&io.inputw.model_selector;if(ms&&ms.loadData)ms.loadData();}})"}]}, {"widgettype": "Button", "id": "task_btn", "options": {"label": "任务", "css": "small"}, "binds": [{"wid": "self", "event": "click", "actiontype": "script", "target": "self", "script": "fetch('/pipeline-sdlc/api/cockpit_context.dspy?session_id='+window._sid()).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:32,cheight:16,auto_open:true});var form=new bricks.Form({name:'p_picker',cols:1,fields:[{name:'project_id',uitype:'code',label:'项目',placeholder:'请选择项目',cwidth:26,dataurl:'/pipeline-sdlc/api/cockpit_project_picker.dspy',valueField:'value',textField:'text'}]});var vb=new bricks.VBox({padding:'12px',gap:'12px'});vb.add_widget(new bricks.Text({text:'请选择项目:',cfontsize:0.95,color:'#64748b'}));vb.add_widget(form);pw.content_w.add_widget(vb);setTimeout(function(){var sel=pw.content_w.dom_element.querySelector('select');if(sel)sel.addEventListener('change',function(){var v=sel.value;if(!v)return;fetch('/pipeline-sdlc/api/cockpit_context_update.dspy',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:'project_id='+encodeURIComponent(v)+'&session_id='+encodeURIComponent(window._sid())}).then(function(r){return r.json()}).then(function(r){if(r.success){pw.destroy();var sel2=bricks.getWidgetById('project_selector',bricks.app);if(sel2)sel2.setValue(r.project_id);var tb=bricks.getWidgetById('task_btn',bricks.app);if(tb&&tb.text_w)tb.text_w.set_text('\\u4efb\\u52a1');}});});},500);return;}var upw=new bricks.PopupWindow({title:pn+' - \\u4efb\\u52a1\\u5217\\u8868',cwidth:60,cheight:30,auto_open:true});var vs=new bricks.VScrollPanel({css:'filler',padding:'12px',gap:'8px'});upw.content_w.add_widget(vs);fetch('/pipeline-sdlc/api/cockpit_project_tasks.dspy?session_id='+window._sid()).then(function(r){return r.json()}).then(function(data){var tasks=data.tasks||[];if(tasks.length===0){vs.add_widget(new bricks.Text({text:'\\u6682\\u65e0\\u4efb\\u52a1',cfontsize:0.9,color:'#94a3b8'}));return;}for(var i=0;i