version 0.3.0, rev187, Trusted authorization sites support, --publish option on signing, cryptSign command line option, OpenSSL enabled on OSX, Crypto verify allows list of valid addresses, Option for version 2 json DB tables, DbCursor SELECT parameters bugfix, Add peer to site on ListModified, Download blind includes when new site added, Publish command better messages, Multi-threaded announce, New http Torrent trackers, Wait for dbschema.json on query, Handle json import errors, More compact writeJson storage command, Testcase for signing and verifying, Workaround to make non target=_top links work, More clean UiWebsocket command route, Send cert_user_id on siteinfo, Notify other local clients on local file modify, Option to wait for file download before sql query, File rules websocket API command, Cert add and select, set websocket API command, Put focus on innerframe, innerloaded wrapper api command to add hashtag, Allow more file error on big sites, Keep worker running after stuked on done task, New more stable openSSL layer that works on OSX, Noparallel parameter bugfix, RateLimit allowed again interval bugfix, Updater skips non-writeable files, Try to close openssl dll before update
This commit is contained in:
parent
c874726aba
commit
7e4f6bd38e
33 changed files with 1716 additions and 595 deletions
|
@ -13,7 +13,6 @@ class Notifications
|
|||
|
||||
|
||||
add: (id, type, body, timeout=0) ->
|
||||
@log id, type, body, timeout
|
||||
# Close notifications with same id
|
||||
for elem in $(".notification-#{id}")
|
||||
@close $(elem)
|
||||
|
@ -55,15 +54,14 @@ class Notifications
|
|||
elem.animate({"width": width}, 700, "easeInOutCubic")
|
||||
$(".body", elem).cssLater("box-shadow", "0px 0px 5px rgba(0,0,0,0.1)", 1000)
|
||||
|
||||
# Close button
|
||||
$(".close", elem).on "click", =>
|
||||
# Close button or Confirm button
|
||||
$(".close, .button", elem).on "click", =>
|
||||
@close elem
|
||||
return false
|
||||
|
||||
# Close on button click within body (confirm dialog)
|
||||
$(".button", elem).on "click", =>
|
||||
# Select list
|
||||
$(".select", elem).on "click", =>
|
||||
@close elem
|
||||
return false
|
||||
|
||||
|
||||
close: (elem) ->
|
||||
|
|
|
@ -30,6 +30,12 @@ class Wrapper
|
|||
if window.location.hash
|
||||
src = $("#inner-iframe").attr("src").replace(/#.*/, "")+window.location.hash
|
||||
$("#inner-iframe").attr("src", src)
|
||||
|
||||
###setInterval (->
|
||||
console.log document.hasFocus()
|
||||
), 1000###
|
||||
$("#inner-iframe").focus()
|
||||
|
||||
@
|
||||
|
||||
|
||||
|
@ -67,6 +73,10 @@ class Wrapper
|
|||
if @ws.ws.readyState == 1 and not @wrapperWsInited # If ws already opened
|
||||
@sendInner {"cmd": "wrapperOpenedWebsocket"}
|
||||
@wrapperWsInited = true
|
||||
else if cmd == "innerLoaded"
|
||||
if window.location.hash
|
||||
$("#inner-iframe")[0].src += window.location.hash # Hash tag
|
||||
@log "Added hash to location", $("#inner-iframe")[0].src
|
||||
else if cmd == "wrapperNotification" # Display notification
|
||||
@actionNotification(message)
|
||||
else if cmd == "wrapperConfirm" # Display confirm message
|
||||
|
@ -208,7 +218,6 @@ class Wrapper
|
|||
@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 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()
|
||||
else if @site_info and @site_info.content?.title?
|
||||
|
@ -313,13 +322,27 @@ class Wrapper
|
|||
return false
|
||||
|
||||
|
||||
isProxyRequest: ->
|
||||
return window.location.pathname == "/"
|
||||
|
||||
|
||||
gotoSite: (elem) =>
|
||||
href = $(elem).attr("href")
|
||||
if @isProxyRequest() # Fix for proxy request
|
||||
$(elem).attr("href", "http://zero#{href}")
|
||||
|
||||
|
||||
|
||||
log: (args...) ->
|
||||
console.log "[Wrapper]", args...
|
||||
|
||||
origin = window.server_url or window.location.origin
|
||||
|
||||
if window.server_url
|
||||
ws_url = "ws://#{window.server_url.replace('http://', '')}/Websocket?wrapper_key=#{window.wrapper_key}"
|
||||
if origin.indexOf("https:") == 0
|
||||
proto = { ws: 'wss', http: 'https' }
|
||||
else
|
||||
ws_url = "ws://#{window.location.hostname}:#{window.location.port}/Websocket?wrapper_key=#{window.wrapper_key}"
|
||||
proto = { ws: 'ws', http: 'http' }
|
||||
|
||||
ws_url = proto.ws + ":" + origin.replace(proto.http+":", "") + "/Websocket?wrapper_key=" + window.wrapper_key
|
||||
|
||||
window.wrapper = new Wrapper(ws_url)
|
||||
|
|
|
@ -58,6 +58,16 @@ a { color: black }
|
|||
.notification small { color: #AAA }
|
||||
.body-white .notification { box-shadow: 0px 1px 9px rgba(0,0,0,0.1) }
|
||||
|
||||
/* Notification select */
|
||||
.notification .select {
|
||||
display: block; padding: 10px; margin-right: -32px; text-decoration: none; border-left: 3px solid #EEE;
|
||||
margin-top: 1px; transition: all 0.3s; color: #666
|
||||
}
|
||||
.notification .select:hover, .notification .select.active { background-color: #007AFF; border-left: 3px solid #5D68FF; color: white; transition: none }
|
||||
.notification .select:active, .notification .select:focus { background-color: #3396FF; color: white; transition: none; border-left-color: #3396FF }
|
||||
.notification .select.disabled { opacity: 0.5; pointer-events: none }
|
||||
.notification .select small { color: inherit; }
|
||||
|
||||
/* Notification types */
|
||||
.notification-ask .notification-icon { background-color: #f39c12; }
|
||||
.notification-info .notification-icon { font-size: 22px; font-weight: bold; background-color: #2980b9; line-height: 48px }
|
||||
|
@ -115,6 +125,10 @@ a { color: black }
|
|||
box-shadow: 0 0 10px #AF3BFF, 0 0 5px #29d; opacity: 1.0; transform: rotate(3deg) translate(0px, -4px);
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
.icon-profile { font-size: 6px; top: 0em; border-radius: 0.7em 0.7em 0 0; background: #FFFFFF; width: 1.5em; height: 0.7em; position: relative; display: inline-block; margin-right: 4px }
|
||||
.icon-profile::before { position: absolute; content: ""; top: -1em; left: 0.38em; width: 0.8em; height: 0.85em; border-radius: 50%; background: #FFFFFF }
|
||||
|
||||
/* Animations */
|
||||
|
||||
@keyframes flip {
|
||||
|
@ -130,3 +144,9 @@ a { color: black }
|
|||
70% { opacity: 0 }
|
||||
100% { opacity: 0 }
|
||||
}
|
||||
|
||||
/* Print styles */
|
||||
@media print {
|
||||
#inner-iframe { position: fixed; }
|
||||
.progressbar, .fixbutton, .notifications, .loadingscreen { visibility: hidden; }
|
||||
}
|
|
@ -63,6 +63,16 @@ a { color: black }
|
|||
.notification small { color: #AAA }
|
||||
.body-white .notification { -webkit-box-shadow: 0px 1px 9px rgba(0,0,0,0.1) ; -moz-box-shadow: 0px 1px 9px rgba(0,0,0,0.1) ; -o-box-shadow: 0px 1px 9px rgba(0,0,0,0.1) ; -ms-box-shadow: 0px 1px 9px rgba(0,0,0,0.1) ; box-shadow: 0px 1px 9px rgba(0,0,0,0.1) }
|
||||
|
||||
/* Notification select */
|
||||
.notification .select {
|
||||
display: block; padding: 10px; margin-right: -32px; text-decoration: none; border-left: 3px solid #EEE;
|
||||
margin-top: 1px; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -o-transition: all 0.3s; -ms-transition: all 0.3s; transition: all 0.3s ; color: #666
|
||||
}
|
||||
.notification .select:hover, .notification .select.active { background-color: #007AFF; border-left: 3px solid #5D68FF; color: white; -webkit-transition: none ; -moz-transition: none ; -o-transition: none ; -ms-transition: none ; transition: none }
|
||||
.notification .select:active, .notification .select:focus { background-color: #3396FF; color: white; -webkit-transition: none; -moz-transition: none; -o-transition: none; -ms-transition: none; transition: none ; border-left-color: #3396FF }
|
||||
.notification .select.disabled { opacity: 0.5; pointer-events: none }
|
||||
.notification .select small { color: inherit; }
|
||||
|
||||
/* Notification types */
|
||||
.notification-ask .notification-icon { background-color: #f39c12; }
|
||||
.notification-info .notification-icon { font-size: 22px; font-weight: bold; background-color: #2980b9; line-height: 48px }
|
||||
|
@ -120,6 +130,10 @@ a { color: black }
|
|||
-webkit-box-shadow: 0 0 10px #AF3BFF, 0 0 5px #29d; -moz-box-shadow: 0 0 10px #AF3BFF, 0 0 5px #29d; -o-box-shadow: 0 0 10px #AF3BFF, 0 0 5px #29d; -ms-box-shadow: 0 0 10px #AF3BFF, 0 0 5px #29d; box-shadow: 0 0 10px #AF3BFF, 0 0 5px #29d ; opacity: 1.0; -webkit-transform: rotate(3deg) translate(0px, -4px); -moz-transform: rotate(3deg) translate(0px, -4px); -o-transform: rotate(3deg) translate(0px, -4px); -ms-transform: rotate(3deg) translate(0px, -4px); transform: rotate(3deg) translate(0px, -4px) ;
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
.icon-profile { font-size: 6px; top: 0em; -webkit-border-radius: 0.7em 0.7em 0 0; -moz-border-radius: 0.7em 0.7em 0 0; -o-border-radius: 0.7em 0.7em 0 0; -ms-border-radius: 0.7em 0.7em 0 0; border-radius: 0.7em 0.7em 0 0 ; background: #FFFFFF; width: 1.5em; height: 0.7em; position: relative; display: inline-block; margin-right: 4px }
|
||||
.icon-profile::before { position: absolute; content: ""; top: -1em; left: 0.38em; width: 0.8em; height: 0.85em; -webkit-border-radius: 50%; -moz-border-radius: 50%; -o-border-radius: 50%; -ms-border-radius: 50%; border-radius: 50% ; background: #FFFFFF }
|
||||
|
||||
/* Animations */
|
||||
|
||||
@keyframes flip {
|
||||
|
@ -161,8 +175,9 @@ a { color: black }
|
|||
100% { opacity: 0 }
|
||||
}
|
||||
|
||||
|
||||
/* Print styles */
|
||||
@media print {
|
||||
#inner-iframe { position: fixed; }
|
||||
.progressbar, .fixbutton, .notifications, .loadingscreen { visibility: hidden; }
|
||||
}
|
||||
}
|
|
@ -595,7 +595,6 @@ jQuery.extend( jQuery.easing,
|
|||
if (timeout == null) {
|
||||
timeout = 0;
|
||||
}
|
||||
this.log(id, type, body, timeout);
|
||||
_ref = $(".notification-" + id);
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
elem = _ref[_i];
|
||||
|
@ -644,16 +643,15 @@ jQuery.extend( jQuery.easing,
|
|||
"width": width
|
||||
}, 700, "easeInOutCubic");
|
||||
$(".body", elem).cssLater("box-shadow", "0px 0px 5px rgba(0,0,0,0.1)", 1000);
|
||||
$(".close", elem).on("click", (function(_this) {
|
||||
$(".close, .button", elem).on("click", (function(_this) {
|
||||
return function() {
|
||||
_this.close(elem);
|
||||
return false;
|
||||
};
|
||||
})(this));
|
||||
return $(".button", elem).on("click", (function(_this) {
|
||||
return $(".select", elem).on("click", (function(_this) {
|
||||
return function() {
|
||||
_this.close(elem);
|
||||
return false;
|
||||
return _this.close(elem);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
@ -683,6 +681,7 @@ jQuery.extend( jQuery.easing,
|
|||
}).call(this);
|
||||
|
||||
|
||||
|
||||
/* ---- src/Ui/media/Sidebar.coffee ---- */
|
||||
|
||||
|
||||
|
@ -742,12 +741,13 @@ jQuery.extend( jQuery.easing,
|
|||
|
||||
|
||||
(function() {
|
||||
var Wrapper, ws_url,
|
||||
var Wrapper, origin, proto, ws_url,
|
||||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
||||
__slice = [].slice;
|
||||
|
||||
Wrapper = (function() {
|
||||
function Wrapper(ws_url) {
|
||||
this.gotoSite = __bind(this.gotoSite, this);
|
||||
this.setSizeLimit = __bind(this.setSizeLimit, this);
|
||||
this.onLoad = __bind(this.onLoad, this);
|
||||
this.onCloseWebsocket = __bind(this.onCloseWebsocket, this);
|
||||
|
@ -785,6 +785,12 @@ jQuery.extend( jQuery.easing,
|
|||
}
|
||||
};
|
||||
})(this));
|
||||
|
||||
/*setInterval (->
|
||||
console.log document.hasFocus()
|
||||
), 1000
|
||||
*/
|
||||
$("#inner-iframe").focus();
|
||||
this;
|
||||
}
|
||||
|
||||
|
@ -831,6 +837,11 @@ jQuery.extend( jQuery.easing,
|
|||
});
|
||||
return this.wrapperWsInited = true;
|
||||
}
|
||||
} else if (cmd === "innerLoaded") {
|
||||
if (window.location.hash) {
|
||||
$("#inner-iframe")[0].src += window.location.hash;
|
||||
return this.log("Added hash to location", $("#inner-iframe")[0].src);
|
||||
}
|
||||
} else if (cmd === "wrapperNotification") {
|
||||
return this.actionNotification(message);
|
||||
} else if (cmd === "wrapperConfirm") {
|
||||
|
@ -1032,9 +1043,6 @@ jQuery.extend( jQuery.easing,
|
|||
"cmd": "wrapperReady"
|
||||
});
|
||||
}
|
||||
if (window.location.hash) {
|
||||
$("#inner-iframe")[0].src += window.location.hash;
|
||||
}
|
||||
if (this.ws.ws.readyState === 1 && !this.site_info) {
|
||||
return this.reloadSiteInfo();
|
||||
} else if (this.site_info && (((_ref = this.site_info.content) != null ? _ref.title : void 0) != null)) {
|
||||
|
@ -1163,6 +1171,18 @@ jQuery.extend( jQuery.easing,
|
|||
return false;
|
||||
};
|
||||
|
||||
Wrapper.prototype.isProxyRequest = function() {
|
||||
return window.location.pathname === "/";
|
||||
};
|
||||
|
||||
Wrapper.prototype.gotoSite = function(elem) {
|
||||
var href;
|
||||
href = $(elem).attr("href");
|
||||
if (this.isProxyRequest()) {
|
||||
return $(elem).attr("href", "http://zero" + href);
|
||||
}
|
||||
};
|
||||
|
||||
Wrapper.prototype.log = function() {
|
||||
var args;
|
||||
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
|
||||
|
@ -1173,15 +1193,22 @@ jQuery.extend( jQuery.easing,
|
|||
|
||||
})();
|
||||
|
||||
var origin = window.server_url || window.location.origin;
|
||||
var proto;
|
||||
if (origin.indexOf('https:') === 0) {
|
||||
proto = { ws: 'wss', ht: 'https' };
|
||||
origin = window.server_url || window.location.origin;
|
||||
|
||||
if (origin.indexOf("https:") === 0) {
|
||||
proto = {
|
||||
ws: 'wss',
|
||||
http: 'https'
|
||||
};
|
||||
} else {
|
||||
proto = { ws: 'ws', ht: 'http' };
|
||||
proto = {
|
||||
ws: 'ws',
|
||||
http: 'http'
|
||||
};
|
||||
}
|
||||
ws_url = proto.ws + ":" + (origin.replace(proto.ht + ':', '')) + "/Websocket?wrapper_key=" + window.wrapper_key;
|
||||
|
||||
ws_url = proto.ws + ":" + origin.replace(proto.http + ":", "") + "/Websocket?wrapper_key=" + window.wrapper_key;
|
||||
|
||||
window.wrapper = new Wrapper(ws_url);
|
||||
|
||||
}).call(this);
|
||||
}).call(this);
|
Loading…
Add table
Add a link
Reference in a new issue