Skip to content

Commit

Permalink
New reactive API (thank you @hhaensel!) - v0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
essenciary committed Apr 20, 2021
1 parent 8549285 commit aaf014f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Stipple"
uuid = "4acbeb90-81a0-11ea-1966-bdaff8155998"
authors = ["Adrian <[email protected]>"]
version = "0.10.1"
version = "0.11.0"

[deps]
FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f"
Expand Down
20 changes: 9 additions & 11 deletions src/Elements.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,16 @@ function vue_integration(model::M; vue_app_name::String, endpoint::String, chann

,

join([Stipple.watch(vue_app_name, field, channel, debounce, model)
join([Stipple.watch(vue_app_name, field, channel, debounce, model)
for field in fieldnames(typeof(model))
if !(
occursin(Stipple.SETTINGS.readonly_pattern, String(field)) ||
occursin(Stipple.SETTINGS.readonly_pattern, String(field)) ||
occursin(Stipple.SETTINGS.private_pattern, String(field)) ||
getfield(model, field) isa Reactive &&
getfield(model, field) isa Reactive &&
(getfield(model, field).r_mode != PUBLIC || getfield(model, field).no_frontend_watcher)
)
])

,

"""
Expand All @@ -135,19 +135,17 @@ function vue_integration(model::M; vue_app_name::String, endpoint::String, chann
if (payload.key) {
window.$(vue_app_name).revive_payload(payload)
window.$(vue_app_name).updateField(payload.key, payload.value);
}
}
window.onload = function() {
console.log("Loading completed");
$vue_app_name.\$forceUpdate();
}
window.onload = function() {
console.log("Loading completed");
$vue_app_name.\$forceUpdate();
}
"""
) |> repr


output[2:prevind(output, lastindex(output))]
end

Expand Down
2 changes: 1 addition & 1 deletion src/Stipple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ function convertvalue(targetfield::Any, value)
Base.parse(valtype, value)
end
catch ex
@error ex
# @error ex
value
end
end
Expand Down

2 comments on commit aaf014f

@essenciary
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/34767

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.11.0 -m "<description of version>" aaf014f595a649b11270df370ae5699656d7d6a4
git push origin v0.11.0

Please sign in to comment.