feat: 展示项目最近发布状态

- store: 将真实 deploy-runs 回填到项目环境最近发布摘要
- ProjectsView: 展示最近 run 状态、ref、操作者和跳转入口
- RunsView: 支持通过 runId query 定位运行记录
This commit is contained in:
湛兮
2026-06-12 04:26:39 +08:00
parent 806b210739
commit 4e15547662
3 changed files with 115 additions and 4 deletions
+44 -3
View File
@@ -48,8 +48,8 @@ function lastBuildText(env: EnvironmentStatus): string {
</div>
<section class="panel">
<div class="panel-header">
<h2>项目清单</h2>
<div class="panel-header">
<h2>项目清单</h2>
<ElButton
size="small"
plain
@@ -94,7 +94,23 @@ function lastBuildText(env: EnvironmentStatus): string {
<dt>通知通道</dt>
<dd>{{ env.wecomRobot }}</dd>
<dt>最近发布</dt>
<dd>{{ env.lastRunId }} · {{ env.version }}</dd>
<dd>
<div v-if="env.lastRunId !== '-'" class="latest-release">
<div class="latest-release-head">
<StatusPill :state="env.status" />
<RouterLink
class="run-link mono"
:to="{ name: 'runs', query: { runId: env.lastRunId } }"
>
{{ env.lastRunId }}
</RouterLink>
</div>
<small>
{{ env.version }} · {{ env.lastActor }} · {{ env.lastReleasedAt }}
</small>
</div>
<span v-else>暂无真实发布记录</span>
</dd>
</dl>
</div>
</div>
@@ -178,6 +194,31 @@ dd {
font-size: 12px;
}
.latest-release {
display: grid;
gap: 6px;
}
.latest-release-head {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
}
.latest-release small {
color: #7b8798;
}
.run-link {
color: #2563eb;
text-decoration: none;
}
.run-link:hover {
text-decoration: underline;
}
@media (max-width: 760px) {
.env-config {
grid-template-columns: 1fr;