chore: spotlight improvements for team requests search (#3930)
Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com>
This commit is contained in:
@@ -169,7 +169,16 @@ export class CollectionsSpotlightSearcherService
|
|||||||
}
|
}
|
||||||
|
|
||||||
scopeHandle.run(() => {
|
scopeHandle.run(() => {
|
||||||
|
const isPersonalWorkspace = computed(
|
||||||
|
() => this.workspaceService.currentWorkspace.value.type === "personal"
|
||||||
|
)
|
||||||
|
|
||||||
watch(query, (query) => {
|
watch(query, (query) => {
|
||||||
|
if (!isPersonalWorkspace.value) {
|
||||||
|
results.value = []
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (pageCategory === "other") {
|
if (pageCategory === "other") {
|
||||||
results.value = []
|
results.value = []
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -58,13 +58,32 @@ export class TeamsSpotlightSearcherService
|
|||||||
(query) => {
|
(query) => {
|
||||||
if (this.workspaceService.currentWorkspace.value.type === "team") {
|
if (this.workspaceService.currentWorkspace.value.type === "team") {
|
||||||
const teamID = this.workspaceService.currentWorkspace.value.teamID
|
const teamID = this.workspaceService.currentWorkspace.value.teamID
|
||||||
debouncedSearch(query, teamID)?.catch((_) => {})
|
debouncedSearch(query, teamID)?.catch(() => {})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// set the search section title based on the current workspace
|
||||||
|
const teamName = computed(() => {
|
||||||
|
return (
|
||||||
|
(this.workspaceService.currentWorkspace.value.type === "team" &&
|
||||||
|
this.workspaceService.currentWorkspace.value.teamName) ||
|
||||||
|
this.t("team.search_title")
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(
|
||||||
|
teamName,
|
||||||
|
(newTeamName) => {
|
||||||
|
this.searcherSectionTitle = newTeamName
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
}
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
const onSessionEnd = () => {
|
const onSessionEnd = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user