diff --git a/src/components/related-prompts/custom-related-prompts.vue b/src/components/related-prompts/custom-related-prompts.vue index c7622e30..0f974d10 100644 --- a/src/components/related-prompts/custom-related-prompts.vue +++ b/src/components/related-prompts/custom-related-prompts.vue @@ -15,7 +15,7 @@
- + -
+
- - + + - - -
- -
@@ -96,7 +69,6 @@ export default defineComponent({ const isVisible = ref(false) const selectedIndex = ref(-1) - const selectedQuery = ref(-1) const observer = new IntersectionObserver(([entry]) => { isVisible.value = entry.isIntersecting @@ -116,51 +88,30 @@ export default defineComponent({ } else { selectedIndex.value = index } - selectedQuery.value = -1 x.emit('UserSelectedARelatedPrompt', selectedIndex.value) - x.emit('UserSelectedARelatedPromptQuery', selectedQuery.value) } const isSelected = (index: number): boolean => selectedIndex.value === index - const toggleQuery = (queryIndex: number): void => { - if (selectedQuery.value === queryIndex) { - selectedQuery.value = -1 - } else { - selectedQuery.value = queryIndex - } - x.emit('UserSelectedARelatedPromptQuery', selectedQuery.value) - } - - const isQuerySelected = (queryIndex: number): boolean => selectedQuery.value === queryIndex - const shouldHideButton = (index: number): boolean => selectedIndex.value !== -1 && selectedIndex.value !== index - const shouldHideQuery = (queryIndex: number): boolean => - selectedQuery.value !== -1 && selectedQuery.value !== queryIndex - x.on('UserAcceptedAQueryPreview', false).subscribe(() => { toggleSuggestion(-1) - toggleQuery(-1) }) x.on('SearchRequestChanged', false).subscribe(() => { toggleSuggestion(-1) - toggleQuery(-1) }) return { - isQuerySelected, isSelected, isTouchable, isVisible, relatedPrompts, selectedIndex, shouldHideButton, - shouldHideQuery, slidingPanelContent, - toggleQuery, toggleSuggestion, } }, diff --git a/src/components/search/results/results.vue b/src/components/search/results/results.vue index af17ac3a..f55dbabf 100644 --- a/src/components/search/results/results.vue +++ b/src/components/search/results/results.vue @@ -31,11 +31,11 @@