diff --git a/packages/hoppscotch-common/src/components/environments/Selector.vue b/packages/hoppscotch-common/src/components/environments/Selector.vue index 29895728..b468f9c7 100644 --- a/packages/hoppscotch-common/src/components/environments/Selector.vue +++ b/packages/hoppscotch-common/src/components/environments/Selector.vue @@ -35,7 +35,6 @@ :placeholder="`${t('action.search')}`" :context-menu-enabled="false" class="border border-dividerDark focus:border-primaryDark rounded" - :readonly="isFilterInputDisabled" /> { invokeAction("modals.global.environment.update", {}) } -// Filter input disabled if no environments are available -const isFilterInputDisabled = computed(() => { - if (selectedEnvTab.value === "my-environments") { - return myEnvironments.value.length === 0 - } - return teamEnvironmentList.value.length === 0 -}) - const editEnv = () => { if (selectedEnv.value.type === "MY_ENV" && selectedEnv.value.name) { invokeAction("modals.my.environment.edit", { diff --git a/packages/hoppscotch-common/src/components/environments/my/index.vue b/packages/hoppscotch-common/src/components/environments/my/index.vue index 0672fe33..e0f725f3 100644 --- a/packages/hoppscotch-common/src/components/environments/my/index.vue +++ b/packages/hoppscotch-common/src/components/environments/my/index.vue @@ -6,7 +6,6 @@ autocomplete="off" class="flex w-full bg-transparent px-4 py-2 h-8 border-b border-dividerLight" :placeholder="t('action.search')" - :disabled="!environments.length" />
{ secretVariables ) + currentEnvironmentValueService.addEnvironment( + editingID.value, + nonSecretVariables + ) + // If the user is a viewer, we don't need to update the environment in BE - // just update the secret environment in the local storage + // just update the secret environment and current environment in the local storage if (props.isViewer) { hideModal() toast.success(`${t("environment.updated")}`) @@ -521,12 +530,6 @@ const saveEnvironment = async () => { toast.success(`${t("environment.updated")}`) isLoading.value = false - if (editingID.value) { - currentEnvironmentValueService.addEnvironment( - editingID.value, - nonSecretVariables - ) - } } ) )() diff --git a/packages/hoppscotch-common/src/components/environments/teams/index.vue b/packages/hoppscotch-common/src/components/environments/teams/index.vue index eb1d32ce..2c1c4add 100644 --- a/packages/hoppscotch-common/src/components/environments/teams/index.vue +++ b/packages/hoppscotch-common/src/components/environments/teams/index.vue @@ -6,7 +6,7 @@ autocomplete="off" class="flex w-full bg-transparent px-4 py-2 h-8 border-b border-dividerLight" :placeholder="t('action.search')" - :disabled="loading || !teamEnvironments.length" + :disabled="loading" />