From 427a1811a5680f82be7fb19156fae5fe2f259813 Mon Sep 17 00:00:00 2001 From: Nivedin <53208152+nivedin@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:32:37 +0530 Subject: [PATCH] chore: resolve global env in team env and tooltip UI update (#5187) --- .../hoppscotch-common/assets/scss/styles.scss | 3 +- packages/hoppscotch-common/locales/en.json | 2 + .../src/components/environments/Selector.vue | 34 +++- .../components/environments/teams/Details.vue | 11 +- .../src/components/smart/EnvInput.vue | 16 +- .../editor/extensions/HoppEnvironment.ts | 163 +++++++++++++----- .../extensions/HoppPredefinedVariables.ts | 55 ++++-- .../src/newstore/environments.ts | 116 ++++++++----- .../__tests__/environment.inspector.spec.ts | 2 +- .../inspectors/environment.inspector.ts | 20 ++- .../hoppscotch-data/src/environment/index.ts | 16 +- 11 files changed, 303 insertions(+), 135 deletions(-) diff --git a/packages/hoppscotch-common/assets/scss/styles.scss b/packages/hoppscotch-common/assets/scss/styles.scss index f906ef2f..671359d0 100644 --- a/packages/hoppscotch-common/assets/scss/styles.scss +++ b/packages/hoppscotch-common/assets/scss/styles.scss @@ -158,7 +158,6 @@ a { @apply shadow-none #{!important}; @apply fixed; @apply inline-flex; - @apply -mt-7; } } @@ -169,7 +168,7 @@ a { @apply shadow; .tippy-content { - @apply flex; + @apply flex flex-col; @apply text-tiny text-primary; @apply font-semibold; @apply px-2 py-1; diff --git a/packages/hoppscotch-common/locales/en.json b/packages/hoppscotch-common/locales/en.json index d267068f..0e40de01 100644 --- a/packages/hoppscotch-common/locales/en.json +++ b/packages/hoppscotch-common/locales/en.json @@ -407,12 +407,14 @@ "added": "Environment addition", "create_new": "Create new environment", "created": "Environment created", + "current_value": "Current value", "deleted": "Environment deletion", "duplicated": "Environment duplicated", "edit": "Edit Environment", "empty_variables": "No variables", "global": "Global", "global_variables": "Global variables", + "initial_value": "Initial value", "import_or_create": "Import or create a environment", "invalid_name": "Please provide a name for the environment", "list": "Environment variables", diff --git a/packages/hoppscotch-common/src/components/environments/Selector.vue b/packages/hoppscotch-common/src/components/environments/Selector.vue index b468f9c7..66692ff7 100644 --- a/packages/hoppscotch-common/src/components/environments/Selector.vue +++ b/packages/hoppscotch-common/src/components/environments/Selector.vue @@ -239,9 +239,14 @@ {{ t("environment.name") }} - {{ t("environment.value") }} + {{ t("environment.initial_value") }} + + + {{ t("environment.current_value") }}
{{ variable.key }} - + + + + +