Files
at-container-registry/pkg/appview/templates/partials/push-list.html
T

45 lines
1.5 KiB
HTML

{{ range .Pushes }}
<div class="push-card">
<div class="push-header">
<a href="/?user={{ .Handle }}" class="push-user">{{ .Handle }}</a>
<span class="push-separator">/</span>
<span class="push-repo">{{ .Repository }}</span>
<span class="push-separator">:</span>
<span class="push-tag">{{ .Tag }}</span>
</div>
<div class="push-details">
<code class="digest">{{ truncateDigest .Digest 12 }}</code>
<span class="separator"></span>
<span class="hold">{{ .HoldEndpoint }}</span>
<span class="separator"></span>
<time class="timestamp" datetime="{{ .CreatedAt.Format "2006-01-02T15:04:05Z07:00" }}">
{{ timeAgo .CreatedAt }}
</time>
</div>
<div class="push-command">
<code class="pull-command">docker pull {{ $.RegistryURL }}/{{ .Handle }}/{{ .Repository }}:{{ .Tag }}</code>
<button class="copy-btn" onclick="copyToClipboard('docker pull {{ $.RegistryURL }}/{{ .Handle }}/{{ .Repository }}:{{ .Tag }}')">
📋 Copy
</button>
</div>
</div>
{{ end }}
{{ if .HasMore }}
<button class="load-more"
hx-get="/api/recent-pushes?offset={{ .NextOffset }}"
hx-target="#push-list"
hx-swap="beforeend">
Load More
</button>
{{ end }}
{{ if eq (len .Pushes) 0 }}
<div class="empty-state">
<p>No pushes yet. Start using ATCR by pushing your first image!</p>
<pre><code>docker push {{ .RegistryURL }}/yourhandle/myapp:latest</code></pre>
</div>
{{ end }}