Also display progress bar for other sites
This commit is contained in:
parent
687208a785
commit
10b46db524
1 changed files with 5 additions and 3 deletions
|
@ -63,6 +63,7 @@ class Wrapper
|
||||||
@sendInner message # Pass to inner frame
|
@sendInner message # Pass to inner frame
|
||||||
if message.params.address == @address # Current page
|
if message.params.address == @address # Current page
|
||||||
@setSiteInfo message.params
|
@setSiteInfo message.params
|
||||||
|
@updateProgress message.params
|
||||||
else if cmd == "error"
|
else if cmd == "error"
|
||||||
@notifications.add("notification-#{message.id}", "error", message.params, 0)
|
@notifications.add("notification-#{message.id}", "error", message.params, 0)
|
||||||
else if cmd == "updating" # Close connection
|
else if cmd == "updating" # Close connection
|
||||||
|
@ -388,14 +389,15 @@ class Wrapper
|
||||||
if @loading.screen_visible and @inner_loaded and site_info.settings.size < site_info.size_limit*1024*1024 and site_info.settings.size > 0 # Loading screen still visible, but inner loaded
|
if @loading.screen_visible and @inner_loaded and site_info.settings.size < site_info.size_limit*1024*1024 and site_info.settings.size > 0 # Loading screen still visible, but inner loaded
|
||||||
@loading.hideScreen()
|
@loading.hideScreen()
|
||||||
|
|
||||||
|
@site_info = site_info
|
||||||
|
@event_site_info.resolve()
|
||||||
|
|
||||||
|
updateProgress: (site_info) ->
|
||||||
if site_info.tasks > 0 and site_info.started_task_num > 0
|
if site_info.tasks > 0 and site_info.started_task_num > 0
|
||||||
@loading.setProgress 1-(site_info.tasks / site_info.started_task_num)
|
@loading.setProgress 1-(site_info.tasks / site_info.started_task_num)
|
||||||
else
|
else
|
||||||
@loading.hideProgress()
|
@loading.hideProgress()
|
||||||
|
|
||||||
@site_info = site_info
|
|
||||||
@event_site_info.resolve()
|
|
||||||
|
|
||||||
|
|
||||||
toHtmlSafe: (values) ->
|
toHtmlSafe: (values) ->
|
||||||
if values not instanceof Array then values = [values] # Convert to array if its not
|
if values not instanceof Array then values = [values] # Convert to array if its not
|
||||||
|
|
Loading…
Reference in a new issue