Skip to content

Commit

Permalink
disable sandbox in window generation + Kaleido_jll step back
Browse files Browse the repository at this point in the history
  • Loading branch information
Stockless committed Feb 11, 2025
1 parent e208255 commit c0ce80e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 18 deletions.
2 changes: 2 additions & 0 deletions KomaMRIPlots/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version = "0.9.0"

[deps]
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
Kaleido_jll = "f7e6163d-2fa5-5f23-b69c-1db539e41963"
KomaMRIBase = "d0bc0b20-b151-4d03-b2a4-6ca51751cb9c"
MAT = "23992714-dd62-5051-b70f-ba57cb901cac"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
Expand All @@ -19,6 +20,7 @@ KomaPlotsPlutoPlotlyExt = "PlutoPlotly"

[compat]
Interpolations = "0.13, 0.14, 0.15"
Kaleido_jll = "0.2.1"
KomaMRIBase = "0.9"
MAT = "0.10"
PlotlyJS = "0.18"
Expand Down
2 changes: 1 addition & 1 deletion src/KomaMRI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ include("KomaUI.jl")
# Export the UI and the observables
export KomaUI
export sys_ui, seq_ui, obj_ui, raw_ui, img_ui
export @unsafe_blink


end
16 changes: 0 additions & 16 deletions src/KomaUI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -327,19 +327,3 @@ function update_blink_window_progress!(w::Window, block, Nblocks)
return nothing
end

macro unsafe_blink() # https://github.com/JuliaGizmos/Blink.jl/issues/325#issuecomment-2252670794
return @eval AtomShell begin
function init(; debug = false)
electron() # Check path exists
p, dp = port(), port()
debug && inspector(dp)
dbg = debug ? "--debug=$dp" : []
proc = (debug ? run_rdr : run)(
`$(electron()) --no-sandbox $dbg $mainjs port $p`; wait=false)
conn = try_connect(ip"127.0.0.1", p)
shell = Electron(proc, conn)
initcbs(shell)
return shell
end
end
end
1 change: 1 addition & 0 deletions src/ui/ExportUIFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function setup_blink_window(; darkmode=true, frame=true, dev_tools=false, show_w
"width" => 1200,
"height" => 800,
:show => show_window,
"webPreferences" => Dict("sandbox" => false) # Disable sandbox
);
async=false,
)
Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ end
using Blink
# Opens KomaUI

@unsafe_blink
w = KomaUI(return_window=true)
@testset "Open UI" begin
@test "index" == @js w document.getElementById("content").dataset.content
Expand Down

0 comments on commit c0ce80e

Please sign in to comment.