diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/collections.searcher.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/collections.searcher.ts index fdb532612c..5326661bc3 100644 --- a/packages/hoppscotch-common/src/services/spotlight/searchers/collections.searcher.ts +++ b/packages/hoppscotch-common/src/services/spotlight/searchers/collections.searcher.ts @@ -169,7 +169,16 @@ export class CollectionsSpotlightSearcherService } scopeHandle.run(() => { + const isPersonalWorkspace = computed( + () => this.workspaceService.currentWorkspace.value.type === "personal" + ) + watch(query, (query) => { + if (!isPersonalWorkspace.value) { + results.value = [] + return + } + if (pageCategory === "other") { results.value = [] return diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/teamRequest.searcher.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/teamRequest.searcher.ts index 8513bb83d3..2fc82b0969 100644 --- a/packages/hoppscotch-common/src/services/spotlight/searchers/teamRequest.searcher.ts +++ b/packages/hoppscotch-common/src/services/spotlight/searchers/teamRequest.searcher.ts @@ -58,13 +58,32 @@ export class TeamsSpotlightSearcherService (query) => { if (this.workspaceService.currentWorkspace.value.type === "team") { const teamID = this.workspaceService.currentWorkspace.value.teamID - debouncedSearch(query, teamID)?.catch((_) => {}) + debouncedSearch(query, teamID)?.catch(() => {}) } }, { 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 = () => {