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

@@ -24,7 +24,7 @@ class AircraftView extends BaseView_1.BaseView {
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>飞行器配置</title>
<title>飞行器管理</title>
${this.getStyles()}
${this.getRepoSelectScript()}
<style>
@@ -153,16 +153,20 @@ class AircraftView extends BaseView_1.BaseView {
</head>
<body>
<div class="header">
<h2>🚀飞行器配置</h2>
<h2>🚀 飞行器管理 -
<span style="color: var(--vscode-textLink-foreground);">
${data?.project?.name || '未知项目'}
</span>
</h2>
<button class="back-btn" onclick="goBackToProjects()">← 返回项目</button>
</div>
<table class="table">
<thead>
<tr>
<th width="40%">飞行器</th>
<th width="40%">配置</th>
<th width="20%">操作</th>
<th width="43%" style="padding-left: 40px;">飞行器</th>
<th width="43%">配置</th>
<th width="14%" style="padding-left: 45px;">操作</th>
</tr>
</thead>
<tbody>
@@ -176,13 +180,13 @@ class AircraftView extends BaseView_1.BaseView {
</table>
<div class="config-section">
<h3 class="section-title">🛫 飞行器云仓库</h3>
<h3 class="section-title">📚 飞行器云仓库</h3>
<div class="url-input-section">
<h4>🔗 获取飞行器仓库</h4>
<div style="display: flex; gap: 10px; margin-top: 10px; align-items: center;">
<button class="btn-new" onclick="openRepoSelectForAircraft()">获取仓库</button>
<span style="font-size: 12px; color: var(--vscode-descriptionForeground);">
从仓库配置中选择 Git 仓库,选择分支后可将飞行器代码克隆到当前项目下(以分支名作为飞行器名称)
从仓库配置中选择 Git 仓库,随后可以选择分支并克隆到本地
</span>
</div>
<div id="branchSelectionContainer"></div>
@@ -238,18 +242,12 @@ class AircraftView extends BaseView_1.BaseView {
);
}
// 新增上传功能
// 上传功能
function uploadAircraft(aircraftId, aircraftName) {
showConfirmDialog(
'上传飞行器仓库',
'确定将此飞行器目录(包括所有子文件夹和文件)上传到一个新的 Git 仓库分支吗?',
function() {
vscode.postMessage({
type: 'openRepoSelectForAircraftUpload',
aircraftId: aircraftId
});
}
);
vscode.postMessage({
type: 'openRepoSelectForAircraftUpload',
aircraftId: aircraftId
});
}
// 飞行器名称编辑功能