feat: promote environment aware input to stable

This commit is contained in:
liyasthomas
2021-10-14 13:00:32 +05:30
parent 3f513f2f4d
commit c1ec5dc60d
9 changed files with 18 additions and 208 deletions

View File

@@ -55,7 +55,6 @@
class="divide-x divide-dividerLight border-b border-dividerLight flex"
>
<SmartEnvInput
v-if="EXPERIMENTAL_URL_BAR_ENABLED"
v-model="param.key"
:placeholder="`${$t('count.parameter', { count: index + 1 })}`"
styles="
@@ -73,25 +72,7 @@
})
"
/>
<input
v-else
class="bg-transparent flex flex-1 py-2 px-4"
:placeholder="`${$t('count.parameter', {
count: index + 1,
})}`"
:name="'param' + index"
:value="param.key"
autofocus
@change="
updateParam(index, {
key: $event.target.value,
value: param.value,
active: param.active,
})
"
/>
<SmartEnvInput
v-if="EXPERIMENTAL_URL_BAR_ENABLED"
v-model="param.value"
:placeholder="`${$t('count.value', { count: index + 1 })}`"
styles="
@@ -109,20 +90,6 @@
})
"
/>
<input
v-else
class="bg-transparent flex flex-1 py-2 px-4"
:placeholder="`${$t('count.value', { count: index + 1 })}`"
:name="'value' + index"
:value="param.value"
@change="
updateParam(index, {
key: param.key,
value: $event.target.value,
active: param.active,
})
"
/>
<span>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
@@ -197,7 +164,6 @@ import {
deleteAllRESTParams,
setRESTParams,
} from "~/newstore/RESTSession"
import { useSetting } from "~/newstore/settings"
import "codemirror/mode/yaml/yaml"
const {
@@ -266,6 +232,4 @@ const deleteParam = (index: number) => {
const clearContent = () => {
deleteAllRESTParams()
}
const EXPERIMENTAL_URL_BAR_ENABLED = useSetting("EXPERIMENTAL_URL_BAR_ENABLED")
</script>