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
fix: add full request as request context (#4422)
Akash K79bf0d03639f
diff --git a/packages/hoppscotch-common/src/pages/index.vue b/packages/hoppscotch-common/src/pages/index.vueindex 895dd777b..8634d1fe3 100644--- a/packages/hoppscotch-common/src/pages/index.vue+++ b/packages/hoppscotch-common/src/pages/index.vue@@ -278,7 +278,10 @@ const getTabName = (tab: HoppTab<HoppTabDocument>) => {const requestToRename = computed(() => {if (!renameTabID.value) return nullconst tab = tabs.getTabRef(renameTabID.value)- return getTabName(tab.value)++ return tab.value.document.type === "request"+ ? tab.value.document.request+ : null})const openReqRenameModal = (tabID?: string) => {diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/request.searcher.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/request.searcher.tsindex f26293091..e066cff3a 100644--- a/packages/hoppscotch-common/src/services/spotlight/searchers/request.searcher.ts+++ b/packages/hoppscotch-common/src/services/spotlight/searchers/request.searcher.ts@@ -47,7 +47,11 @@ export class RequestSpotlightSearcherService extends StaticSpotlightSearcherServprivate readonly restTab = this.bind(RESTTabService)private route = useRoute()- private isRESTPage = computed(() => this.route.name === "index")+ private isRESTPage = computed(+ () =>+ this.route.name === "index" &&+ this.restTab.currentActiveTab.value.document.type === "request"+ )private isGQLPage = computed(() => this.route.name === "graphql")private isRESTOrGQLPage = computed(() => this.isRESTPage.value || this.isGQLPage.value