Rev900, Sidebar filestats bar width round fix, Sidebar WebGL not supported error, Sidebar optimalizations, Trayicon gray shadow, Trim end of line whitespace from json files, Fix testweb testcase, Implement experimental postMessage nonce security, Return None when testing external ip, Window opener security check and message, Increase timeout for large files

This commit is contained in:
HelloZeroNet 2016-02-10 02:30:04 +01:00
parent 018c6f7075
commit 61cfb8aa2f
17 changed files with 121 additions and 39 deletions

View file

@ -320,10 +320,14 @@ class Sidebar extends Class
@globe.addData( globe_data, {format: 'magnitude', name: "hello", animated: false} )
@globe.createPoints()
else
@globe = new DAT.Globe( @tag.find(".globe")[0], {"imgDir": "/uimedia/globe/"} )
@globe.addData( globe_data, {format: 'magnitude', name: "hello"} )
@globe.createPoints()
@globe.animate()
try
@globe = new DAT.Globe( @tag.find(".globe")[0], {"imgDir": "/uimedia/globe/"} )
@globe.addData( globe_data, {format: 'magnitude', name: "hello"} )
@globe.createPoints()
@globe.animate()
catch e
@tag.find(".globe").addClass("error").text("WebGL not supported")
@tag.find(".globe").removeClass("loading")
@ -334,5 +338,7 @@ class Sidebar extends Class
@globe = null
window.sidebar = new Sidebar()
setTimeout ( ->
window.sidebar = new Sidebar()
), 500
window.transitionEnd = 'transitionend webkitTransitionEnd oTransitionEnd otransitionend'

View file

@ -96,4 +96,5 @@
/* Globe */
.globe { width: 360px; height: 360px }
.globe.loading { background: url(/uimedia/img/loading-circle.gif) center center no-repeat }
.globe.loading { background: url(/uimedia/img/loading-circle.gif) center center no-repeat }
.globe.error { text-align: center; padding-top: 156px; box-sizing: border-box; opacity: 0.2; }

View file

@ -150,4 +150,5 @@
/* Globe */
.globe { width: 360px; height: 360px }
.globe.loading { background: url(/uimedia/img/loading-circle.gif) center center no-repeat }
.globe.loading { background: url(/uimedia/img/loading-circle.gif) center center no-repeat }
.globe.error { text-align: center; padding-top: 156px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box ; opacity: 0.2; }

View file

@ -521,6 +521,7 @@ window.initScrollable = function () {
Sidebar.prototype.displayGlobe = function() {
return wrapper.ws.cmd("sidebarGetPeers", [], (function(_this) {
return function(globe_data) {
var e;
if (_this.globe) {
_this.globe.scene.remove(_this.globe.points);
_this.globe.addData(globe_data, {
@ -530,15 +531,20 @@ window.initScrollable = function () {
});
_this.globe.createPoints();
} else {
_this.globe = new DAT.Globe(_this.tag.find(".globe")[0], {
"imgDir": "/uimedia/globe/"
});
_this.globe.addData(globe_data, {
format: 'magnitude',
name: "hello"
});
_this.globe.createPoints();
_this.globe.animate();
try {
_this.globe = new DAT.Globe(_this.tag.find(".globe")[0], {
"imgDir": "/uimedia/globe/"
});
_this.globe.addData(globe_data, {
format: 'magnitude',
name: "hello"
});
_this.globe.createPoints();
_this.globe.animate();
} catch (_error) {
e = _error;
_this.tag.find(".globe").addClass("error").text("WebGL not supported");
}
}
return _this.tag.find(".globe").removeClass("loading");
};
@ -557,7 +563,9 @@ window.initScrollable = function () {
})(Class);
window.sidebar = new Sidebar();
setTimeout((function() {
return window.sidebar = new Sidebar();
}), 500);
window.transitionEnd = 'transitionend webkitTransitionEnd oTransitionEnd otransitionend';