Peer number get bugfix, Loading screen always wait for filedone event
This commit is contained in:
parent
fa7164a0f0
commit
655607466c
3 changed files with 4 additions and 7 deletions
|
@ -174,7 +174,7 @@ class UiWebsocket:
|
|||
"size_limit": site.getSizeLimit(),
|
||||
"next_size_limit": site.getNextSizeLimit(),
|
||||
"last_downloads": len(site.last_downloads),
|
||||
"peers": site.settings["peers"],
|
||||
"peers": site.settings.get("peers", len(site.peers)),
|
||||
"tasks": len([task["inner_path"] for task in site.worker_manager.tasks]),
|
||||
"content": content
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ class Wrapper
|
|||
@log "onLoad"
|
||||
@inner_loaded = true
|
||||
if not @inner_ready then @sendInner {"cmd": "wrapperReady"} # Inner frame loaded before wrapper
|
||||
if not @site_error then @loading.hideScreen() # Hide loading screen
|
||||
#if not @site_error then @loading.hideScreen() # Hide loading screen
|
||||
if window.location.hash then $("#inner-iframe")[0].src += window.location.hash # Hash tag
|
||||
if @ws.ws.readyState == 1 and not @site_info # Ws opened
|
||||
@reloadSiteInfo()
|
||||
|
@ -226,7 +226,7 @@ class Wrapper
|
|||
@site_error = "No peers found"
|
||||
@loading.printLine "No peers found"
|
||||
|
||||
if not @site_info and $("#inner-iframe").attr("src").indexOf("?") == -1 # First site info and mainpage
|
||||
if not @site_info and not @loading.screen_visible and $("#inner-iframe").attr("src").indexOf("?") == -1 # First site info and mainpage
|
||||
if site_info.size_limit < site_info.next_size_limit # Need upgrade soon
|
||||
@wrapperConfirm "Running out of size limit (#{(site_info.settings.size/1024/1024).toFixed(1)}MB/#{site_info.size_limit}MB)", "Set limit to #{site_info.next_size_limit}MB", =>
|
||||
@ws.cmd "siteSetLimit", [site_info.next_size_limit], (res) =>
|
||||
|
|
|
@ -943,9 +943,6 @@ jQuery.extend( jQuery.easing,
|
|||
"cmd": "wrapperReady"
|
||||
});
|
||||
}
|
||||
if (!this.site_error) {
|
||||
this.loading.hideScreen();
|
||||
}
|
||||
if (window.location.hash) {
|
||||
$("#inner-iframe")[0].src += window.location.hash;
|
||||
}
|
||||
|
@ -1020,7 +1017,7 @@ jQuery.extend( jQuery.easing,
|
|||
this.loading.printLine("No peers found");
|
||||
}
|
||||
}
|
||||
if (!this.site_info && $("#inner-iframe").attr("src").indexOf("?") === -1) {
|
||||
if (!this.site_info && !this.loading.screen_visible && $("#inner-iframe").attr("src").indexOf("?") === -1) {
|
||||
if (site_info.size_limit < site_info.next_size_limit) {
|
||||
this.wrapperConfirm("Running out of size limit (" + ((site_info.settings.size / 1024 / 1024).toFixed(1)) + "MB/" + site_info.size_limit + "MB)", "Set limit to " + site_info.next_size_limit + "MB", (function(_this) {
|
||||
return function() {
|
||||
|
|
Loading…
Reference in a new issue