chore: add env autocomplete to components

This commit is contained in:
nivedin
2024-02-19 21:24:17 +05:30
committed by Andrew Bastin
parent 7685409ee6
commit fb615d2d2b
7 changed files with 40 additions and 6 deletions

View File

@@ -169,7 +169,11 @@
</div>
<div v-if="auth.authType === 'bearer'">
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput v-model="auth.token" placeholder="Token" />
<SmartEnvInput
v-model="auth.token"
placeholder="Token"
:auto-complete-env="true"
/>
</div>
</div>
<div v-if="auth.authType === 'oauth-2'">

View File

@@ -92,6 +92,7 @@
:auto-complete-source="commonHeaders"
:env-index="index"
:inspection-results="getInspectorResult(headerKeyResults, index)"
:auto-complete-env="true"
@change="
updateHeader(index, {
id: header.id,
@@ -108,6 +109,7 @@
getInspectorResult(headerValueResults, index)
"
:env-index="index"
:auto-complete-env="true"
@change="
updateHeader(index, {
id: header.id,

View File

@@ -6,6 +6,7 @@
:styles="
hasAccessTokenOrAuthURL ? 'pointer-events-none opacity-70' : ''
"
:auto-complete-env="true"
placeholder="OpenID Connect Discovery URL"
/>
</div>
@@ -13,6 +14,7 @@
<SmartEnvInput
v-model="authURL"
placeholder="Authorization URL"
:auto-complete-env="true"
:styles="hasOIDCURL ? 'pointer-events-none opacity-70' : ''"
></SmartEnvInput>
</div>
@@ -20,17 +22,30 @@
<SmartEnvInput
v-model="accessTokenURL"
placeholder="Access Token URL"
:auto-complete-env="true"
:styles="hasOIDCURL ? 'pointer-events-none opacity-70' : ''"
/>
</div>
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput v-model="clientID" placeholder="Client ID" />
<SmartEnvInput
v-model="clientID"
:auto-complete-env="true"
placeholder="Client ID"
/>
</div>
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput v-model="clientSecret" placeholder="Client Secret" />
<SmartEnvInput
v-model="clientSecret"
:auto-complete-env="true"
placeholder="Client Secret"
/>
</div>
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput v-model="scope" placeholder="Scope" />
<SmartEnvInput
v-model="scope"
:auto-complete-env="true"
placeholder="Scope"
/>
</div>
<div class="p-2">
<HoppButtonSecondary

View File

@@ -87,6 +87,7 @@
:inspection-results="
getInspectorResult(parameterKeyResults, index)
"
:auto-complete-env="true"
@change="
updateParam(index, {
id: param.id,
@@ -102,6 +103,7 @@
:inspection-results="
getInspectorResult(parameterValueResults, index)
"
:auto-complete-env="true"
@change="
updateParam(index, {
id: param.id,

View File

@@ -56,6 +56,7 @@
v-model="tab.document.request.endpoint"
:placeholder="`${t('request.url')}`"
:auto-complete-source="userHistories"
:auto-complete-env="true"
:inspection-results="tabResults"
@paste="onPasteUrl($event)"
@enter="newSendRequest"

View File

@@ -1,9 +1,17 @@
<template>
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput v-model="auth.key" placeholder="Key" />
<SmartEnvInput
v-model="auth.key"
:auto-complete-env="true"
placeholder="Key"
/>
</div>
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput v-model="auth.value" placeholder="Value" />
<SmartEnvInput
v-model="auth.value"
:auto-complete-env="true"
placeholder="Value"
/>
</div>
<div class="flex items-center border-b border-dividerLight">
<span class="flex items-center">

View File

@@ -3,12 +3,14 @@
<SmartEnvInput
v-model="auth.username"
:placeholder="t('authorization.username')"
:auto-complete-env="true"
/>
</div>
<div class="flex flex-1 border-b border-dividerLight">
<SmartEnvInput
v-model="auth.password"
:placeholder="t('authorization.password')"
:auto-complete-env="true"
/>
</div>
</template>