검색 동선 통일
This commit is contained in:
@@ -604,6 +604,13 @@ function handleLeftRailSearch() {
|
||||
function submitGlobalSearch() {
|
||||
const query = (searchQuery.value || '').trim()
|
||||
isCollapsedSearchOpen.value = false
|
||||
if (['home', 'templates', 'topicHub', 'followingFeed', 'favorites'].includes(String(route.name || ''))) {
|
||||
const nextQuery = { ...route.query }
|
||||
if (query) nextQuery.q = query
|
||||
else delete nextQuery.q
|
||||
router.push({ path: route.path, query: nextQuery })
|
||||
return
|
||||
}
|
||||
router.push(route.name === 'templates' ? templatesPath(query) : homePath(query))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user