Restored actor tag filtering with performance fixes.

This commit is contained in:
2026-03-22 04:50:35 +01:00
parent 884ad891f3
commit fea28b71ba
2 changed files with 37 additions and 39 deletions

View File

@@ -12,25 +12,25 @@
<Icon icon="search" />
</label>
<!--
<div
v-show="showActorTags"
v-tooltip="'Tags relevant to the selected actors'"
class="filter-sort order noselect"
@click="showActorTags = false"
>
<Icon icon="user-tags" />
</div>
<template v-if="isActorTagsAvailable">
<div
v-show="showActorTags"
v-tooltip="'Tags relevant to the selected actors'"
class="filter-sort order noselect"
@click="showActorTags = false"
>
<Icon icon="user-tags" />
</div>
<div
v-show="!showActorTags"
v-tooltip="'All tags'"
class="filter-sort order noselect"
@click="showActorTags = true"
>
<Icon icon="price-tags" />
</div>
-->
<div
v-show="!showActorTags"
v-tooltip="'All tags'"
class="filter-sort order noselect"
@click="showActorTags = true"
>
<Icon icon="price-tags" />
</div>
</template>
<div
v-show="order === 'priority'"
@@ -142,13 +142,17 @@ const props = defineProps({
const emit = defineEmits(['update']);
const { pageProps } = inject('pageContext');
// const { tag: pageTag, actor: pageActor } = pageProps;
const { tag: pageTag } = pageProps;
const {
tag: pageTag,
actor: pageActor,
stash: pageStash,
} = pageProps;
const search = ref('');
const searchRegexp = computed(() => new RegExp(search.value, 'i'));
const order = ref('priority');
// const showActorTags = ref(true);
const showActorTags = ref(!!pageActor);
const priorityTags = [
'anal',
@@ -173,13 +177,13 @@ const priorityTags = [
'lesbian',
];
const isActorTagsAvailable = computed(() => props.actorTags && (props.filters.actors.length > 0 || pageActor) && !pageStash);
const groupedTags = computed(() => {
/*
const tags = showActorTags.value && props.actorTags && (props.filters.actors.length > 0 || pageActor)
// can't show actor tags inside stash, because both require a join, and manticore currently only supports one
const tags = showActorTags.value && isActorTagsAvailable.value
? props.actorTags
: props.tags;
*/
const tags = props.tags;
const selected = tags.filter((tag) => props.filters.tags.includes(tag.slug));
const filtered = tags.filter((tag) => !props.filters.tags.includes(tag.slug)