增加了项目回读的功能
This commit is contained in:
@@ -63,10 +63,41 @@ export class ProjectView extends 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>
|
||||
@@ -78,8 +109,15 @@ export class ProjectView extends 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>
|
||||
@@ -105,6 +143,12 @@ export class ProjectView extends BaseView {
|
||||
}
|
||||
}
|
||||
|
||||
function openExistingProject() {
|
||||
vscode.postMessage({
|
||||
type: 'openExistingProject'
|
||||
});
|
||||
}
|
||||
|
||||
function createNewProject() {
|
||||
showPromptDialog(
|
||||
'新建项目',
|
||||
|
||||
Reference in New Issue
Block a user