feat(gallery): "Show hidden" toggle reveals presentation chrome (#141 step 2)
A Curation-group chip in the facet panel flips include_hidden, threaded through the gallery filter store (default model, activeFilterParam, applyFilterFromQuery, cloneFilter, filterToQuery) and counted in the refine badge. Off by default → the gallery hides banner/editor-screenshot chrome; on → it's revealed. Backend already honors include_hidden (step 1). The dedicated conflict-flagged review surface (only the set-aside items) lands in step 5. 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:
@@ -34,6 +34,15 @@
|
|||||||
:color="store.filter.no_artist ? 'accent' : undefined"
|
:color="store.filter.no_artist ? 'accent' : undefined"
|
||||||
@click="toggleFlag('no_artist')"
|
@click="toggleFlag('no_artist')"
|
||||||
>No artist<span class="fc-facets__count">{{ facetCount('no_artist') }}</span></v-chip>
|
>No artist<span class="fc-facets__count">{{ facetCount('no_artist') }}</span></v-chip>
|
||||||
|
<!-- Reveal presentation chrome (banner / editor screenshot) the gallery
|
||||||
|
hides by default (milestone 141). A browse-mode toggle, not a count. -->
|
||||||
|
<v-chip
|
||||||
|
size="small" label
|
||||||
|
:variant="store.filter.include_hidden ? 'flat' : 'tonal'"
|
||||||
|
:color="store.filter.include_hidden ? 'accent' : undefined"
|
||||||
|
title="Show hidden — reveal banners / editor screenshots the gallery sets aside by default"
|
||||||
|
@click="toggleFlag('include_hidden')"
|
||||||
|
>Show hidden</v-chip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ let debounce = null
|
|||||||
const refineCount = computed(() => {
|
const refineCount = computed(() => {
|
||||||
const f = store.filter
|
const f = store.filter
|
||||||
return (f.platform ? 1 : 0) + (f.untagged ? 1 : 0) + (f.no_artist ? 1 : 0)
|
return (f.platform ? 1 : 0) + (f.untagged ? 1 : 0) + (f.no_artist ? 1 : 0)
|
||||||
+ (f.date_from ? 1 : 0) + (f.date_to ? 1 : 0)
|
+ (f.include_hidden ? 1 : 0) + (f.date_from ? 1 : 0) + (f.date_to ? 1 : 0)
|
||||||
})
|
})
|
||||||
const hasRefineFilters = computed(() => refineCount.value > 0)
|
const hasRefineFilters = computed(() => refineCount.value > 0)
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ export const useGalleryStore = defineStore('gallery', () => {
|
|||||||
tag_or: [], tag_exclude: [],
|
tag_or: [], tag_exclude: [],
|
||||||
// Phase-2 faceted refine params.
|
// Phase-2 faceted refine params.
|
||||||
platform: null, untagged: false, no_artist: false,
|
platform: null, untagged: false, no_artist: false,
|
||||||
|
// Reveal the presentation chrome (banner / editor screenshot) the gallery
|
||||||
|
// hides by default (milestone 141).
|
||||||
|
include_hidden: false,
|
||||||
date_from: null, date_to: null,
|
date_from: null, date_to: null,
|
||||||
// Phase-3 visual similarity: when set, the gallery is in "similar mode" —
|
// Phase-3 visual similarity: when set, the gallery is in "similar mode" —
|
||||||
// ranked by cosine distance to this image, bounded top-N, no cursor.
|
// ranked by cosine distance to this image, bounded top-N, no cursor.
|
||||||
@@ -158,6 +161,7 @@ export const useGalleryStore = defineStore('gallery', () => {
|
|||||||
if (filter.value.platform) p.platform = filter.value.platform
|
if (filter.value.platform) p.platform = filter.value.platform
|
||||||
if (filter.value.untagged) p.untagged = '1'
|
if (filter.value.untagged) p.untagged = '1'
|
||||||
if (filter.value.no_artist) p.no_artist = '1'
|
if (filter.value.no_artist) p.no_artist = '1'
|
||||||
|
if (filter.value.include_hidden) p.include_hidden = '1'
|
||||||
if (filter.value.date_from) p.date_from = filter.value.date_from
|
if (filter.value.date_from) p.date_from = filter.value.date_from
|
||||||
if (filter.value.date_to) p.date_to = filter.value.date_to
|
if (filter.value.date_to) p.date_to = filter.value.date_to
|
||||||
return p
|
return p
|
||||||
@@ -196,6 +200,7 @@ export const useGalleryStore = defineStore('gallery', () => {
|
|||||||
platform: q.platform || null,
|
platform: q.platform || null,
|
||||||
untagged: _truthy(q.untagged),
|
untagged: _truthy(q.untagged),
|
||||||
no_artist: _truthy(q.no_artist),
|
no_artist: _truthy(q.no_artist),
|
||||||
|
include_hidden: _truthy(q.include_hidden),
|
||||||
date_from: _parseDate(q.date_from),
|
date_from: _parseDate(q.date_from),
|
||||||
date_to: _parseDate(q.date_to),
|
date_to: _parseDate(q.date_to),
|
||||||
similar_to: _toId(q.similar_to),
|
similar_to: _toId(q.similar_to),
|
||||||
@@ -284,7 +289,8 @@ export function cloneFilter(f) {
|
|||||||
tag_exclude: [...(f.tag_exclude || [])],
|
tag_exclude: [...(f.tag_exclude || [])],
|
||||||
artist_id: f.artist_id, media_type: f.media_type,
|
artist_id: f.artist_id, media_type: f.media_type,
|
||||||
sort: f.sort, platform: f.platform, untagged: f.untagged,
|
sort: f.sort, platform: f.platform, untagged: f.untagged,
|
||||||
no_artist: f.no_artist, date_from: f.date_from, date_to: f.date_to,
|
no_artist: f.no_artist, include_hidden: f.include_hidden,
|
||||||
|
date_from: f.date_from, date_to: f.date_to,
|
||||||
similar_to: f.similar_to,
|
similar_to: f.similar_to,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -301,6 +307,7 @@ export function filterToQuery(f) {
|
|||||||
if (f.platform) q.platform = f.platform
|
if (f.platform) q.platform = f.platform
|
||||||
if (f.untagged) q.untagged = '1'
|
if (f.untagged) q.untagged = '1'
|
||||||
if (f.no_artist) q.no_artist = '1'
|
if (f.no_artist) q.no_artist = '1'
|
||||||
|
if (f.include_hidden) q.include_hidden = '1'
|
||||||
if (f.date_from) q.date_from = f.date_from
|
if (f.date_from) q.date_from = f.date_from
|
||||||
if (f.date_to) q.date_to = f.date_to
|
if (f.date_to) q.date_to = f.date_to
|
||||||
if (f.similar_to) q.similar_to = String(f.similar_to)
|
if (f.similar_to) q.similar_to = String(f.similar_to)
|
||||||
|
|||||||
Reference in New Issue
Block a user