Skip to content

Commit

Permalink
Merge branch 'branches/rudder/8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins CI committed Sep 27, 2023
2 parents 0d537a5 + de60cc6 commit 65498c3
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,16 @@ update msg model =
ui = model.ui
editedProperties = ui.editedProperties
|> Dict.remove key
successMsg = ("property '" ++ (String.trim property.name) ++ "' has been updated")

(successMsg, updatedProperty) =
if (property.value == key) then
("property '" ++ (String.trim property.name) ++ "' has been updated", [property])
else
( "property '" ++ (String.trim key) ++ "' has been updated and renamed to '" ++ (String.trim property.name) ++ "'", [property, {property | name = key, value = ""} ] )
updatedModel = { model | ui = {ui | editedProperties = editedProperties} }
(newModel, cmd) = if save then -- If we want to save changes
case property.format of
StringFormat -> (updatedModel, saveProperty [property] model successMsg)
StringFormat -> (updatedModel, saveProperty updatedProperty model successMsg)
JsonFormat ->
let
checkJsonFormat = Json.Decode.decodeString Json.Decode.value property.value
Expand All @@ -138,8 +143,8 @@ update msg model =

else
(updatedModel, Cmd.none)
in
(newModel, cmd)
in
(newModel, cmd)
else
let
ui = model.ui
Expand Down

0 comments on commit 65498c3

Please sign in to comment.