Tweaked merge and alert search result tooltips.

This commit is contained in:
2026-07-25 03:02:40 +02:00
parent a774254e71
commit c462c2b11a
2 changed files with 25 additions and 12 deletions

View File

@@ -148,6 +148,7 @@ onMounted(() => {
:triggers="[]" :triggers="[]"
:shown="actorResults.length > 0" :shown="actorResults.length > 0"
:auto-hide="false" :auto-hide="false"
placement="auto"
> >
<input <input
ref="actorInput" ref="actorInput"

View File

@@ -37,17 +37,14 @@ const {
const actors = ref(props.presetActors); const actors = ref(props.presetActors);
const actorResults = ref([]); const actorResults = ref([]);
const actorInput = ref(null);
const actorQuery = ref(''); const actorQuery = ref('');
const entities = ref(props.presetEntities); const entities = ref(props.presetEntities);
const entityResults = ref([]); const entityResults = ref([]);
const entityInput = ref(null);
const entityQuery = ref(''); const entityQuery = ref('');
const tags = ref(props.presetTags); const tags = ref(props.presetTags);
const tagResults = ref([]); const tagResults = ref([]);
const tagInput = ref(null);
const tagQuery = ref(''); const tagQuery = ref('');
const scenes = ref(props.presetScenes); const scenes = ref(props.presetScenes);
@@ -61,6 +58,8 @@ const actorAnd = ref(true);
const tagAnd = ref(true); const tagAnd = ref(true);
const matchAnd = ref(true); const matchAnd = ref(true);
const inputs = {};
const fieldsLogicTooltipId = useId(); const fieldsLogicTooltipId = useId();
const addActorDropdownId = useId(); const addActorDropdownId = useId();
const addTagDropdownId = useId(); const addTagDropdownId = useId();
@@ -132,9 +131,9 @@ async function searchTags() {
tagResults.value = res; tagResults.value = res;
} }
function focusActorInput() { function focusInput(target) {
setTimeout(() => { setTimeout(() => {
actorInput.value.focus(); inputs[target]?.focus();
}, 100); }, 100);
} }
@@ -263,7 +262,8 @@ function rememberThen(domain, checked) {
<li class="field-add"> <li class="field-add">
<VDropdown <VDropdown
:aria-id="addActorDropdownId" :aria-id="addActorDropdownId"
@show="focusActorInput" placement="auto"
@show="focusInput('actor')"
> >
<button <button
class="button" class="button"
@@ -272,7 +272,7 @@ function rememberThen(domain, checked) {
<template #popper> <template #popper>
<input <input
ref="actorInput" :ref="(el) => inputs.actor = el"
v-model="actorQuery" v-model="actorQuery"
class="input" class="input"
@input="searchActors" @input="searchActors"
@@ -339,7 +339,11 @@ function rememberThen(domain, checked) {
</li> </li>
<li class="field-add"> <li class="field-add">
<VDropdown :aria-id="addTagDropdownId"> <VDropdown
placement="auto"
:aria-id="addTagDropdownId"
@show="focusInput('tag')"
>
<button <button
type="button" type="button"
class="button" class="button"
@@ -347,7 +351,7 @@ function rememberThen(domain, checked) {
<template #popper> <template #popper>
<input <input
ref="tagInput" :ref="(el) => inputs.tag = el"
v-model="tagQuery" v-model="tagQuery"
class="input" class="input"
@input="searchTags" @input="searchTags"
@@ -403,7 +407,11 @@ function rememberThen(domain, checked) {
</li> </li>
<li class="field-add"> <li class="field-add">
<VDropdown :aria-id="addEntityDropdownId"> <VDropdown
placement="auto"
:aria-id="addEntityDropdownId"
@show="focusInput('entity')"
>
<button <button
type="button" type="button"
class="button" class="button"
@@ -411,7 +419,7 @@ function rememberThen(domain, checked) {
<template #popper> <template #popper>
<input <input
ref="entityInput" :ref="(el) => inputs.entity = el"
v-model="entityQuery" v-model="entityQuery"
class="input" class="input"
@input="searchEntities" @input="searchEntities"
@@ -465,7 +473,10 @@ function rememberThen(domain, checked) {
</li> </li>
<li class="field-add"> <li class="field-add">
<VDropdown :aria-id="addMatchDropdownId"> <VDropdown
:aria-id="addMatchDropdownId"
@show="focusInput('expression')"
>
<button <button
type="button" type="button"
class="button" class="button"
@@ -482,6 +493,7 @@ function rememberThen(domain, checked) {
</select> </select>
<input <input
:ref="(el) => inputs.expression = el"
v-model="matchExpression" v-model="matchExpression"
placeholder="Expression, // for regex" placeholder="Expression, // for regex"
class="input" class="input"