@@ -95,6 +97,8 @@
isFile: entry.isFile,
})
"
+ :auto-complete-env="true"
+ :envs="envs"
/>
@@ -190,11 +194,13 @@ import { useI18n } from "@composables/i18n"
import { useToast } from "@composables/toast"
import { useColorMode } from "@composables/theming"
import { useVModel } from "@vueuse/core"
+import { AggregateEnvironment } from "~/newstore/environments"
type Body = HoppRESTReqBody & { contentType: "multipart/form-data" }
const props = defineProps<{
modelValue: Body
+ envs: AggregateEnvironment[]
}>()
const emit = defineEmits<{
diff --git a/packages/hoppscotch-common/src/components/http/Headers.vue b/packages/hoppscotch-common/src/components/http/Headers.vue
index 33fd0ecb8..f25028c69 100644
--- a/packages/hoppscotch-common/src/components/http/Headers.vue
+++ b/packages/hoppscotch-common/src/components/http/Headers.vue
@@ -93,6 +93,7 @@
:env-index="index"
:inspection-results="getInspectorResult(headerKeyResults, index)"
:auto-complete-env="true"
+ :envs="envs"
@change="
updateHeader(index, {
id: header.id,
@@ -110,6 +111,7 @@
"
:env-index="index"
:auto-complete-env="true"
+ :envs="envs"
@change="
updateHeader(index, {
id: header.id,
@@ -331,7 +333,11 @@ import {
getComputedHeaders,
getComputedAuthHeaders,
} from "~/helpers/utils/EffectiveURL"
-import { aggregateEnvs$, getAggregateEnvs } from "~/newstore/environments"
+import {
+ AggregateEnvironment,
+ aggregateEnvs$,
+ getAggregateEnvs,
+} from "~/newstore/environments"
import { useVModel } from "@vueuse/core"
import { useService } from "dioc/vue"
import { InspectionService, InspectorResult } from "~/services/inspection"
@@ -361,6 +367,7 @@ const props = defineProps<{
modelValue: HoppRESTRequest
isCollectionProperty?: boolean
inheritedProperties?: HoppInheritedProperty
+ envs?: AggregateEnvironment[]
}>()
const emit = defineEmits<{
diff --git a/packages/hoppscotch-common/src/components/http/OAuth2Authorization.vue b/packages/hoppscotch-common/src/components/http/OAuth2Authorization.vue
index bb85607c5..fc1634257 100644
--- a/packages/hoppscotch-common/src/components/http/OAuth2Authorization.vue
+++ b/packages/hoppscotch-common/src/components/http/OAuth2Authorization.vue
@@ -8,6 +8,7 @@
"
:auto-complete-env="true"
placeholder="OpenID Connect Discovery URL"
+ :envs="envs"
/>
@@ -16,6 +17,7 @@
placeholder="Authorization URL"
:auto-complete-env="true"
:styles="hasOIDCURL ? 'pointer-events-none opacity-70' : ''"
+ :envs="envs"
>
@@ -24,6 +26,7 @@
placeholder="Access Token URL"
:auto-complete-env="true"
:styles="hasOIDCURL ? 'pointer-events-none opacity-70' : ''"
+ :envs="envs"
/>
@@ -31,6 +34,7 @@
v-model="clientID"
:auto-complete-env="true"
placeholder="Client ID"
+ :envs="envs"
/>
@@ -38,6 +42,7 @@
v-model="clientSecret"
:auto-complete-env="true"
placeholder="Client Secret"
+ :envs="envs"
/>
@@ -45,6 +50,7 @@
v-model="scope"
:auto-complete-env="true"
placeholder="Scope"
+ :envs="envs"
/>
@@ -77,6 +83,7 @@ const toast = useToast()
const props = defineProps<{
modelValue: HoppRESTAuthOAuth2 | HoppGQLAuthOAuth2
+ envs?: AggregateEnvironment[]
}>()
const emit = defineEmits<{
diff --git a/packages/hoppscotch-common/src/components/http/Parameters.vue b/packages/hoppscotch-common/src/components/http/Parameters.vue
index 19f54ae70..9e8463f11 100644
--- a/packages/hoppscotch-common/src/components/http/Parameters.vue
+++ b/packages/hoppscotch-common/src/components/http/Parameters.vue
@@ -88,6 +88,7 @@
getInspectorResult(parameterKeyResults, index)
"
:auto-complete-env="true"
+ :envs="envs"
@change="
updateParam(index, {
id: param.id,
@@ -104,6 +105,7 @@
getInspectorResult(parameterValueResults, index)
"
:auto-complete-env="true"
+ :envs="envs"
@change="
updateParam(index, {
id: param.id,
@@ -211,6 +213,7 @@ import { InspectionService, InspectorResult } from "~/services/inspection"
import { RESTTabService } from "~/services/tab/rest"
import { useNestedSetting } from "~/composables/settings"
import { toggleNestedSetting } from "~/newstore/settings"
+import { AggregateEnvironment } from "~/newstore/environments"
const colorMode = useColorMode()
@@ -244,6 +247,7 @@ useCodemirror(
const props = defineProps<{
modelValue: HoppRESTParam[]
+ envs?: AggregateEnvironment[]
}>()
const emit = defineEmits<{
diff --git a/packages/hoppscotch-common/src/components/http/RequestOptions.vue b/packages/hoppscotch-common/src/components/http/RequestOptions.vue
index a2fdf1a71..52fab4d29 100644
--- a/packages/hoppscotch-common/src/components/http/RequestOptions.vue
+++ b/packages/hoppscotch-common/src/components/http/RequestOptions.vue
@@ -10,7 +10,7 @@
:label="`${t('tab.parameters')}`"
:info="`${newActiveParamsCount$}`"
>
-
+
@@ -32,6 +33,7 @@
@@ -43,6 +45,7 @@
(),
{
optionTab: "params",
diff --git a/packages/hoppscotch-common/src/components/http/URLEncodedParams.vue b/packages/hoppscotch-common/src/components/http/URLEncodedParams.vue
index 9f1418249..3d5505101 100644
--- a/packages/hoppscotch-common/src/components/http/URLEncodedParams.vue
+++ b/packages/hoppscotch-common/src/components/http/URLEncodedParams.vue
@@ -92,6 +92,8 @@
active: param.active,
})
"
+ :auto-complete-env="true"
+ :envs="envs"
/>
()
const emit = defineEmits<{
diff --git a/packages/hoppscotch-common/src/components/http/authorization/ApiKey.vue b/packages/hoppscotch-common/src/components/http/authorization/ApiKey.vue
index fb84ead37..619eed912 100644
--- a/packages/hoppscotch-common/src/components/http/authorization/ApiKey.vue
+++ b/packages/hoppscotch-common/src/components/http/authorization/ApiKey.vue
@@ -4,6 +4,7 @@
v-model="auth.key"
:auto-complete-env="true"
placeholder="Key"
+ :envs="envs"
/>
@@ -11,6 +12,7 @@
v-model="auth.value"
:auto-complete-env="true"
placeholder="Value"
+ :envs="envs"
/>
@@ -73,11 +75,13 @@ import { useI18n } from "@composables/i18n"
import { HoppRESTAuthAPIKey } from "@hoppscotch/data"
import { useVModel } from "@vueuse/core"
import { ref } from "vue"
+import { AggregateEnvironment } from "~/newstore/environments"
const t = useI18n()
const props = defineProps<{
modelValue: HoppRESTAuthAPIKey
+ envs?: AggregateEnvironment[]
}>()
const emit = defineEmits<{
diff --git a/packages/hoppscotch-common/src/components/http/authorization/Basic.vue b/packages/hoppscotch-common/src/components/http/authorization/Basic.vue
index 02e473999..15675efb2 100644
--- a/packages/hoppscotch-common/src/components/http/authorization/Basic.vue
+++ b/packages/hoppscotch-common/src/components/http/authorization/Basic.vue
@@ -4,6 +4,7 @@
v-model="auth.username"
:placeholder="t('authorization.username')"
:auto-complete-env="true"
+ :envs="envs"
/>
@@ -11,6 +12,7 @@
v-model="auth.password"
:placeholder="t('authorization.password')"
:auto-complete-env="true"
+ :envs="envs"
/>
@@ -19,11 +21,13 @@
import { useI18n } from "@composables/i18n"
import { HoppRESTAuthBasic } from "@hoppscotch/data"
import { useVModel } from "@vueuse/core"
+import { AggregateEnvironment } from "~/newstore/environments"
const t = useI18n()
const props = defineProps<{
modelValue: HoppRESTAuthBasic
+ envs?: AggregateEnvironment[]
}>()
const emit = defineEmits<{
diff --git a/packages/hoppscotch-common/src/components/share/CustomizeModal.vue b/packages/hoppscotch-common/src/components/share/CustomizeModal.vue
index 87a6ee85e..87d6e6c98 100644
--- a/packages/hoppscotch-common/src/components/share/CustomizeModal.vue
+++ b/packages/hoppscotch-common/src/components/share/CustomizeModal.vue
@@ -290,7 +290,12 @@ const widgets: Widget[] = [
},
]
-type EmbedTabs = "params" | "bodyParams" | "headers" | "authorization"
+type EmbedTabs =
+ | "params"
+ | "bodyParams"
+ | "headers"
+ | "authorization"
+ | "requestVariables"
type EmbedOption = {
selectedTab: EmbedTabs
diff --git a/packages/hoppscotch-common/src/components/share/Modal.vue b/packages/hoppscotch-common/src/components/share/Modal.vue
index 942e5bc8d..38c0c1b40 100644
--- a/packages/hoppscotch-common/src/components/share/Modal.vue
+++ b/packages/hoppscotch-common/src/components/share/Modal.vue
@@ -56,7 +56,12 @@ import { useI18n } from "~/composables/i18n"
const t = useI18n()
-type EmbedTabs = "params" | "bodyParams" | "headers" | "authorization"
+type EmbedTabs =
+ | "params"
+ | "bodyParams"
+ | "headers"
+ | "authorization"
+ | "requestVariables"
type EmbedOption = {
selectedTab: EmbedTabs
diff --git a/packages/hoppscotch-common/src/components/share/index.vue b/packages/hoppscotch-common/src/components/share/index.vue
index 34fc95967..164318473 100644
--- a/packages/hoppscotch-common/src/components/share/index.vue
+++ b/packages/hoppscotch-common/src/components/share/index.vue
@@ -173,6 +173,11 @@ const embedOptions = ref
({
label: t("tab.authorization"),
enabled: false,
},
+ {
+ value: "requestVariables",
+ label: t("tab.variables"),
+ enabled: false,
+ },
],
theme: "system",
})
@@ -223,7 +228,12 @@ const currentUser = useReadonlyStream(
const step = ref(1)
-type EmbedTabs = "params" | "bodyParams" | "headers" | "authorization"
+type EmbedTabs =
+ | "params"
+ | "bodyParams"
+ | "headers"
+ | "authorization"
+ | "requestVariables"
type EmbedOption = {
selectedTab: EmbedTabs
@@ -369,6 +379,11 @@ const displayCustomizeRequestModal = (
label: t("tab.authorization"),
enabled: false,
},
+ {
+ value: "requestVariables",
+ label: t("tab.variables"),
+ enabled: false,
+ },
],
theme: "system",
}
diff --git a/packages/hoppscotch-common/src/components/share/templates/Embeds.vue b/packages/hoppscotch-common/src/components/share/templates/Embeds.vue
index dfdb6b31c..b2ce645fa 100644
--- a/packages/hoppscotch-common/src/components/share/templates/Embeds.vue
+++ b/packages/hoppscotch-common/src/components/share/templates/Embeds.vue
@@ -28,7 +28,7 @@