fix(ui): surface auto-hide misfires proactively — review strip no longer gated on Show-hidden (#141)
The conflict-flag review strip only appeared when "Show hidden" was toggled on, so misfires could go unnoticed — defeating the point of flagging them. Fetch pending flags on mount and show the strip whenever there are any, independent of the toggle (operator-flagged). Gated to the main gallery (not the post-detail view), matching the filter bar. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDgx8bQS5YrGRK76v8HUnM
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- Shown atop the gallery when "Show hidden" is on: auto-hidden chrome that
|
<!-- Auto-hidden chrome that ALSO looked like real content — surfaced PROACTIVELY
|
||||||
ALSO looked like real content, most-concerning first, with keep / un-hide
|
atop the gallery whenever there's something to review (NOT gated on the
|
||||||
(#141). Renders nothing when there's nothing to review. -->
|
Show-hidden toggle, so misfires can't go unnoticed), most-concerning first,
|
||||||
|
with keep / un-hide (#141). Renders nothing when there's nothing to review. -->
|
||||||
<section v-if="items.length" class="fc-review" aria-label="Hidden images to review">
|
<section v-if="items.length" class="fc-review" aria-label="Hidden images to review">
|
||||||
<div class="fc-review__head">
|
<div class="fc-review__head">
|
||||||
<v-icon size="18" color="warning">mdi-alert-outline</v-icon>
|
<v-icon size="18" color="warning">mdi-alert-outline</v-icon>
|
||||||
@@ -43,13 +44,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import { useApi } from '../../composables/useApi.js'
|
import { useApi } from '../../composables/useApi.js'
|
||||||
import { useGalleryStore } from '../../stores/gallery.js'
|
|
||||||
import { toast } from '../../utils/toast.js'
|
import { toast } from '../../utils/toast.js'
|
||||||
|
|
||||||
const api = useApi()
|
const api = useApi()
|
||||||
const store = useGalleryStore()
|
|
||||||
|
|
||||||
const items = ref([])
|
const items = ref([])
|
||||||
const busy = ref([])
|
const busy = ref([])
|
||||||
@@ -57,7 +56,8 @@ const busy = ref([])
|
|||||||
function keyOf(it) { return `${it.image_id}:${it.tag_id}` }
|
function keyOf(it) { return `${it.image_id}:${it.tag_id}` }
|
||||||
|
|
||||||
async function load() {
|
async function load() {
|
||||||
if (!store.filter.include_hidden) { items.value = []; return }
|
// Fetched unconditionally on mount — the strip prompts for pending misfires
|
||||||
|
// even when the operator is browsing normally (Show-hidden off).
|
||||||
try {
|
try {
|
||||||
const body = await api.get('/api/gallery/hidden-review')
|
const body = await api.get('/api/gallery/hidden-review')
|
||||||
items.value = body.items || []
|
items.value = body.items || []
|
||||||
@@ -83,8 +83,7 @@ async function resolve(it, action) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch whenever "Show hidden" flips on (immediate covers a mount already-on).
|
onMounted(load)
|
||||||
watch(() => store.filter.include_hidden, load, { immediate: true })
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<div class="fc-gallery-layout__main">
|
<div class="fc-gallery-layout__main">
|
||||||
<PostInfoHeader />
|
<PostInfoHeader />
|
||||||
<GalleryFilterBar v-if="store.filter.post_id == null" />
|
<GalleryFilterBar v-if="store.filter.post_id == null" />
|
||||||
<HiddenReviewStrip />
|
<HiddenReviewStrip v-if="store.filter.post_id == null" />
|
||||||
<EmptyState v-if="store.isEmpty" />
|
<EmptyState v-if="store.isEmpty" />
|
||||||
<GalleryGrid v-else @open="openImage" />
|
<GalleryGrid v-else @open="openImage" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user