fix: proper toast for actions on environments - resolved #2279

This commit is contained in:
liyasthomas
2022-04-22 11:40:47 +05:30
parent 2452b1be4b
commit bf97d8811c
2 changed files with 4 additions and 2 deletions

View File

@@ -255,13 +255,14 @@ const saveEnvironment = () => {
variables: vars.value,
}
if (props.editingEnvironmentIndex === null) return
if (props.editingEnvironmentIndex === "Global")
setGlobalEnvVariables(environmentUpdated.variables)
else if (props.action === "new") {
updateEnvironment(envList.value.length - 1, environmentUpdated)
toast.success(`${t("environment.created")}`)
} else {
updateEnvironment(props.editingEnvironmentIndex!, environmentUpdated)
toast.success(`${t("environment.updated")}`)
}
hideModal()
}

View File

@@ -171,6 +171,7 @@
"environment": {
"add_to_global": "Add to Global",
"added": "Environment addition",
"created": "Environment created",
"create_new": "Create new environment",
"deleted": "Environment deletion",
"edit": "Edit Environment",
@@ -181,7 +182,7 @@
"no_environment_description": "No environments were selected. Choose what to do with the following variables.",
"select": "Select environment",
"title": "Environments",
"updated": "Environment updation",
"updated": "Environment updated",
"variable_list": "Variable List"
},
"error": {