fix: proper toast for actions on environments - resolved #2279
This commit is contained in:
@@ -255,13 +255,14 @@ const saveEnvironment = () => {
|
|||||||
variables: vars.value,
|
variables: vars.value,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.editingEnvironmentIndex === null) return
|
|
||||||
if (props.editingEnvironmentIndex === "Global")
|
if (props.editingEnvironmentIndex === "Global")
|
||||||
setGlobalEnvVariables(environmentUpdated.variables)
|
setGlobalEnvVariables(environmentUpdated.variables)
|
||||||
else if (props.action === "new") {
|
else if (props.action === "new") {
|
||||||
updateEnvironment(envList.value.length - 1, environmentUpdated)
|
updateEnvironment(envList.value.length - 1, environmentUpdated)
|
||||||
|
toast.success(`${t("environment.created")}`)
|
||||||
} else {
|
} else {
|
||||||
updateEnvironment(props.editingEnvironmentIndex!, environmentUpdated)
|
updateEnvironment(props.editingEnvironmentIndex!, environmentUpdated)
|
||||||
|
toast.success(`${t("environment.updated")}`)
|
||||||
}
|
}
|
||||||
hideModal()
|
hideModal()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,6 +171,7 @@
|
|||||||
"environment": {
|
"environment": {
|
||||||
"add_to_global": "Add to Global",
|
"add_to_global": "Add to Global",
|
||||||
"added": "Environment addition",
|
"added": "Environment addition",
|
||||||
|
"created": "Environment created",
|
||||||
"create_new": "Create new environment",
|
"create_new": "Create new environment",
|
||||||
"deleted": "Environment deletion",
|
"deleted": "Environment deletion",
|
||||||
"edit": "Edit Environment",
|
"edit": "Edit Environment",
|
||||||
@@ -181,7 +182,7 @@
|
|||||||
"no_environment_description": "No environments were selected. Choose what to do with the following variables.",
|
"no_environment_description": "No environments were selected. Choose what to do with the following variables.",
|
||||||
"select": "Select environment",
|
"select": "Select environment",
|
||||||
"title": "Environments",
|
"title": "Environments",
|
||||||
"updated": "Environment updation",
|
"updated": "Environment updated",
|
||||||
"variable_list": "Variable List"
|
"variable_list": "Variable List"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
|
|||||||
Reference in New Issue
Block a user