- 后端:项目/运行 API、上下文服务与数据模型 - 前端:Studio 列表、编辑页(R1/R2 布局)、运行页与节点图 - 编辑页顶部:CSS Grid 统一标签行与控件行对齐,项目按钮独立第三行 - Docker 开发配置与文档脚本 Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
863 B
JavaScript
34 lines
863 B
JavaScript
import React from 'react';
|
|
|
|
import StudioInsertionPopup from './StudioInsertionPopup';
|
|
|
|
import './StudioContextBlockPopup.css';
|
|
|
|
function StudioContextBlockPopup({ open, block, onClose }) {
|
|
if (!block) return null;
|
|
|
|
return (
|
|
<StudioInsertionPopup
|
|
open={open}
|
|
title={block.label}
|
|
defaultExpanded
|
|
onClose={onClose}
|
|
>
|
|
{({ expanded }) =>
|
|
expanded ? (
|
|
<pre className="studio-context-block-popup__content">
|
|
{block.content}
|
|
</pre>
|
|
) : (
|
|
<div className="studio-context-block-popup__preview">
|
|
<span className="studio-insertion-popup__field-label">来源</span>
|
|
<span className="studio-insertion-popup__field-value">{block.source}</span>
|
|
</div>
|
|
)
|
|
}
|
|
</StudioInsertionPopup>
|
|
);
|
|
}
|
|
|
|
export default StudioContextBlockPopup;
|