0
0

1、将每个代码仓库进行了隔离。2、优化了每个页面的ui对齐。3、增加了飞行器页面的所属项目显示。4、切换页面时对项目进行扫描,实时更新项目的结构,避免复制导致ui不显示的bug

This commit is contained in:
xubing
2026-03-04 10:19:04 +08:00
parent 942dab0f96
commit 79f7a3a860
38 changed files with 255 additions and 400 deletions

View File

@@ -261,25 +261,23 @@ class ConfigView extends BaseView_1.BaseView {
</head>
<body>
<div class="header">
<h2>⚙️ 模块管理 - <span style="color: var(--vscode-textLink-foreground);">${container?.name || '未知容器'}</span></h2>
<h2>📁 模块管理 - <span style="color: var(--vscode-textLink-foreground);">${container?.name || '未知容器'}</span></h2>
<button class="back-btn" onclick="goBackToContainers()">← 返回容器管理</button>
</div>
<div class="config-section">
<h3 class="section-title">📋 配置文件管理</h3>
<div class="config-section">
<div class="action-buttons">
<button class="btn-new" onclick="createNewConfig()">+ 新建配置</button>
<button class="btn-merge" id="mergeButton" onclick="mergeSelectedConfigs()" disabled>合并选中配置</button>
<button class="btn-new" onclick="createNewConfig()">+ 新建文件</button>
<button class="btn-merge" id="mergeButton" onclick="mergeSelectedConfigs()" disabled>合并选中文件</button>
</div>
<table class="table">
<thead>
<tr>
<th width="25%">模</th>
<th width="15%">类别</th>
<th width="35%" style="padding-left: 50px;">模</th>
<th width="16%">类别</th>
<th width="35%">文件/文件夹</th>
<th width="25%">操作</th>
<th width="14%" style="padding-left: 45px;">操作</th>
</tr>
</thead>
<tbody>
@@ -313,7 +311,7 @@ class ConfigView extends BaseView_1.BaseView {
let branchTreeData = [];
let selectedConfigs = new Set();
// [新增] 配置文件重命名弹窗
// 配置文件重命名弹窗
function showConfigRenameDialog(configId, currentName, currentFileName) {
const overlay = document.createElement('div');
overlay.className = 'modal-overlay';
@@ -413,13 +411,12 @@ class ConfigView extends BaseView_1.BaseView {
}
}
// [修改] editConfigName使用新的双输入弹窗
function editConfigName(configId, currentName, currentFileName) {
// currentFileName 现在已从模板传入
showConfigRenameDialog(configId, currentName, currentFileName);
}
// [新增] 模块文件夹重命名双输入弹窗
// 模块文件夹重命名双输入弹窗
function showModuleFolderRenameDialog(folderId, currentName, currentFolderName) {
const overlay = document.createElement('div');
overlay.className = 'modal-overlay';
@@ -430,16 +427,15 @@ class ConfigView extends BaseView_1.BaseView {
<div class="modal-title">重命名模块文件夹</div>
<div class="merge-dialog-content">
<div class="merge-input-section">
<label class="merge-input-label">显示名称</label>
<label class="merge-input-label">模型名称</label>
<input type="text" id="moduleDisplayNameInput" class="merge-input-field"
placeholder="在配置栏显示的名称" value="\${currentName}">
<div class="merge-input-help">在左侧配置栏显示的名称</div>
</div>
<div class="merge-input-section">
<label class="merge-input-label">磁盘文件夹名称 (将同步修改磁盘目录)</label>
<label class="merge-input-label">文件/文件夹名称</label>
<input type="text" id="moduleFolderNameInput" class="merge-input-field"
placeholder="磁盘上的实际文件夹名" value="\${currentFolderName}">
<div class="merge-input-help">请使用英文、数字、中文、-、_不要使用空格和/</div>
<div class="merge-input-help">禁止使用空格和"/"</div>
</div>
<div id="moduleFolderNameValidationMessage" style="color: var(--vscode-inputValidation-errorForeground); font-size: 12px; margin-top: 5px;"></div>
</div>
@@ -519,10 +515,9 @@ class ConfigView extends BaseView_1.BaseView {
}
}
// [修改] renameModuleFolder获取磁盘文件夹名并使用双输入弹窗
// 获取磁盘文件夹名并使用双输入弹窗
function renameModuleFolder(folderId, currentName) {
// 通过 data-folder-id 找到模块文件夹的行
// 修复:避免在 JS 字符串中使用内嵌模板字符串,改用拼接以解决编译问题
const editableSpan = document.querySelector('.module-folder-name[data-folder-id="' + folderId + '"]');
if (!editableSpan) return;
@@ -534,9 +529,6 @@ class ConfigView extends BaseView_1.BaseView {
showModuleFolderRenameDialog(folderId, currentName, currentFolderName);
}
// 模块管理功能
// 原始的 editConfigName 已被修改为接受三个参数
// 在 VSCode 中打开配置文件
function openConfigFileInVSCode(configId) {
vscode.postMessage({