52 lines
2.2 KiB
HTML
52 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN" class="h-full">
|
|
{{template "head" .}}
|
|
<body class="h-full bg-gray-50 text-gray-900">
|
|
<div class="min-h-full flex flex-col">
|
|
{{template "nav" .}}
|
|
<main class="flex-1">
|
|
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
<div class="flex items-center justify-between mb-6">
|
|
<h1 class="text-2xl font-bold">仓库详情</h1>
|
|
<div class="flex gap-3">
|
|
<a href="/repo/{{.ID}}/generate"
|
|
class="bg-green-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-green-700">
|
|
生成 PR 描述
|
|
</a>
|
|
<a href="/repo/{{.ID}}/review"
|
|
class="bg-blue-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-blue-700">
|
|
AI 代码审查
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<!-- Repo Info -->
|
|
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6 mb-6">
|
|
<div id="repo-info" class="text-sm text-gray-500">加载中...</div>
|
|
</div>
|
|
<!-- Git Graph -->
|
|
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
|
|
<h2 class="text-lg font-semibold mb-4">Git Graph</h2>
|
|
<div id="git-graph" class="overflow-auto" style="min-height: 400px;">
|
|
<p class="text-sm text-gray-400 text-center py-10">Git Graph 将在 Phase 3 实现</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
{{template "footer" .}}
|
|
</div>
|
|
<script>
|
|
fetch('/api/repos').then(r => r.json()).then(repos => {
|
|
const repo = repos.find(r => r.id == {{.ID}});
|
|
const el = document.getElementById('repo-info');
|
|
if (repo) {
|
|
el.innerHTML = '<p><strong>URL:</strong> ' + repo.url + '</p>' +
|
|
'<p class="mt-1"><strong>大小:</strong> ' + (repo.size_bytes / 1024 / 1024).toFixed(1) + ' MB</p>' +
|
|
'<p class="mt-1"><strong>克隆时间:</strong> ' + repo.cloned_at + '</p>';
|
|
} else {
|
|
el.innerHTML = '<p class="text-red-500">仓库未找到</p>';
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|