Enhance comment seeding and search functionality
- Updated the `seedComments` function to return an array of published comment event IDs for tracking. - Introduced `seedCommentReactions` to seed upvotes and downvotes on comments, improving interaction visibility. - Enhanced the `App.vue` and `MobileNav.vue` components to support a mobile search overlay, allowing users to search films seamlessly. - Added a new `MobileSearch` component for better search experience on mobile devices. - Implemented a search feature in `AppHeader.vue` with dropdown results for improved content discovery. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
23
src/stores/searchSelection.ts
Normal file
23
src/stores/searchSelection.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import type { Content } from '../types/content'
|
||||
|
||||
/**
|
||||
* Lightweight store to bridge search result selection
|
||||
* from the header/mobile search to Browse.vue's detail modal.
|
||||
*/
|
||||
export const useSearchSelectionStore = defineStore('searchSelection', () => {
|
||||
const pendingContent = ref<Content | null>(null)
|
||||
|
||||
function select(content: Content) {
|
||||
pendingContent.value = content
|
||||
}
|
||||
|
||||
function consume(): Content | null {
|
||||
const content = pendingContent.value
|
||||
pendingContent.value = null
|
||||
return content
|
||||
}
|
||||
|
||||
return { pendingContent, select, consume }
|
||||
})
|
||||
Reference in New Issue
Block a user