44 <img class =" spinner" src =" @/assets/images/SpinningBikeV1.svg" alt =" Loading..." />
55 </loading >
66
7- <div class =" admin -page container" >
8- <img class =" admin- icon" src =" /images/biketag-ambassador.svg" alt =" Admin Icon" />
9- <h1 >BikeTag Admin </h1 >
7+ <div class =" queue-fix -page container" >
8+ <img class =" queue-fix- icon" src =" /images/biketag-ambassador.svg" alt =" Queue Fix Icon" />
9+ <h1 >Queue Fix </h1 >
1010 <p >
1111 Scan the queue for image conversion problems, missing sized variants, wrong-round entries,
1212 orphaned found images that never made it to main, and duplicate uploader splits. Use Fix Queue
13- Images to re-run webp conversion and variant generation for fixable issues. Wrong-round files
14- can be deleted individually or in bulk. Orphaned found images can be moved into main/.
13+ Images (or Fix image on an issue) to re-run webp conversion and variant generation for fixable
14+ issues. Unrecognized and wrong-round files can be deleted. Orphaned found images can be moved
15+ into main/.
1516 </p >
1617
1718 <div class =" actions" >
173174 >
174175 Move blocked — player mismatch
175176 </span >
177+ <button
178+ v-else-if =" isFixableIssue(issue)"
179+ type =" button"
180+ class =" issue-action issue-action--fix"
181+ @click =" fixQueue"
182+ >
183+ Fix image
184+ </button >
176185 <button
177186 v-if =" issue.deletable"
178187 type =" button"
193202 </div >
194203</template >
195204
196- <script setup name="AdminView ">
205+ <script setup name="QueueFixView ">
197206import { useBikeTagStore } from ' @/store/index'
198207import { getS3ImageSized } from ' @/common/methods'
199208import { computed , inject , onMounted , ref } from ' vue'
@@ -249,6 +258,13 @@ function filenameRoundFromKey(key) {
249258 return match ? Number (match[1 ]) : undefined
250259}
251260
261+ function isFixableIssue (issue ) {
262+ return (
263+ (issue .category === ' non-webp' || issue .category === ' missing-variants' ) &&
264+ issue .deletable !== true
265+ )
266+ }
267+
252268function applyScanResult (result ) {
253269 scanned .value = true
254270 issues .value = result .issues ?? []
@@ -424,7 +440,7 @@ onMounted(async () => {
424440</script>
425441
426442<style scoped lang="scss">
427- .admin -page {
443+ .queue-fix -page {
428444 background-color: #fff;
429445 color: #000;
430446 padding: 2rem;
@@ -447,7 +463,7 @@ onMounted(async () => {
447463 margin-bottom: 2rem;
448464 }
449465
450- .admin -icon {
466+ .queue-fix -icon {
451467 width: 72px;
452468 margin-bottom: 1rem;
453469 }
@@ -567,6 +583,10 @@ onMounted(async () => {
567583 background: #e8f5e9;
568584 }
569585
586+ &--fix {
587+ background: #fff8e1;
588+ }
589+
570590 &--blocked {
571591 display: inline-block;
572592 margin-top: 0.5rem;
0 commit comments