feat(filelib-web): 文件编辑改为模态框并集成 CodeMirror 语法高亮

This commit is contained in:
2026-07-27 20:53:16 +08:00
parent e194670d74
commit fe38d0b8a9
5 changed files with 476 additions and 45 deletions
+8 -10
View File
@@ -109,17 +109,15 @@
<NodeDetailPanel />
</main>
<!-- 右侧:文件预览/编辑栏(选中文件时出现) -->
<!-- 文件编辑器(模态框) -->
{#if $selectedFilePath && $currentNode?.kind === "PROJECT"}
<section class="flex w-[46%] min-w-[420px] shrink-0 flex-col overflow-y-auto border-l border-line-soft bg-bg p-4">
<FileEditor
projectId={$currentNode.id}
path={$selectedFilePath}
role={$currentNode.role}
onchanged={bumpFiles}
onclose={clearSelectedFile}
/>
</section>
<FileEditor
projectId={$currentNode.id}
path={$selectedFilePath}
role={$currentNode.role}
onchanged={bumpFiles}
onclose={clearSelectedFile}
/>
{/if}
</div>