feat: inspections (#3213)
Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
This commit is contained in:
@@ -53,9 +53,16 @@
|
||||
v-model="tab.document.request.endpoint"
|
||||
:placeholder="`${t('request.url')}`"
|
||||
:auto-complete-source="userHistories"
|
||||
:inspection-results="tabResults"
|
||||
@paste="onPasteUrl($event)"
|
||||
@enter="newSendRequest"
|
||||
/>
|
||||
>
|
||||
<template #empty>
|
||||
<span>
|
||||
{{ t("empty.history_suggestions") }}
|
||||
</span>
|
||||
</template>
|
||||
</SmartEnvInput>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex mt-2 sm:mt-0">
|
||||
@@ -259,12 +266,14 @@ import IconLink2 from "~icons/lucide/link-2"
|
||||
import IconRotateCCW from "~icons/lucide/rotate-ccw"
|
||||
import IconSave from "~icons/lucide/save"
|
||||
import IconShare2 from "~icons/lucide/share-2"
|
||||
import { HoppRESTTab } from "~/helpers/rest/tab"
|
||||
import { HoppRESTTab, currentTabID } from "~/helpers/rest/tab"
|
||||
import { getDefaultRESTRequest } from "~/helpers/rest/default"
|
||||
import { RESTHistoryEntry, restHistory$ } from "~/newstore/history"
|
||||
import { platform } from "~/platform"
|
||||
import { getCurrentStrategyID } from "~/helpers/network"
|
||||
import { HoppGQLRequest, HoppRESTRequest } from "@hoppscotch/data"
|
||||
import { useService } from "dioc/vue"
|
||||
import { InspectionService } from "~/services/inspection"
|
||||
|
||||
const t = useI18n()
|
||||
|
||||
@@ -628,4 +637,12 @@ const isCustomMethod = computed(() => {
|
||||
})
|
||||
|
||||
const COLUMN_LAYOUT = useSetting("COLUMN_LAYOUT")
|
||||
|
||||
const inspectionService = useService(InspectionService)
|
||||
|
||||
const allTabResults = inspectionService.tabs
|
||||
|
||||
const tabResults = computed(() => {
|
||||
return allTabResults.value.get(currentTabID.value) ?? []
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user