Skip to content

Commit

Permalink
Reverted window async.
Browse files Browse the repository at this point in the history
  • Loading branch information
cncastillo committed Nov 15, 2023
1 parent 1c25d4a commit ebceb48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/ui/ExportUIFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function setup_blink_window(; darkmode=true, frame=true, dev_tools=false, show_w
# User defined JS and CSS
customcss = joinpath(css,"custom.css")
customjs = joinpath(scripts,"custom.js")
customjs2 = joinpath(scripts,"custom2.js")
sidebarcss = joinpath(css,"sidebars.css")
# Custom icons
icons = joinpath(css,"icons.css")
Expand All @@ -40,13 +39,15 @@ function setup_blink_window(; darkmode=true, frame=true, dev_tools=false, show_w
"height"=>800,
"webPreferences"=>Dict("devTools"=>dev_tools),
:show=>show_window
), async=true);
), async=false);

## NAV BAR
sidebar = open(f->read(f, String), komamri_src_ui*"/html/sidebar.html")
sidebar = replace(sidebar, "LOGO"=>logo)
## CONTENT
index = open(f->read(f, String), komamri_src_ui*"/html/index.html")
index = replace(index, "ICON"=>home_image)

@sync begin
## CSS
loadcss!(w, bscss)
Expand All @@ -61,13 +62,12 @@ function setup_blink_window(; darkmode=true, frame=true, dev_tools=false, show_w
loadjs!(w, customjs) #must be before jquery
loadjs!(w, jquery)
loadjs!(w, bsjs) #after jquery
loadjs!(w, customjs2) #must be after jquery
# LOAD ICONS
loadcss!(w, icons)
end

#Update GUI's home
w = body!(w, *(sidebar, index), async=false) #async false is important to set the background correctly
body!(w, *(sidebar, index), async=false) #async false is important to set the background correctly
if darkmode
@js_ w document.getElementById("main").style="background-color:rgb(13,16,17);"
end
Expand Down
2 changes: 1 addition & 1 deletion src/ui/html/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="d-flex h-100 text-center text-white bg-image" data-new-gr-c-s-check-loaded="14.1050.0" data-gr-ext-installed="" style="background-image: url('BACKGROUND_IMAGE');">
<div class="d-flex h-100 text-center text-white bg-image" data-new-gr-c-s-check-loaded="14.1050.0" data-gr-ext-installed=""> <!-- style="background-image: url('BACKGROUND_IMAGE');"> -->
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column mask">
<div class="mb-auto ">
</div>
Expand Down
9 changes: 0 additions & 9 deletions src/ui/scripts/custom2.js

This file was deleted.

0 comments on commit ebceb48

Please sign in to comment.