54 lines
2.6 KiB
HTML
54 lines
2.6 KiB
HTML
{{define "title"}}Repos{{end}}
|
|
|
|
{{define "content"}}
|
|
<div class="flex items-center justify-between mb-6">
|
|
<h1 class="text-2xl font-bold text-gray-900">Repos</h1>
|
|
<a href="/admin/repos/new" class="rounded-md bg-blue-600 px-4 py-2 text-sm font-semibold text-white shadow hover:bg-blue-500">Add Repo</a>
|
|
</div>
|
|
|
|
{{with .Data}}
|
|
{{if .Repos}}
|
|
<div class="overflow-hidden bg-white shadow ring-1 ring-gray-200 rounded-lg">
|
|
<table class="min-w-full divide-y divide-gray-200">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Name</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Forgejo</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Webhook</th>
|
|
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Active</th>
|
|
<th class="px-4 py-3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200">
|
|
{{range .Repos}}
|
|
<tr class="hover:bg-gray-50">
|
|
<td class="px-4 py-3 text-sm font-medium text-gray-900">{{.Name}}</td>
|
|
<td class="px-4 py-3 text-sm text-gray-500">{{.ForgejoOwner}}/{{.ForgejoRepo}}</td>
|
|
<td class="px-4 py-3 text-sm">
|
|
{{if .WebhookVerified}}
|
|
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">Verified</span>
|
|
{{else}}
|
|
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800">Unverified</span>
|
|
{{end}}
|
|
</td>
|
|
<td class="px-4 py-3 text-sm">
|
|
{{if .Active}}
|
|
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">Active</span>
|
|
{{else}}
|
|
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-800">Inactive</span>
|
|
{{end}}
|
|
</td>
|
|
<td class="px-4 py-3 text-sm">
|
|
<a href="/admin/repos/{{.ID}}/edit" class="text-blue-600 hover:text-blue-500">Edit</a>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{else}}
|
|
<p class="text-sm text-gray-500">No repos configured. Add one to get started.</p>
|
|
{{end}}
|
|
{{end}}
|
|
{{end}}
|