Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
chore: spotlight improvements for team requests search (#3930)
Akash K6fd30f9aca07
diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/collections.searcher.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/collections.searcher.tsindex fdb532612..5326661bc 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 = []returndiff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/teamRequest.searcher.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/teamRequest.searcher.tsindex 8513bb83d..2fc82b096 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 = () => {