A container registry that uses the AT Protocol for manifest storage and S3 for blob storage. atcr.io
docker container atproto go
80
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix tag deletion in UI

+22 -4
+2 -2
pkg/appview/templates/pages/repository.html
··· 109 109 {{ if .Tags }} 110 110 <div class="tags-list"> 111 111 {{ range .Tags }} 112 - <div class="tag-item" id="tag-{{ .Tag.Tag }}"> 112 + <div class="tag-item" id="tag-{{ sanitizeID .Tag.Tag }}"> 113 113 <div class="tag-item-header"> 114 114 <div> 115 115 <span class="tag-name-large">{{ .Tag.Tag }}</span> ··· 125 125 <button class="delete-btn" 126 126 hx-delete="/api/images/{{ $.Repository.Name }}/tags/{{ .Tag.Tag }}" 127 127 hx-confirm="Delete tag {{ .Tag.Tag }}?" 128 - hx-target="#tag-{{ .Tag.Tag }}" 128 + hx-target="#tag-{{ sanitizeID .Tag.Tag }}" 129 129 hx-swap="outerHTML"> 130 130 <i data-lucide="trash-2"></i> 131 131 </button>
+5 -2
pkg/appview/ui.go
··· 85 85 }, 86 86 87 87 "sanitizeID": func(s string) string { 88 - // Replace colons with dashes to make valid CSS selectors 88 + // Replace special CSS selector characters with dashes 89 89 // e.g., "sha256:abc123" becomes "sha256-abc123" 90 - return strings.ReplaceAll(s, ":", "-") 90 + // e.g., "v0.0.2" becomes "v0-0-2" 91 + s = strings.ReplaceAll(s, ":", "-") 92 + s = strings.ReplaceAll(s, ".", "-") 93 + return s 91 94 }, 92 95 93 96 "parseLicenses": func(licensesStr string) []licenses.LicenseInfo {
+15
pkg/appview/ui_test.go
··· 483 483 input: "abc:", 484 484 expected: "abc-", 485 485 }, 486 + { 487 + name: "version tag with periods", 488 + input: "v0.0.2", 489 + expected: "v0-0-2", 490 + }, 491 + { 492 + name: "colons and periods", 493 + input: "sha256:abc.def", 494 + expected: "sha256-abc-def", 495 + }, 496 + { 497 + name: "only period", 498 + input: ".", 499 + expected: "-", 500 + }, 486 501 } 487 502 488 503 for _, tt := range tests {