You've already forked agentic-coding-workflow
Web优化 2
This commit is contained in:
+22
-43
@@ -2,44 +2,25 @@
|
||||
<AppShell>
|
||||
<div class="space-y-6">
|
||||
<div class="flex items-center justify-between">
|
||||
<h2 class="text-xl font-semibold">
|
||||
欢迎,{{ auth.user?.display_name }}
|
||||
</h2>
|
||||
<NButton
|
||||
type="primary"
|
||||
@click="router.push({ name: 'project-list' })"
|
||||
>
|
||||
新建 / 管理项目
|
||||
</NButton>
|
||||
<h2 class="text-xl font-semibold">欢迎,{{ auth.user?.display_name }}</h2>
|
||||
<NButton type="primary" @click="goToProjects"> 新建 / 管理项目 </NButton>
|
||||
</div>
|
||||
|
||||
<!-- 统计卡片 -->
|
||||
<NGrid
|
||||
:cols="3"
|
||||
:x-gap="12"
|
||||
>
|
||||
<NGrid :cols="3" :x-gap="12">
|
||||
<NGi>
|
||||
<NCard>
|
||||
<NStatistic
|
||||
label="活跃项目"
|
||||
:value="activeCount"
|
||||
/>
|
||||
<NStatistic label="活跃项目" :value="activeCount" />
|
||||
</NCard>
|
||||
</NGi>
|
||||
<NGi>
|
||||
<NCard>
|
||||
<NStatistic
|
||||
label="归档项目"
|
||||
:value="archivedCount"
|
||||
/>
|
||||
<NStatistic label="归档项目" :value="archivedCount" />
|
||||
</NCard>
|
||||
</NGi>
|
||||
<NGi>
|
||||
<NCard>
|
||||
<NStatistic
|
||||
label="分配给我的待办议题"
|
||||
:value="myIssues.length"
|
||||
/>
|
||||
<NStatistic label="分配给我的待办议题" :value="myIssues.length" />
|
||||
</NCard>
|
||||
</NGi>
|
||||
</NGrid>
|
||||
@@ -47,16 +28,10 @@
|
||||
<!-- 分配给我的议题 -->
|
||||
<NCard title="分配给我的议题(未关闭)">
|
||||
<NSpin :show="loading">
|
||||
<div
|
||||
v-if="myIssues.length === 0"
|
||||
class="text-sm text-gray-400 py-2"
|
||||
>
|
||||
<div v-if="myIssues.length === 0" class="text-sm text-gray-400 py-2">
|
||||
暂无分配给你的未关闭议题。
|
||||
</div>
|
||||
<ul
|
||||
v-else
|
||||
class="divide-y"
|
||||
>
|
||||
<ul v-else class="divide-y">
|
||||
<li
|
||||
v-for="row in myIssues"
|
||||
:key="row.issue.id"
|
||||
@@ -64,7 +39,9 @@
|
||||
@click="goIssue(row)"
|
||||
>
|
||||
<span class="text-sm">
|
||||
<span class="font-mono text-gray-500 mr-2">{{ row.projectSlug }}#{{ row.issue.number }}</span>
|
||||
<span class="font-mono text-gray-500 mr-2"
|
||||
>{{ row.projectSlug }}#{{ row.issue.number }}</span
|
||||
>
|
||||
{{ row.issue.title }}
|
||||
</span>
|
||||
<span class="text-xs text-gray-400">{{ row.projectName }}</span>
|
||||
@@ -76,21 +53,15 @@
|
||||
<!-- 最近项目 -->
|
||||
<NCard title="项目">
|
||||
<NSpin :show="loading">
|
||||
<div
|
||||
v-if="activeProjects.length === 0"
|
||||
class="text-sm text-gray-400 py-2"
|
||||
>
|
||||
<div v-if="activeProjects.length === 0" class="text-sm text-gray-400 py-2">
|
||||
还没有项目,去创建一个吧。
|
||||
</div>
|
||||
<ul
|
||||
v-else
|
||||
class="divide-y"
|
||||
>
|
||||
<ul v-else class="divide-y">
|
||||
<li
|
||||
v-for="p in activeProjects"
|
||||
:key="p.id"
|
||||
class="py-2 flex items-center justify-between cursor-pointer hover:bg-gray-50 px-1"
|
||||
@click="router.push({ name: 'project-home', params: { slug: p.slug } })"
|
||||
@click="goToProject(p)"
|
||||
>
|
||||
<span class="text-sm font-medium">{{ p.name }}</span>
|
||||
<span class="font-mono text-xs text-gray-400">{{ p.slug }}</span>
|
||||
@@ -163,4 +134,12 @@ function goIssue(row: MyIssueRow) {
|
||||
params: { slug: row.projectSlug, number: row.issue.number },
|
||||
})
|
||||
}
|
||||
|
||||
function goToProjects() {
|
||||
router.push({ name: 'project-list' })
|
||||
}
|
||||
|
||||
function goToProject(p: Project) {
|
||||
router.push({ name: 'project-home', params: { slug: p.slug } })
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user