Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
commit
67a04a16ec
7 files changed
+271
-123
No files matched your search
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "jshint --config .jshintrc --exclude-path .jshintignore .",
|
"lint": "jshint --config .jshintrc --exclude-path .jshintignore .",
|
||||||
"test": "node TestSelenium.js",
|
"test": "node TestSelenium.js",
|
||||||
"style": "lessc ./customize.dist/src/less/cryptpad.less > ./customize.dist/main.css && lessc ./customize.dist/src/less/toolbar.less > ./customize.dist/toolbar.css && lessc ./www/drive/file.less > ./www/drive/file.css && lessc ./www/settings/main.less > ./www/settings/main.css && lessc ./www/slide/slide.less > ./www/slide/slide.css && lessc ./www/whiteboard/whiteboard.less > ./www/whiteboard/whiteboard.css && lessc ./www/poll/poll.less > ./www/poll/poll.css",
|
"style": "lessc ./customize.dist/src/less/cryptpad.less > ./customize.dist/main.css && lessc ./customize.dist/src/less/toolbar.less > ./customize.dist/toolbar.css && lessc ./www/drive/file.less > ./www/drive/file.css && lessc ./www/settings/main.less > ./www/settings/main.css && lessc ./www/slide/slide.less > ./www/slide/slide.css && lessc ./www/whiteboard/whiteboard.less > ./www/whiteboard/whiteboard.css && lessc ./www/poll/poll.less > ./www/poll/poll.css && lessc ./www/file/file.less > ./www/file/file.css",
|
||||||
"template": "cd customize.dist/src && node build.js"
|
"template": "cd customize.dist/src && node build.js"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -286,7 +286,10 @@ var getFileSize = function (Env, channel, cb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return void Env.msgStore.getChannelSize(channel, function (e, size) {
|
return void Env.msgStore.getChannelSize(channel, function (e, size) {
|
||||||
if (e) { return void cb(e.code); }
|
if (e) {
|
||||||
|
if (e === 'ENOENT') { return void cb(void 0, 0); }
|
||||||
|
return void cb(e.code);
|
||||||
|
}
|
||||||
cb(void 0, size);
|
cb(void 0, size);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -331,7 +334,7 @@ var getTotalSize = function (Env, publicKey, cb) {
|
|||||||
//var msgStore = Env.msgStore;
|
//var msgStore = Env.msgStore;
|
||||||
|
|
||||||
return void getChannelList(Env, publicKey, function (channels) {
|
return void getChannelList(Env, publicKey, function (channels) {
|
||||||
if (!channels) { cb('NO_ARRAY'); } // unexpected
|
if (!channels) { return cb('NO_ARRAY'); } // unexpected
|
||||||
|
|
||||||
var count = channels.length;
|
var count = channels.length;
|
||||||
if (!count) { cb(void 0, 0); }
|
if (!count) { cb(void 0, 0); }
|
||||||
@@ -755,6 +758,12 @@ RPC.create = function (config /*:typeof(ConfigType)*/, cb /*:(?Error, ?Function)
|
|||||||
// load pin-store...
|
// load pin-store...
|
||||||
console.log('loading rpc module...');
|
console.log('loading rpc module...');
|
||||||
|
|
||||||
|
var warn = function (e, output) {
|
||||||
|
if (e && !config.suppressRPCErrors) {
|
||||||
|
console.error('[' + e + ']', output);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var keyOrDefaultString = function (key, def) {
|
var keyOrDefaultString = function (key, def) {
|
||||||
return typeof(config[key]) === 'string'? config[key]: def;
|
return typeof(config[key]) === 'string'? config[key]: def;
|
||||||
};
|
};
|
||||||
@@ -848,40 +857,59 @@ RPC.create = function (config /*:typeof(ConfigType)*/, cb /*:(?Error, ?Function)
|
|||||||
case 'COOKIE': return void Respond(void 0);
|
case 'COOKIE': return void Respond(void 0);
|
||||||
case 'RESET':
|
case 'RESET':
|
||||||
return resetUserPins(Env, safeKey, msg[1], function (e, hash) {
|
return resetUserPins(Env, safeKey, msg[1], function (e, hash) {
|
||||||
|
//warn(e, hash);
|
||||||
return void Respond(e, hash);
|
return void Respond(e, hash);
|
||||||
});
|
});
|
||||||
case 'PIN':
|
case 'PIN':
|
||||||
return pinChannel(Env, safeKey, msg[1], function (e, hash) {
|
return pinChannel(Env, safeKey, msg[1], function (e, hash) {
|
||||||
|
warn(e, hash);
|
||||||
Respond(e, hash);
|
Respond(e, hash);
|
||||||
});
|
});
|
||||||
case 'UNPIN':
|
case 'UNPIN':
|
||||||
return unpinChannel(Env, safeKey, msg[1], function (e, hash) {
|
return unpinChannel(Env, safeKey, msg[1], function (e, hash) {
|
||||||
|
warn(e, hash);
|
||||||
Respond(e, hash);
|
Respond(e, hash);
|
||||||
});
|
});
|
||||||
case 'GET_HASH':
|
case 'GET_HASH':
|
||||||
return void getHash(Env, safeKey, function (e, hash) {
|
return void getHash(Env, safeKey, function (e, hash) {
|
||||||
|
warn(e, hash);
|
||||||
Respond(e, hash);
|
Respond(e, hash);
|
||||||
});
|
});
|
||||||
case 'GET_TOTAL_SIZE': // TODO cache this, since it will get called quite a bit
|
case 'GET_TOTAL_SIZE': // TODO cache this, since it will get called quite a bit
|
||||||
return getTotalSize(Env, safeKey, function (e, size) {
|
return getTotalSize(Env, safeKey, function (e, size) {
|
||||||
if (e) { return void Respond(e); }
|
if (e) {
|
||||||
|
warn(e, safeKey);
|
||||||
|
return void Respond(e);
|
||||||
|
}
|
||||||
Respond(e, size);
|
Respond(e, size);
|
||||||
});
|
});
|
||||||
case 'GET_FILE_SIZE':
|
case 'GET_FILE_SIZE':
|
||||||
return void getFileSize(Env, msg[1], Respond);
|
return void getFileSize(Env, msg[2], function (e, size) {
|
||||||
|
warn(e, msg[2]);
|
||||||
|
Respond(e, size);
|
||||||
|
});
|
||||||
case 'UPDATE_LIMITS':
|
case 'UPDATE_LIMITS':
|
||||||
return void updateLimits(config, safeKey, function (e, limit) {
|
return void updateLimits(config, safeKey, function (e, limit) {
|
||||||
if (e) { return void Respond(e); }
|
if (e) {
|
||||||
|
warn(e, limit);
|
||||||
|
return void Respond(e);
|
||||||
|
}
|
||||||
Respond(void 0, limit);
|
Respond(void 0, limit);
|
||||||
});
|
});
|
||||||
case 'GET_LIMIT':
|
case 'GET_LIMIT':
|
||||||
return void getLimit(Env, safeKey, function (e, limit) {
|
return void getLimit(Env, safeKey, function (e, limit) {
|
||||||
if (e) { return void Respond(e); }
|
if (e) {
|
||||||
|
warn(e, limit);
|
||||||
|
return void Respond(e);
|
||||||
|
}
|
||||||
Respond(void 0, limit);
|
Respond(void 0, limit);
|
||||||
});
|
});
|
||||||
case 'GET_MULTIPLE_FILE_SIZE':
|
case 'GET_MULTIPLE_FILE_SIZE':
|
||||||
return void getMultipleFileSize(Env, msg[1], function (e, dict) {
|
return void getMultipleFileSize(Env, msg[1], function (e, dict) {
|
||||||
if (e) { return void Respond(e); }
|
if (e) {
|
||||||
|
warn(e, dict);
|
||||||
|
return void Respond(e);
|
||||||
|
}
|
||||||
Respond(void 0, dict);
|
Respond(void 0, dict);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -889,6 +917,7 @@ RPC.create = function (config /*:typeof(ConfigType)*/, cb /*:(?Error, ?Function)
|
|||||||
case 'UPLOAD':
|
case 'UPLOAD':
|
||||||
if (!privileged) { return deny(); }
|
if (!privileged) { return deny(); }
|
||||||
return void upload(Env, safeKey, msg[1], function (e, len) {
|
return void upload(Env, safeKey, msg[1], function (e, len) {
|
||||||
|
warn(e, len);
|
||||||
Respond(e, len);
|
Respond(e, len);
|
||||||
});
|
});
|
||||||
case 'UPLOAD_STATUS':
|
case 'UPLOAD_STATUS':
|
||||||
@@ -906,11 +935,13 @@ RPC.create = function (config /*:typeof(ConfigType)*/, cb /*:(?Error, ?Function)
|
|||||||
case 'UPLOAD_COMPLETE':
|
case 'UPLOAD_COMPLETE':
|
||||||
if (!privileged) { return deny(); }
|
if (!privileged) { return deny(); }
|
||||||
return void upload_complete(Env, safeKey, function (e, hash) {
|
return void upload_complete(Env, safeKey, function (e, hash) {
|
||||||
|
warn(e, hash);
|
||||||
Respond(e, hash);
|
Respond(e, hash);
|
||||||
});
|
});
|
||||||
case 'UPLOAD_CANCEL':
|
case 'UPLOAD_CANCEL':
|
||||||
if (!privileged) { return deny(); }
|
if (!privileged) { return deny(); }
|
||||||
return void upload_cancel(Env, safeKey, function (e) {
|
return void upload_cancel(Env, safeKey, function (e) {
|
||||||
|
warn(e);
|
||||||
Respond(e);
|
Respond(e);
|
||||||
});
|
});
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.MediaTag=t():e.MediaTag=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=82)}([function(e,t,n){"use strict";var r={IMAGE:"image",AUDIO:"audio",VIDEO:"video",PDF:"pdf",DASH:"dash",DOWNLOAD:"download",CRYPTO:"crypto",CLEAR_KEY:"clear-key",MEDIA_OBJECT:"media-object"};e.exports=r},function(e,t,n){"use strict";var r={MATCHER:"matcher",RENDERER:"renderer",FILTER:"filter",SANITIZER:"sanitizer"};e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(1),c=n(5),s=n(6),f=function(e){function t(e,n){r(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a.MATCHER,c.ANY));return i.targetType=n,i}return i(t,e),u(t,[{key:"getTargetType",value:function(){return this.targetType}}]),t}(s);e.exports=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=n(1),a=n(5),c=n(6),s=function(e){function t(e){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.RENDERER,a.ONCE))}return i(t,e),t}(c);e.exports=s},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),a=n(5),c=n(8),s=n(12),f=function(){function e(){o(this,e)}return i(e,null,[{key:"start",value:function(t){var n=e.unstack(t);n?n.type!==u.SANITIZER&&e.fill(t):e.fill(t),e.snapshot(t),e.check(t),e.run(t)}},{key:"snapshot",value:function(t){var n=t.getId();if(e.stacks[n]){var r=[];e.stacks[n].forEach(function(e){var t={};t.identifier=e.getIdentifier(),t.type=e.getType(),r.push(t)}),e.snapshots[n]?e.snapshots[n].push({stack:r}):e.snapshots[n]=[{stack:r}]}else e.snapshots[n]=[]}},{key:"fill",value:function(t){var n=[],o=t.getId(),i=c.getPlugins(u.MATCHER),s=i.filter(function(e){return e.process(t)}),f=s.map(function(e){return e.getIdentifier()}),l=c.values(),p=l.filter(function(e){return e.type!==u.MATCHER&&f.includes(e.identifier)}),y=c.filterByOccurrencies(p),b=!0,h=!1,v=void 0;try{for(var w,g=y.once[Symbol.iterator]();!(b=(w=g.next()).done);b=!0){var d=w.value;n.push(d),y.every&&n.push.apply(n,r(y.every))}}catch(e){h=!0,v=e}finally{try{!b&&g.return&&g.return()}finally{if(h)throw v}}var m=!0,O=!1,E=void 0;try{for(var k,_=y.any[Symbol.iterator]();!(m=(k=_.next()).done);m=!0){var j=k.value;n.push(j),y.every&&n.push.apply(n,r(y.every))}}catch(e){O=!0,E=e}finally{try{!m&&_.return&&_.return()}finally{if(O)throw E}}if(e.stacks[o]){var P=n.shift();if(P){if(P.occurrence!==a.ONCE)throw new Error("The last plugin is not runnable once");var T;(T=e.stacks[o]).push.apply(T,n)}else{var A;(A=e.stacks[o]).push.apply(A,n)}}else e.stacks[o]=n}},{key:"unstack",value:function(t){var n=t.getId();return e.stacks[n]?e.stacks[n].pop():null}},{key:"check",vLine truncated
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.MediaTag=t():e.MediaTag=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=82)}([function(e,t,n){"use strict";var r={IMAGE:"image",AUDIO:"audio",VIDEO:"video",PDF:"pdf",DASH:"dash",DOWNLOAD:"download",CRYPTO:"crypto",CLEAR_KEY:"clear-key",MEDIA_OBJECT:"media-object"};e.exports=r},function(e,t,n){"use strict";var r={MATCHER:"matcher",RENDERER:"renderer",FILTER:"filter",SANITIZER:"sanitizer"};e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(1),c=n(5),s=n(6),f=function(e){function t(e,n){r(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a.MATCHER,c.ANY));return i.targetType=n,i}return i(t,e),u(t,[{key:"getTargetType",value:function(){return this.targetType}}]),t}(s);e.exports=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=n(1),a=n(5),c=n(6),s=function(e){function t(e){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,u.RENDERER,a.ONCE))}return i(t,e),t}(c);e.exports=s},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),a=n(5),c=n(8),s=n(12),f=function(){function e(){o(this,e)}return i(e,null,[{key:"start",value:function(t){var n=e.unstack(t);n?n.type!==u.SANITIZER&&e.fill(t):e.fill(t),e.snapshot(t),e.check(t),e.run(t)}},{key:"snapshot",value:function(t){var n=t.getId();if(e.stacks[n]){var r=[];e.stacks[n].forEach(function(e){var t={};t.identifier=e.getIdentifier(),t.type=e.getType(),r.push(t)}),e.snapshots[n]?e.snapshots[n].push({stack:r}):e.snapshots[n]=[{stack:r}]}else e.snapshots[n]=[]}},{key:"fill",value:function(t){var n=[],o=t.getId(),i=c.getPlugins(u.MATCHER),s=i.filter(function(e){return e.process(t)}),f=s.map(function(e){return e.getIdentifier()}),l=c.values(),p=l.filter(function(e){return e.type!==u.MATCHER&&f.includes(e.identifier)}),y=c.filterByOccurrencies(p),b=!0,h=!1,v=void 0;try{for(var w,d=y.once[Symbol.iterator]();!(b=(w=d.next()).done);b=!0){var g=w.value;n.push(g),y.every&&n.push.apply(n,r(y.every))}}catch(e){h=!0,v=e}finally{try{!b&&d.return&&d.return()}finally{if(h)throw v}}var m=!0,O=!1,E=void 0;try{for(var k,_=y.any[Symbol.iterator]();!(m=(k=_.next()).done);m=!0){var j=k.value;n.push(j),y.every&&n.push.apply(n,r(y.every))}}catch(e){O=!0,E=e}finally{try{!m&&_.return&&_.return()}finally{if(O)throw E}}if(e.stacks[o]){var P=n.shift();if(P){if(P.occurrence!==a.ONCE)throw new Error("The last plugin is not runnable once");var T;(T=e.stacks[o]).push.apply(T,n)}else{var A;(A=e.stacks[o]).push.apply(A,n)}}else e.stacks[o]=n}},{key:"unstack",value:function(t){var n=t.getId();return e.stacks[n]?e.stacks[n].pop():null}},{key:"check",vLine truncated
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
html,
|
||||||
|
body {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
.cryptpad-toolbar {
|
||||||
|
margin-bottom: 1px;
|
||||||
|
padding: 0px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
#file {
|
||||||
|
display: block;
|
||||||
|
height: 300px;
|
||||||
|
width: 300px;
|
||||||
|
border: 2px solid black;
|
||||||
|
margin: 50px;
|
||||||
|
}
|
||||||
|
.inputfile {
|
||||||
|
width: 0.1px;
|
||||||
|
height: 0.1px;
|
||||||
|
opacity: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
position: absolute;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
#upload-form {
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
position: relative;
|
||||||
|
width: 50vh;
|
||||||
|
height: 50vh;
|
||||||
|
display: block;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
#upload-form label {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.hovering {
|
||||||
|
background-color: rgba(255, 0, 115, 0.5) !important;
|
||||||
|
}
|
||||||
|
.block {
|
||||||
|
display: block;
|
||||||
|
height: 50vh;
|
||||||
|
width: 50vh;
|
||||||
|
}
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.inputfile + label {
|
||||||
|
border: 2px solid black;
|
||||||
|
background-color: rgba(50, 50, 50, 0.1);
|
||||||
|
margin: 50px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.inputfile:focus + label,
|
||||||
|
.inputfile + label:hover {
|
||||||
|
background-color: rgba(50, 50, 50, 0.3);
|
||||||
|
}
|
||||||
|
#progress {
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
height: 100%;
|
||||||
|
transition: width 500ms;
|
||||||
|
width: 0%;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
background-color: rgba(255, 0, 115, 0.75);
|
||||||
|
z-index: 10000;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
#status {
|
||||||
|
display: none;
|
||||||
|
width: 80vw;
|
||||||
|
margin-top: 50px;
|
||||||
|
margin-left: 10vw;
|
||||||
|
border: 1px solid black;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
#status tr:nth-child(1) {
|
||||||
|
background-color: #ccc;
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
#status tr:nth-child(1) td {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#status td {
|
||||||
|
border-left: 1px solid #BBB;
|
||||||
|
border-right: 1px solid #BBB;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
#status .upProgress {
|
||||||
|
width: 200px;
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#status .progressContainer {
|
||||||
|
position: absolute;
|
||||||
|
width: 0px;
|
||||||
|
left: 5px;
|
||||||
|
top: 1px;
|
||||||
|
bottom: 1px;
|
||||||
|
background-color: rgba(0, 0, 255, 0.3);
|
||||||
|
}
|
||||||
|
#status .upCancel {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#status .fa.cancel {
|
||||||
|
color: #ff0073;
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
@import "../../customize.dist/src/less/variables.less";
|
||||||
|
@import "../../customize.dist/src/less/mixins.less";
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
.cryptpad-toolbar {
|
||||||
|
margin-bottom: 1px;
|
||||||
|
padding: 0px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
#file {
|
||||||
|
display: block;
|
||||||
|
height: 300px;
|
||||||
|
width: 300px;
|
||||||
|
border: 2px solid black;
|
||||||
|
margin: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inputfile {
|
||||||
|
width: 0.1px;
|
||||||
|
height: 0.1px;
|
||||||
|
opacity: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
position: absolute;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#upload-form {
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
width: 50vh;
|
||||||
|
height: 50vh;
|
||||||
|
display: block;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
#upload-form label{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hovering {
|
||||||
|
background-color: rgba(255, 0, 115, 0.5) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.block {
|
||||||
|
display: block;
|
||||||
|
height: 50vh;
|
||||||
|
width: 50vh;
|
||||||
|
}
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.inputfile + label {
|
||||||
|
border: 2px solid black;
|
||||||
|
background-color: rgba(50, 50, 50, .10);
|
||||||
|
margin: 50px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inputfile:focus + label,
|
||||||
|
.inputfile + label:hover {
|
||||||
|
background-color: rgba(50, 50, 50, 0.30);
|
||||||
|
}
|
||||||
|
|
||||||
|
#progress {
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
|
||||||
|
transition: width 500ms;
|
||||||
|
width: 0%;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
background-color: rgba(255, 0, 115, 0.75);
|
||||||
|
z-index: 10000;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#status {
|
||||||
|
display: none;
|
||||||
|
width: 80vw;
|
||||||
|
margin-top: 50px;
|
||||||
|
margin-left: 10vw;
|
||||||
|
border: 1px solid black;
|
||||||
|
border-collapse: collapse;
|
||||||
|
tr:nth-child(1) {
|
||||||
|
background-color: #ccc;
|
||||||
|
border: 1px solid #999;
|
||||||
|
td { text-align: center; }
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
border-left: 1px solid #BBB;
|
||||||
|
border-right: 1px solid #BBB;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
.upProgress {
|
||||||
|
width: 200px;
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.progressContainer {
|
||||||
|
position: absolute;
|
||||||
|
width: 0px;
|
||||||
|
left: 5px;
|
||||||
|
top: 1px; bottom: 1px;
|
||||||
|
background-color: rgba(0,0,255,0.3);
|
||||||
|
}
|
||||||
|
.upCancel { text-align: center; }
|
||||||
|
.fa.cancel {
|
||||||
|
color: rgb(255, 0, 115);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
+1
-114
@@ -5,120 +5,7 @@
|
|||||||
<link rel="stylesheet" href="/bower_components/components-font-awesome/css/font-awesome.min.css">
|
<link rel="stylesheet" href="/bower_components/components-font-awesome/css/font-awesome.min.css">
|
||||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||||
<style>
|
<link rel="stylesheet" href="/file/file.css">
|
||||||
html, body {
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
.cryptpad-toolbar {
|
|
||||||
margin-bottom: 1px;
|
|
||||||
padding: 0px;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
#file {
|
|
||||||
display: block;
|
|
||||||
height: 300px;
|
|
||||||
width: 300px;
|
|
||||||
border: 2px solid black;
|
|
||||||
margin: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inputfile {
|
|
||||||
width: 0.1px;
|
|
||||||
height: 0.1px;
|
|
||||||
opacity: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
position: absolute;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#upload-form {
|
|
||||||
padding: 0px;
|
|
||||||
margin: 0px;
|
|
||||||
|
|
||||||
position: relative;
|
|
||||||
width: 50vh;
|
|
||||||
height: 50vh;
|
|
||||||
display: block;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
#upload-form label{
|
|
||||||
text-align: center;
|
|
||||||
line-height: 50vh;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hovering {
|
|
||||||
background-color: rgba(255, 0, 115, 0.5) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.block {
|
|
||||||
display: block;
|
|
||||||
height: 50vh;
|
|
||||||
width: 50vh;
|
|
||||||
}
|
|
||||||
.hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.inputfile + label {
|
|
||||||
border: 2px solid black;
|
|
||||||
background-color: rgba(50, 50, 50, .10);
|
|
||||||
margin: 50px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inputfile:focus + label,
|
|
||||||
.inputfile + label:hover {
|
|
||||||
background-color: rgba(50, 50, 50, 0.30);
|
|
||||||
}
|
|
||||||
|
|
||||||
#progress {
|
|
||||||
position: absolute;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
height: 100%;
|
|
||||||
width: 0%;
|
|
||||||
max-width: 100%;
|
|
||||||
max-height: 100%;
|
|
||||||
background-color: rgba(255, 0, 115, 0.75);
|
|
||||||
z-index: 10000;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
#status {
|
|
||||||
display: none;
|
|
||||||
width: 80vw;
|
|
||||||
margin-top: 50px;
|
|
||||||
margin-left: 10vw;
|
|
||||||
border: 1px solid black;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
#status tr:nth-child(1) {
|
|
||||||
background-color: #ccc;
|
|
||||||
border: 1px solid #999;
|
|
||||||
}
|
|
||||||
#status tr:nth-child(1) td { text-align: center; }
|
|
||||||
#status td {
|
|
||||||
border-left: 1px solid #BBB;
|
|
||||||
border-right: 1px solid #BBB;
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
#status .upProgress {
|
|
||||||
width: 200px;
|
|
||||||
position: relative;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#status .progressContainer {
|
|
||||||
position: absolute;
|
|
||||||
width: 0px;
|
|
||||||
left: 5px;
|
|
||||||
top: 1px; bottom: 1px;
|
|
||||||
background-color: rgba(0,0,255,0.3);
|
|
||||||
}
|
|
||||||
#status .upCancel { text-align: center; }
|
|
||||||
#status .fa.cancel {
|
|
||||||
color: rgb(255, 0, 115);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="toolbar" class="toolbar-container"></div>
|
<div id="toolbar" class="toolbar-container"></div>
|
||||||
|
|||||||
@@ -80,6 +80,10 @@ define([
|
|||||||
.on('decryptionError', function (e) {
|
.on('decryptionError', function (e) {
|
||||||
var error = e.originalEvent;
|
var error = e.originalEvent;
|
||||||
Cryptpad.alert(error.message);
|
Cryptpad.alert(error.message);
|
||||||
|
})
|
||||||
|
.on('decryptionProgress', function (e) {
|
||||||
|
var progress = e.originalEvent;
|
||||||
|
console.log(progress.percent);
|
||||||
});
|
});
|
||||||
|
|
||||||
require(['/common/media-tag.js'], function (MediaTag) {
|
require(['/common/media-tag.js'], function (MediaTag) {
|
||||||
|
|||||||
Reference in new issue
Block a user