0
0

增加了项目回读的功能

This commit is contained in:
xubing
2025-11-18 21:14:10 +08:00
parent 7d249f4882
commit 6d3d020f8a
9 changed files with 848 additions and 173 deletions

View File

@@ -62,10 +62,41 @@ class ProjectView extends BaseView_1.BaseView {
.project-name:hover {
background: var(--vscode-input-background);
}
.table-actions {
display: flex;
justify-content: center;
gap: 10px;
margin-top: 20px;
}
.btn-action {
background: var(--vscode-button-background);
color: var(--vscode-button-foreground);
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
display: flex;
align-items: center;
gap: 6px;
}
.btn-action:hover {
background: var(--vscode-button-hoverBackground);
}
.btn-new {
background: var(--vscode-button-background);
color: var(--vscode-button-foreground);
}
.btn-open {
background: var(--vscode-input-background);
color: var(--vscode-input-foreground);
border: 1px solid var(--vscode-input-border);
}
</style>
</head>
<body>
<h2><span class="satellite-icon">🛰️</span>数字卫星构建平台</h2>
<table class="table">
<thead>
<tr>
@@ -77,8 +108,15 @@ class ProjectView extends BaseView_1.BaseView {
<tbody>
${projectsHtml}
<tr>
<td colspan="3" style="text-align: center; padding: 20px;">
<button class="btn-new" onclick="createNewProject()">+ 新建项目</button>
<td colspan="3" style="padding: 20px;">
<div class="table-actions">
<button class="btn-action btn-open" onclick="openExistingProject()">
<span style="font-size: 14px;">📂</span> 打开项目
</button>
<button class="btn-action btn-new" onclick="createNewProject()">
<span style="font-size: 14px;">+</span> 新建项目
</button>
</div>
</td>
</tr>
</tbody>
@@ -104,6 +142,12 @@ class ProjectView extends BaseView_1.BaseView {
}
}
function openExistingProject() {
vscode.postMessage({
type: 'openExistingProject'
});
}
function createNewProject() {
showPromptDialog(
'新建项目',