diff --git a/customize.dist/images/bkcontact.jpg b/customize.dist/images/bkcontact.jpg
new file mode 100644
index 000000000..dde71bae0
Binary files /dev/null and b/customize.dist/images/bkcontact.jpg differ
diff --git a/customize.dist/images/email.svg b/customize.dist/images/email.svg
new file mode 100644
index 000000000..e2e566e6e
--- /dev/null
+++ b/customize.dist/images/email.svg
@@ -0,0 +1,25 @@
+
+
+
diff --git a/customize.dist/images/github.svg b/customize.dist/images/github.svg
new file mode 100644
index 000000000..16cd68786
--- /dev/null
+++ b/customize.dist/images/github.svg
@@ -0,0 +1,22 @@
+
+
+
diff --git a/customize.dist/images/irc.svg b/customize.dist/images/irc.svg
new file mode 100644
index 000000000..58a9e707d
--- /dev/null
+++ b/customize.dist/images/irc.svg
@@ -0,0 +1,30 @@
+
+
+
diff --git a/customize.dist/images/issue.svg b/customize.dist/images/issue.svg
new file mode 100644
index 000000000..27d5276c7
--- /dev/null
+++ b/customize.dist/images/issue.svg
@@ -0,0 +1,19 @@
+
+
+
diff --git a/customize.dist/images/sayhi.svg b/customize.dist/images/sayhi.svg
new file mode 100644
index 000000000..22c7463cb
--- /dev/null
+++ b/customize.dist/images/sayhi.svg
@@ -0,0 +1,17 @@
+
+
+
diff --git a/customize.dist/images/twitter.svg b/customize.dist/images/twitter.svg
new file mode 100644
index 000000000..bed259b76
--- /dev/null
+++ b/customize.dist/images/twitter.svg
@@ -0,0 +1,17 @@
+
+
+
diff --git a/customize.dist/pages.js b/customize.dist/pages.js
index bc50ac22d..fe2634a71 100644
--- a/customize.dist/pages.js
+++ b/customize.dist/pages.js
@@ -280,9 +280,45 @@ define([
Pages['/contact.html'] = function () {
return h('div#cp-main', [
infopageTopbar(),
+ h('div.container-fluid.cp-contdet', [
+ h('row.col-12.col-sm-12',
+ h('h1.text-center', Msg.contact )
+ )
+ ]),
h('div.container.cp-container', [
- h('center', h('h1', Msg.contact)),
- setHTML(h('p'), Msg.main_about_p2)
+ h('div.row.cp-iconCont.align-items-center', [
+ h('div.col-12',
+ setHTML(h('h4.text-center'), Msg.main_about_p26)
+ ),
+ h('div.col-6.col-sm-3.col-md-3.col-lg-3',
+ h('a.card', {href : "https://twitter.com/cryptpad"},
+ h('div.card-body',
+ setHTML(h('p'), Msg.main_about_p22)
+ )
+ )
+ ),
+ h('div.col-6.col-sm-3.col-md-3.col-lg-3',
+ h('a.card', {href : "https://github.com/xwiki-labs/cryptpad/issues/"},
+ h('div.card-body',
+ setHTML(h('p'), Msg.main_about_p23)
+ )
+ )
+ ),
+ h('div.col-6.col-sm-3.col-md-3.col-lg-3',
+ h('a.card', {href : "https://riot.im/app/#/room/#cryptpad:matrix.org"},
+ h('div.card-body',
+ setHTML(h('p'), Msg.main_about_p24)
+ )
+ )
+ ),
+ h('div.col-6.col-sm-3.col-md-3.col-lg-3',
+ h('a.card', {href : "mailto:research@xwiki.com"},
+ h('div.card-body',
+ setHTML(h('p'), Msg.main_about_p25)
+ )
+ )
+ ),
+ ]),
]),
infopageFooter(),
]);
diff --git a/customize.dist/src/less2/pages/page-contact.less b/customize.dist/src/less2/pages/page-contact.less
index 56a60022c..a8ce6fa04 100644
--- a/customize.dist/src/less2/pages/page-contact.less
+++ b/customize.dist/src/less2/pages/page-contact.less
@@ -7,3 +7,84 @@
.fa {
padding-right: 0.25em;
}
+#cp-main {
+ background-color: #fff;
+}
+.cp-container {
+ background: #fff;
+ .cp-iconCont{
+ h4 {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+ }
+ div {
+ .card {
+ padding: 4em 1em 0.5em 1em;
+ box-shadow: 0 5px 15px rgba(69,145,196, 0.3);
+ border-color: #fff;
+ text-align: center;
+ margin-bottom: 1em;
+ &:hover, &:focus {
+ text-decoration: none;
+ transform: scale(1.05);
+ }
+ @media (max-width: 1200px) and (min-width: 769px) {
+ min-height: 139px;
+ }
+ @media (max-width: 768px) and (min-width: 576px){
+ min-height: 164px;
+ }
+ @media (max-width: 496px) {
+ min-height: 140px;
+ }
+ @media (max-width: 335px) {
+ min-height: 162px;
+ }
+ }
+ &:nth-child(2) {
+ .card {
+ background-image: url(/customize/images/twitter.svg);
+ background-repeat: no-repeat;
+ background-position: 50% 10%;
+ background-size: 3rem;
+ }
+ }
+ &:nth-child(3) {
+ .card {
+ background-image: url(/customize/images/issue.svg);
+ background-repeat: no-repeat;
+ background-position: 50% 10%;
+ background-size: 3rem;
+ }
+ }
+ &:nth-child(4) {
+ .card {
+ background-image: url(/customize/images/sayhi.svg);
+ background-repeat: no-repeat;
+ background-position: 50% 10%;
+ background-size: 3rem;
+ }
+ }
+ &:nth-child(5) {
+ .card {
+ background-image: url(/customize/images/email.svg);
+ background-repeat: no-repeat;
+ background-position: 50% 10%;
+ background-size: 3rem;
+ }
+ }
+ }
+ }
+}
+.cp-contdet {
+ padding-top: 3em;
+ padding-bottom: 3em;
+ background-image: url(/customize/images/bkcontact.jpg);
+ background-size: cover;
+ background-repeat: no-repeat;
+ background-position: center;
+ h1 {
+ font-weight: 700;
+ color: #fff;
+ }
+}
diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js
index 43cbc9b22..6e92a6098 100644
--- a/customize.dist/translations/messages.js
+++ b/customize.dist/translations/messages.js
@@ -515,7 +515,12 @@ define(function () {
out.main_howitworks_p1 = 'CryptPad uses a variant of the Operational transformation algorithm which is able to find distributed consensus using a Nakamoto Blockchain, a construct popularized by Bitcoin. This way the algorithm can avoid the need for a central server to resolve Operational Transform Edit Conflicts and without the need for resolving conflicts, the server can be kept unaware of the content which is being edited on the pad.';
// contact.html
- out.main_about_p2 = 'If you have any questions or comments, feel free to reach out! You can tweet us, open an issue on GitHub. Come say hi on our Matrix channel or IRC (#cryptpad on irc.freenode.net), or send us an email.';
+ out.main_about_p2 = 'If you have any questions or comments, feel free to reach out! You can tweet us, open an issue on GitHub. Come say hi on our Matrix channel or IRC (#cryptpad on irc.freenode.net), or send us an email.';
+ out.main_about_p22 = 'Tweet us';
+ out.main_about_p23 = 'open an issue on GitHub';
+ out.main_about_p24 = 'say Hello (Matrix)';
+ out.main_about_p25 = 'send us an email';
+ out.main_about_p26 = 'If you have any questions or comments, feel free to reach out!'
out.main_info = "
Collaborate in Confidence
Grow your ideas together with shared documents while Zero Knowledge technology secures your privacy; even from us.";
out.main_catch_phrase = "The Zero Knowledge Cloud";
diff --git a/www/common/common-realtime.js b/www/common/common-realtime.js
index 2222dc2bc..c9dd74b29 100644
--- a/www/common/common-realtime.js
+++ b/www/common/common-realtime.js
@@ -44,7 +44,7 @@ define([
// inform the user their session is in a bad state
Cryptpad.confirm(Messages.realtime_unrecoverableError, function (yes) {
if (!yes) { return; }
- window.location.reload();
+ window.parent.location.reload();
});
common.infiniteSpinnerDetected = true;
}, 2000);
diff --git a/www/common/media-tag-nacl.min.js b/www/common/media-tag-nacl.min.js
new file mode 100644
index 000000000..8210974fb
--- /dev/null
+++ b/www/common/media-tag-nacl.min.js
@@ -0,0 +1 @@
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.MediaTag=e():t.MediaTag=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=87)}([function(t,e,r){"use strict";var n={IMAGE:"image",AUDIO:"audio",VIDEO:"video",PDF:"pdf",DASH:"dash",DOWNLOAD:"download",CRYPTO:"crypto",CLEAR_KEY:"clear-key",MEDIA_OBJECT:"media-object"};t.exports=n},function(t,e,r){"use strict";var n={MATCHER:"matcher",RENDERER:"renderer",FILTER:"filter",SANITIZER:"sanitizer"};t.exports=n},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=function(){function t(t,e){for(var r=0;r0}}]),t}();t.exports=i},function(t,e,r){"use strict";var n=r(16),o=r(15);t.exports=function(t,e){e.mediaObjects.forEach(function(t){n(t)}),e.activeMediaObject=t,o(t)}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=r(1),a=r(5),s=r(3),c=function(t){function e(t){return n(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.FILTER,a.ANY))}return i(e,t),e}(s);t.exports=c},,,function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=function(){function t(t,e){for(var r=0;r=0&&f.mediaTypes.splice(e,1)},f.removeAllAllowedMediaTypes=function(t){t.forEach(function(t){f.removeAllowedMediaType(t)})},f.isAllowedMediaType=function(t){return f.mediaTypes.some(function(e){return e===t})},t.exports=f},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r1)throw new Error("More than one plugin matched to update for this pass");1===e.length?e.forEach(function(e){Object.keys(t).forEach(function(r){e[r]=t[r]})}):n.pluginStore.store(t)})},n.configure=function(t){(n.loadingEngine||n.processingEngine).configure(t)},n.loadConfigurations=function(t){var e=t.filter(function(t){return t.hasAttribute("configuration")}).map(function(t){return t.getAttribute("configuration")}).reduce(function(t,e){return t.includes(e)||t.push(e),t},[]).map(function(t){return n.loader.configuration(t)});return Promise.all(e).then(function(t){var e=[];return t.forEach(function(t){n.update(t),n.configure(t),t.dependencies&&t.dependencies.forEach(function(t){e.includes(t)||e.push(t)})}),Promise.all(e.map(function(t){return n.loader.script(t)}))})},n.pluginStore=n.pluginStore||new i,n.processingEngine=n.processingEngine||new o(n.pluginStore),n.loader=new a,t.exports=n},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=r(1),a=r(5),s=r(3),c=function(t){function e(t){return n(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.SANITIZER,a.EVERY))}return i(e,t),e}(s);t.exports=c},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=function(){function t(t,e){for(var r=0;r MediaTag cannot find a plugin able to render your content "),this.STACK_SIZE=50,this.SNAPSHOTS_LIMIT=50}return o(t,[{key:"key",value:function(t){return t.getId()}},{key:"configure",value:function(t){var e=this;this.configuration=t,t.processingEngine&&Object.keys(t.processingEngine).forEach(function(r){e[r]="defaultPlugin"===r?t.getDefaultPlugin():r})}},{key:"isConfigured",value:function(){return Boolean(this.configuration)}},{key:"prepare",value:function(t){var e=this;!function(){t.return=function(){return e.return(t)},t.state="processing"}();var r=t.getId();this.stacks.store(r,new h),this.snapshots.store(r,new p),this.stats.store(r,{})}},{key:"start",value:function(t){this.prepare(t),this.routine(t),this.run(t)}},{key:"run",value:function(t){var e=this.key(t),r=this.stacks.top(e);if(!r)return this.end(t);this.configuration?this.configuration.isAllowed(r.identifier)?(r.process||console.warn("FALSY PLUGIN",r),r.process(t)):(this.skip(t,r),this.return(t)):r.process(t)}},{key:"routine",value:function(t){this.fill(t),this.snapshot(t),this.check(t)}},{key:"snapshot",value:function(t){var e=this.key(t),r=this.stacks.get(e).clone();this.snapshots.stack(e,r)}},{key:"fill",value:function(t){var e=this,r=this.key(t),n=this.pluginStore.values(),o=n.filter(function(t){return t.getType()===a.MATCHER}).filter(function(e){return e.process(t)}).map(function(t){return t.getIdentifier()}),i=n.filter(function(t){return t.getType()!==a.MATCHER}).filter(function(t){return o.includes(t.getIdentifier())}),u=s.filterByOccurrencies(i);Object.keys(u).forEach(function(n){u[n].forEach(function(n){e.configuration.isAllowed(n.getIdentifier())?e.stacks.get(r).isStackable(n)&&e.stacks.stack(r,n):e.skip(t,n)})})}},{key:"skip",value:function(t,e){var r=t.getId(),n=this.stats.get(r);n?n.skipped||(n.skipped=[]):n={skipped:[]},n.skipped.push(e.identifier)}},{key:"unstack",value:function(t){var e=t.getId();return this.stacks[e]?this.stacks[e].pop():null}},{key:"check",value:function(t){var e=t.getId();if(this.stacks.length(e)>=this.STACK_SIZE)throw console.error("SNAPSHOTS",this.snapshots.get(e)),new Error("Plugin stack size exceed");if(this.snapshots.length(e)>=this.SNAPSHOT_LIMIT)throw console.error("SNAPSHOTS",this.snapshots.get(e)),new Error("Plugin snapshots count exceed");var r=0;if(this.stacks.plugins(e).forEach(function(t){t.type===a.RENDERER&&r++}),r>1)throw console.error("SNAPSHOTS",this.snapshots.get(e)),new Error("More of one renderer in the stack");if(0===this.stacks.length(e)&&!this.stats.get(e)[a.RENDERER]){if(!this.defaultPlugin)throw new Error("No default plugin assignated");this.stacks.stack(e,this.defaultPlugin)}}},{key:"return",value:function(t){var e=t.getId(),r=this.stacks.unstack(e);if(!r)return this.end(t);try{this.stats.get(e)||this.stats.store(e,{}),this.stats.get(e)[r.type]?this.stats.get(e)[r.type]+=1:this.stats.get(e)[r.type]=1}catch(t){console.error(t,this.snapshots.get(e))}r.type!==a.SANITIZER&&r.type!==a.RENDERER&&this.fill(t),this.snapshot(t),this.check(t),this.run(t)}},{key:"end",value:function(t){return t.status="processed",t}},{key:"setDefaultPlugin",value:function(t){this.defaultPlugin=t}}]),t}();t.exports=y},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r0&&n(t.mediaObjects[e-1],t)}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r1?e[0]:window.location.protocol}},{key:"hostname",value:function(t){var e=t.getAttribute("src").split("://");return e.length>1?e[1].split("/")[0]:window.location.hostname}},{key:"source",value:function(t){return t.getAttribute("src")}},{key:"schemes",value:function(t){return/\w+:/.exec(t.getAttribute("src"))}},{key:"sources",value:function(t){var e=t.getAttribute("sources")||t.getAttribute("srcs");return e?JSON.parse(e):null}},{key:"actions",value:function(t){var e=t.getAttribute("actions");return e?JSON.parse(e):null}},{key:"parse",value:function(e){return{protocol:t.protocol(e),hostname:t.hostname(e),src:t.source(e),type:t.type(e),extension:t.extension(e),mime:t.mime(e),sources:t.sources(e),actions:t.actions(e)}}}]),t}();t.exports=i},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r1;){if("number"!=typeof t[e])throw new Error("E_UNSAFE_TYPE");if(t[e]>255)throw new Error("E_OUT_OF_BOUNDS");if(255!==t[e])return void t[e]++;if(t[e]=0,0===e)throw new Error("E_NONCE_TOO_LARGE")}}},{key:"encodePrefix",value:function(t){return[65280,255].map(function(e,r){return(t&e)>>8*(1-r)})}},{key:"decodePrefix",value:function(t){return t[0]<<8|t[1]}},{key:"joinChunks",value:function(t){return new Blob(t)}},{key:"slice",value:function(t){return Array.prototype.slice.call(t)}},{key:"getRandomKeyStr",value:function(){var t=window.nacl,e=t.randomBytes(18);return t.util.encodeBase64(e)}},{key:"getKeyFromStr",value:function(t){return window.nacl.util.decodeBase64(t)}},{key:"encrypt",value:function(e,r){var n=e,o=window.nacl.randomBytes(24),i=window.nacl.secretbox(n,o,r);if(i)return new Uint8Array(t.slice(o).concat(t.slice(i)));throw new Error}},{key:"decrypt",value:function(e,r,n){var o=window.nacl,i=function(t){var r=new Event("decryptionProgress");r.percent=t/e.length*100,window.document.dispatchEvent(r)},u=t.createNonce(),a=0,s=e.subarray(0,2),c=t.decodePrefix(s),f={metadata:void 0},l=new Uint8Array(e.subarray(2,2+c)),h=o.secretbox.open(l,u,r);t.increment(u);try{f.metadata=JSON.parse(o.util.encodeUTF8(h))}catch(t){return n("E_METADATA_DECRYPTION")}if(!f.metadata)return n("NO_METADATA");var p=function(n){setTimeout(function(){var s=131088*a+2+c,f=s+131088;a++;var l=new Uint8Array(e.subarray(s,f)),h=o.secretbox.open(l,u,r);if(t.increment(u),!h)return void n("DECRYPTION_FAILURE");i(Math.min(f,e.length)),n(void 0,h)})},y=[];!function r(){p(function(o,i){return o?setTimeout(function(){n(o)}):i?131088*a0&&o(t),e()}catch(t){r(t)}})}function u(e){i(t(e)).catch(function(t){console.error(t)})}var a=new MutationObserver(u),s=document.body,c={characterData:!0,childList:!0,attributes:!0,subtree:!0};a.observe(s,c),i(Array.from(document.getElementsByTagName("media-tag")))}),t.exports=o},function(t,e,r){"use strict";var n=r(42),o=r(43),i=r(64),u=r(65),a=r(66),s=r(67),c=r(68),f=r(19),l=r(12),h=r(44),p=r(45),y=r(46);y.PdfPlugin=s,y.PdfPlugin.viewer="/pdfjs/web/viewer.html",l.functionStore.store("salsa20poly1305",n),l.functionStore.store("cryptpad",o),y.processingEngine.setDefaultPlugin(new f("