Improved search, linking results to scenes page, updating on input clear.

This commit is contained in:
DebaucheryLibrarian 2026-01-05 21:40:03 +01:00
parent 68f15d4f74
commit 77b9acea32
6 changed files with 8 additions and 6 deletions

View File

@ -8,7 +8,7 @@
type="search"
placeholder="Search actors"
class="input search"
@keydown.enter="search"
@search="search"
>
<Icon

View File

@ -15,7 +15,7 @@
type="search"
placeholder="Search scenes"
class="search input"
@keydown.enter="search"
@search="search"
>
<Icon

View File

@ -66,9 +66,10 @@ function toggleTag(tag, isChecked) {
<style scoped>
.dialog-body {
padding: 1rem;
width: 30rem;
max-width: 100%;
box-sizing: border-box;
padding: 1rem;
overflow-y: auto;
}

View File

@ -83,7 +83,7 @@
Found {{ sceneTotal }} {{ sceneTotal > 1 ? 'scenes' : 'scene' }}
<a
:href="`/updates/results/?q=${query}`"
:href="`/scenes/results/?q=${query}`"
class="link"
>Full scene results</a>
</span>

View File

@ -49,7 +49,8 @@ export async function fetchEntities(options = {}) {
.where((subBuilder) => {
subBuilder
.whereILike('entities.name', `%${options.query}%`)
.orWhereILike('entities.slug', `%${options.query}%`);
.orWhereILike('entities.slug', `%${options.query}%`)
.orWhereILike(knex.raw('array_to_string(entities.alias, \',\', \'*\')'), `%${options.query}%`);
})
.whereNot('entities.type', 'info');
});

2
static

@ -1 +1 @@
Subproject commit 9b190cb9c7114b0bbb51b90672526022143bf33b
Subproject commit c3a287bfae05a7bb92d028c4036ec418b7efe5c5