Skip to content

Commit

Permalink
Add feature checks to confirm and combine
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Dec 10, 2021
1 parent 34ec02e commit 59bbcec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Combine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ macro only_as_script(ex) skip_as_script(__module__) ? nothing : esc(ex) end
# ╔═╡ 5028fc01-4e14-4550-8ae6-48703b86dc21
import AbstractPlutoDingetjes.Bonds

# ╔═╡ aa3b170e-86fd-42e2-a82e-99e25436c65e
import AbstractPlutoDingetjes

# ╔═╡ ccbe4423-801b-4c20-ad2d-ee89d5cfa859
md"""
# Combining bonds
Expand Down Expand Up @@ -129,6 +132,9 @@ begin
end

function Base.show(io::IO, m::MIME"text/html", cb::CombinedBonds)
if !AbstractPlutoDingetjes.is_supported_by_display(io, Bonds.transform_value)
return Base.show(io, m, HTML("<span>❌ You need to update Pluto to use this PlutoUI element.</span>"))
end
output = @htl("""
<span>
$(cb.display_content)
Expand Down Expand Up @@ -523,6 +529,7 @@ end
# ╟─dadf2f40-1764-47a4-b560-683b6479d77f
# ╠═1b737805-a411-4585-b215-d0f99eafac0c
# ╠═5028fc01-4e14-4550-8ae6-48703b86dc21
# ╠═aa3b170e-86fd-42e2-a82e-99e25436c65e
# ╟─ccbe4423-801b-4c20-ad2d-ee89d5cfa859
# ╠═ad5cffa5-313c-4de9-9360-005365b40780
# ╠═a20da18f-7a74-43ca-9b66-1f3b82efa0c3
Expand Down
7 changes: 7 additions & 0 deletions src/Confirm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ macro only_as_script(ex) skip_as_script(__module__) ? nothing : esc(ex) end
# ╔═╡ 5028fc01-4e14-4550-8ae6-48703b86dc21
import AbstractPlutoDingetjes.Bonds

# ╔═╡ e9d5e84d-b6b1-434d-9580-c08b0c45b9dd
import AbstractPlutoDingetjes

# ╔═╡ ccbe4423-801b-4c20-ad2d-ee89d5cfa859
md"""
# Holding intermediate updates
Expand Down Expand Up @@ -127,6 +130,9 @@ begin
end

function Base.show(io::IO, m::MIME"text/html", cb::ConfirmBond)
if !AbstractPlutoDingetjes.is_supported_by_display(io, Bonds.transform_value)
return Base.show(io, m, HTML("<span>❌ You need to update Pluto to use this PlutoUI element.</span>"))
end
output = @htl("""
<span>
$(cb.element)
Expand Down Expand Up @@ -356,6 +362,7 @@ end
# ╟─dadf2f40-1764-47a4-b560-683b6479d77f
# ╠═1b737805-a411-4585-b215-d0f99eafac0c
# ╠═5028fc01-4e14-4550-8ae6-48703b86dc21
# ╠═e9d5e84d-b6b1-434d-9580-c08b0c45b9dd
# ╟─ccbe4423-801b-4c20-ad2d-ee89d5cfa859
# ╠═ad5cffa5-313c-4de9-9360-005365b40780
# ╠═a20da18f-7a74-43ca-9b66-1f3b82efa0c3
Expand Down

0 comments on commit 59bbcec

Please sign in to comment.