diff --git a/packages/hoppscotch-common/src/components/new-collections/rest/Request.vue b/packages/hoppscotch-common/src/components/new-collections/rest/Request.vue index 4314f5157..a240d76e0 100644 --- a/packages/hoppscotch-common/src/components/new-collections/rest/Request.vue +++ b/packages/hoppscotch-common/src/components/new-collections/rest/Request.vue @@ -24,7 +24,7 @@ {{ requestView.request.name }} () @@ -152,9 +153,6 @@ const emit = defineEmits<{ const tippyActions = ref(null) const options = ref(null) -// TODO: implement -const isActive = ref(true) - const requestLabelColor = computed(() => getMethodLabelColorClassOf(props.requestView.request) ) diff --git a/packages/hoppscotch-common/src/components/new-collections/rest/index.vue b/packages/hoppscotch-common/src/components/new-collections/rest/index.vue index 07bde3f44..46be887bf 100644 --- a/packages/hoppscotch-common/src/components/new-collections/rest/index.vue +++ b/packages/hoppscotch-common/src/components/new-collections/rest/index.vue @@ -46,6 +46,7 @@ /> { const indexPath = pathToIndex(id) return indexPath.length === 1 } + +const isActiveRequest = (requestID: string) => { + if ( + tabs.currentActiveTab.value.document.saveContext?.originLocation !== + "workspace-user-collection" + ) { + return false + } + + const requestHandle = ref( + tabs.currentActiveTab.value.document.saveContext?.requestHandle + ) + + if (requestHandle.value.type === "invalid") { + return false + } + return requestHandle.value.data.request.id === requestID +}