Merge branch 'staging' into new-messaging

pull/1/head
ansuz 8 years ago
commit 253ab68d8d

@ -82,23 +82,6 @@ module.exports = {
*/
websocketPath: '/cryptpad_websocket',
/* it is assumed that your websocket will bind to the same port as http
* you can override this behaviour by supplying a number via websocketPort
*/
//websocketPort: 3000,
/* if you want to run a different version of CryptPad but using the same websocket
* server, you should use the other server port as websocketPort and disable
* the websockets on that server
*/
//useExternalWebsocket: false,
/* If CryptPad is proxied without using https, the server needs to know.
* Specify 'useSecureWebsockets: true' so that it can send
* Content Security Policy Headers that prevent http and https from mixing
*/
useSecureWebsockets: false,
/* CryptPad can log activity to stdout
* This may be useful for debugging
*/
@ -238,14 +221,6 @@ module.exports = {
*/
suppressRPCErrors: false,
/* WARNING: EXPERIMENTAL
*
* CryptPad features experimental support for encrypted file upload.
* Our encryption format is still liable to change. As such, we do not
* guarantee that files uploaded now will be supported in the future
*/
/* Setting this value to anything other than true will cause file upload
* attempts to be rejected outright.
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
</style>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="1.6" y1="12" x2="22.4" y2="12">
<stop offset="0" style="stop-color:#4592C4"/>
<stop offset="1" style="stop-color:#545ACD"/>
</linearGradient>
<path class="st0" d="M12.9,3l2,0.4L11.1,21l-2-0.4L12.9,3 M19.6,12L16,8.4V5.6l6.4,6.4L16,18.4v-2.8L19.6,12 M1.6,12L8,5.6v2.8
L4.4,12L8,15.6v2.8L1.6,12z"/>
</svg>

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

@ -46,7 +46,9 @@ define([
h('div.container', [
h('div.row', [
footerCol(null, [
setHTML(h('div.cp-bio-foot'), '<p>With CryptPad, you can make quick collaborative documents for taking notes and writing down ideas together.</p>'),
h('div.cp-bio-foot', [
h('p', Msg.main_footerText)
])
], ''),
/* footerCol(null, [
footLink('/about.html', 'about'),
@ -121,45 +123,110 @@ define([
]),
]),
h('div.container.cp-container', [
/*h('center', [
h('h1', Msg.about)
]),
setHTML(h('p'), 'CryptPad is created inside of the Research Team at <a href="http://xwiki.com">XWiki SAS</a>, a small business located in Paris France and Iasi Romania. There are 3 core team members working on CryptPad plus a number of contributors both inside and outside of XWiki SAS.'),*/
h('div.row', [
h('h2.col-12', 'Core Developers'),
h('div.col-md-4', [
h('img.bio-avatar', {'src': '/customize/images/aaron.jpg'}),
h('h3', "Aaron MacSween"),
setHTML(h('div#bio'), '<p>Aaron transitioned into distributed systems development from a background in jazz and live stage performance.</p><p>He appreciates the elegance of biological systems and functional programming, and focused on both as a student at the University of Toronto, where he studied cognitive and computer sciences.</p><p>He moved to Paris in 2015 to work as a research engineer at XWiki SAS, after having dedicated significant time to various cryptography-related software projects.</p><p>He spends his spare time experimenting with guitars, photography, science fiction, and spicy food.</p>')
h('div.cp-develop-about.col-12',[
h('div.cp-icon-cent'),
h('h2.text-center', 'Core Developers')
]),
]),
h('div.col-md-4', [
h('img.bio-avatar', {'src': '/customize/images/caleb.jpg'}),
h('div.row.align-items-center', [
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-bio-avatar', [
h('img.img-fluid', {'src': '/customize/images/CalebJames.jpg'})
]),
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-profile-det', [
h('h3', "Caleb James Delisle"),
setHTML(h('div#bio'), '<p>Caleb is a cryptography developer, Machine Technology graduate of the Franklin County Technical School and lifelong tinkerer.</p><p>In 2011, he started the cjdns Open Source project to show that secure networking could be invisible and easily deployed.</p><p>After joining XWiki SAS in 2014, he started the CryptPad project with the intent of bringing the same transparent security to collaborative editing.</p><p>He\'s always trying to learn from more experienced colleagues and when someone passes through the Research Team office, his favorite words are "Pull up a chair!".</p>')
h('hr'),
setHTML(h('div#bioCaleb'), '<p>Caleb is a cryptography developer, Machine Technology graduate of the Franklin County Technical School and lifelong tinkerer.<br/>In 2011, he started the cjdns Open Source project to show that secure networking could be invisible and easily deployed.<br/>After joining XWiki SAS in 2014, he started the CryptPad project with the intent of bringing the same transparent security to collaborative editing.<br/>He\'s always trying to learn from more experienced colleagues and when someone passes through the Research Team office, his favorite words are "Pull up a chair!".</p>'),
h('a.cp-soc-media', { href : 'https://twitter.com/cjdelisle'}, [
h('i.fa.fa-twitter')
]),
h('a.cp-soc-media', { href : 'https://github.com/cjdelisle'}, [
h('i.fa.fa-github')
])
]),
]),
h('div.row.align-items-center',[
h('div.col-12.col-sm-12.col-md-12.col-lg-6.push-lg-6.cp-bio-avatar.cp-bio-avatar-right', [
h('img.img-fluid', {'src': '/customize/images/AaronMacSween.jpg'})
]),
h('div.col-md-4', [
h('img.bio-avatar', {'src': '/customize/images/yann.jpg'}),
h('div.col-12.col-sm-12.col-md-12.col-lg-6.pull-lg-6.cp-profile-det',[
h('h3', "Aaron MacSween"),
h('hr'),
setHTML(h('div#bioAaron'), '<p>Aaron transitioned into distributed systems development from a background in jazz and live stage performance. <br/> He appreciates the elegance of biological systems and functional programming, and focused on both as a student at the University of Toronto, where he studied cognitive and computer sciences.<br/>He moved to Paris in 2015 to work as a research engineer at XWiki SAS, after having dedicated significant time to various cryptography-related software projects.<br/>He spends his spare time experimenting with guitars, photography, science fiction, and spicy food.</p>'),
h('a.cp-soc-media', { href : 'https://twitter.com/fc00ansuz'}, [
h('i.fa.fa-twitter')
]),
h('a.cp-soc-media', { href : 'https://github.com/ansuz/'}, [
h('i.fa.fa-github')
])
]),
]),
h('div.row.align-items-center', [
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-bio-avatar', [
h('img.img-fluid', {'src': '/customize/images/YannFlory.jpg'})
]),
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-profile-det', [
h('h3', "Yann Flory"),
setHTML(h('div#bio'), '<p>Yann is a mysterious person.</p>')
h('hr'),
setHTML(h('div#bioYann'), '<p>In 2015, Yann graduated with an engineering degree from Ecole Centrale de Lille majoring in Data Science. In his studies he worked on a project to detect defects in optical fiber using image processing technology.<br/>Upon joining XWiki SAS, Yann developed a Wiki page recommendation system, a common API for accessing data server-side and client-side, and an integrated development environment for development of XWiki applications.<br/>Yann is soft spoken but brutally efficient, he is known to say "It will take 5 minutes".</p>'),
h('a.cp-soc-media', { href : 'https://github.com/yflory/'}, [
h('i.fa.fa-github')
])
]),
]),
h('h2', 'Key Contributors'),
h('div.row', [
h('div.col-md-4', [
h('img.bio-avatar', {'src': '/customize/images/Pierre-new.jpg'}),
h('div.cp-develop-about.col-12.cp-contrib',[
h('div.cp-icon-cent'),
h('h2.text-center', 'Key Contributors')
]),
]),
h('div.row.align-items-center', [
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-bio-avatar', [
h('img.img-fluid', {'src': '/customize/images/Pierre-new.jpg'})
]),
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-profile-det', [
h('h3', "Pierre Bondoerffer"),
setHTML(h('div#bio'), '<p>Resident CSS wizard and emoji extraordinaire, Pierre is passionate about anything related to technology. He loves to hack around computers and put parts together.</p><p>He is currently studying at 42, where he learns about algorithms, networking, kernel programming and graphics.</p><p>As a part of an internship, he joined XWiki SAS and worked on CryptPad to improve user experience. He also maintains the Spanish translation.</p>')
h('hr'),
setHTML(h('div#bioPierre'), '<p>Resident CSS wizard and emoji extraordinaire, Pierre is passionate about anything related to technology. He loves to hack around computers and put parts together.<br/>He is currently studying at 42, where he learns about algorithms, networking, kernel programming and graphics.<br/>As a part of an internship, he joined XWiki SAS and worked on CryptPad to improve user experience. He also maintains the Spanish translation.</p>'),
h('a.cp-soc-media', { href : 'https://twitter.com/cjdelisle'}, [
h('i.fa.fa-twitter')
]),
h('a.cp-soc-media', { href : 'https://github.com/cjdelisle'}, [
h('i.fa.fa-github')
])
]),
]),
h('div.row.align-items-center',[
h('div.col-12.col-sm-12.col-md-12.col-lg-6.push-lg-6.cp-bio-avatar.cp-bio-avatar-right', [
h('img.img-fluid', {'src': '/customize/images/Catalin.jpg'})
]),
h('div.col-md-4', [
h('img.bio-avatar', {'src': '/customize/images/Catalin.jpg'}),
h('div.col-12.col-sm-12.col-md-12.col-lg-6.pull-lg-6.cp-profile-det',[
h('h3', "Catalin Scripcariu"),
setHTML(h('div#bio'), '<p> Catalin is a Maths majour and has worked in B2B sales for 12 years. Design was always his passion and 3 years ago he started to dedicate himself to web design and front-end.</p><p>At the beginning of 2017 he joined the XWiki family, where he worked both on the business and the community side of XWiki, including the research team and CryptPad. </p>')
h('hr'),
setHTML(h('div#bioCatalin'), '<p> Catalin is a Maths majour and has worked in B2B sales for 12 years. Design was always his passion and 3 years ago he started to dedicate himself to web design and front-end.<br/>At the beginning of 2017 he joined the XWiki, where he worked both on the business and the community side of XWiki, including the research team and CryptPad. </p>'),
h('a.cp-soc-media', { href : 'https://twitter.com/catalinscr'}, [
h('i.fa.fa-twitter')
]),
h('a.cp-soc-media', { href : 'https://www.linkedin.com/in/catalinscripcariu/'}, [
h('i.fa.fa-linkedin')
])
]),
h('div.col-md-4', [
h('img.bio-avatar', {'src': '/customize/images/ludovic.jpg'}),
]),
h('div.row.align-items-center.cp-margin-bot', [
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-bio-avatar', [
h('img.img-fluid', {'src': '/customize/images/LudovicDuboist.jpg'})
]),
h('div.col-12.col-sm-12.col-md-12.col-lg-6.cp-profile-det', [
h('h3', "Ludovic Dubost"),
setHTML(h('div#bio'), '<p>A graduate of PolyTech (X90) and Telecom School in Paris, Ludovic Dubost started his career as a software architect for Netscape Communications Europe. He then became CTO of NetValue, one of the first French start-ups that went public. He left NetValue after the company was purchased by Nielsen/NetRatings and in 2004 launched XWiki, the next generation wiki.</p><p>Since the very beginning, Ludovic has been immensely helpful to the CryptPad project. He believed in the idea when there was nothing more than the collaborative pad and his help with sales strategy for the project.</p>')
])
h('hr'),
setHTML(h('div#bioLudovic'), '<p>A graduate of PolyTech (X90) and Telecom School in Paris, Ludovic Dubost started his career as a software architect for Netscape Communications Europe. He then became CTO of NetValue, one of the first French start-ups that went public. He left NetValue after the company was purchased by Nielsen/NetRatings and in 2004 launched XWiki, the next generation wiki.<br/>Since the very beginning, Ludovic has been immensely helpful to the CryptPad project. He believed in the idea when there was nothing more than the collaborative pad and his help with sales strategy for the project.</p>'),
h('a.cp-soc-media', { href : 'https://twitter.com/ldubost'}, [
h('i.fa.fa-twitter')
]),
h('a.cp-soc-media', { href : 'https://github.com/ldubost'}, [
h('i.fa.fa-github')
])
]),
]),
]),
infopageFooter()
@ -333,10 +400,18 @@ define([
Pages['/register/'] = Pages['/register/index.html'] = function () {
return [h('div#cp-main', [
infopageTopbar(),
h('div.container-fluid.cp-register-wel',[
h('div.container',[
h('div.row',[
h('div.col-12',[
h('h1.text-center', Msg.register_header)
])
])
])
]),
h('div.container.cp-container', [
h('div.row.align-items-center', [
h('div.row.cp-register-det', [
h('div#data.hidden.col-md-6', [
h('h1', Msg.register_header),
setHTML(h('p.register-explanation'), Msg.register_explanation)
]),
h('div#userForm.form-group.hidden.col-md-6', [
@ -380,10 +455,18 @@ define([
'for': 'accept-terms',
}), Msg.register_acceptTerms),*/
]),
h('button#register.btn.btn-primary', Msg.login_register)
h('button#register.btn.cp-login-register', Msg.login_register)
])
]),
h('div.row.cp-register-test',[
h('hr'),
h('div.col-12', [
setHTML(h('p.test-details'), Msg.register_testimonial),
h('a.cp-test-source.pull-right', { href : 'http://boingboing.net/2016/09/26/cryptpad-a-freeopen-end-to.html'}, Msg.register_testimonial_name)
])
])
]),
infopageFooter(),
])];
};
@ -411,8 +494,8 @@ define([
placeholder: Msg.login_password,
}),
h('div.extra', [
h('button.btn.btn-primary.login.first', Msg.login_login),
h('button#register.btn.btn-success.register', Msg.login_register)
h('button.login.first.btn', Msg.login_login),
h('button#register.btn.register.cp-login-register', Msg.login_register)
])
])
]),

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
</style>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="4" y1="12" x2="20" y2="12">
<stop offset="0" style="stop-color:#4592C4"/>
<stop offset="1" style="stop-color:#545ACD"/>
</linearGradient>
<path class="st0" d="M13,14c-3.4,0-4.5,1.4-4.8,2.2C9.3,16.7,10,17.8,10,19c0,1.7-1.3,3-3,3s-3-1.3-3-3c0-1.3,0.8-2.4,2-2.8V7.8
C4.8,7.4,4,6.3,4,5c0-1.7,1.3-3,3-3s3,1.3,3,3c0,1.3-0.8,2.4-2,2.8v5.3c0.9-0.6,2.2-1.1,4-1.1c2.7,0,3.6-1.3,3.9-2.2
C14.8,9.3,14,8.3,14,7c0-1.7,1.3-3,3-3s3,1.3,3,3c0,1.3-0.9,2.5-2.1,2.9C17.6,11.3,16.7,14,13,14 M7,18c-0.6,0-1,0.4-1,1s0.4,1,1,1
s1-0.4,1-1S7.6,18,7,18 M7,4C6.4,4,6,4.4,6,5s0.4,1,1,1s1-0.4,1-1S7.6,4,7,4 M17,6c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1
S17.6,6,17,6z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -600,6 +600,7 @@ noscript {
width: ~"calc(100% - 6px)";
height: 25px;
line-height: 25px;
overflow: hidden;
.usage {
height: 100%;
display: inline-block;

@ -1,7 +1,7 @@
@import "./variables.less";
@import (once) "../less2/include/colortheme.less";
.cp footer {
footer {
background: @category-bg;
font-family: @colortheme_font;
padding-top: 1em;

@ -66,3 +66,5 @@
@cryptpad_color_blue: #4591C4;
@cryptpad_color_grey: #999999;
@cryptpad_header_col: #1E1F1F;
@cryptpad_text_col: #3F4141;

@ -6,22 +6,18 @@
// Basic setup for info pages, this should be used at the global level
.infopages_main () {
background-color: @colortheme_info-background;
a {
color: @cryptpad_color_blue;
&:visited { color: darken(@cryptpad_color_blue, 10%); }
&:visited { color: darken(@cryptpad_color_blue, 5%); }
}
a:hover {
opacity: 1;
}
border: 0;
padding: 0;
margin: 0;
font-size: 16px;
font-family: @colortheme_font;
.cp-container {
font-size: 16px;
padding-top: @infopages_padding;
@ -41,24 +37,19 @@
margin-top: 1em;
margin-bottom: 0.5em;
}
img {
&.left {
float: left;
}
max-width: 100%;
}
.form-group {
& > * {
margin-top: 0.5em;
}
display: flex;
flex-direction: column;
align-items: center;
.checkbox-container {
width: 100%;
display: flex;
@ -72,7 +63,6 @@
}
}
}
footer {
background-color: @cryptpad_color_blue;
.container {
@ -82,7 +72,7 @@
a {
color: #fff;
&:visited {
color: darken(#fff, 10%);
color: darken(#fff, 5%);
};
}
margin-bottom: 1em;
@ -130,12 +120,10 @@
z-index: 9001;
position: fixed;
top: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
width: 100%;
height: @infopages_infobar-height;
@ -144,24 +132,20 @@
vertical-align: middle;
font-size: 1.25em;
line-height: 1.25em;
cursor: default;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
.navbar-nav {
display: flex;
align-items: center;
}
a {
font-weight: 500;
padding: 0.6em;
.infopages_link()
}
.cp-logo {
margin-right: 0.5em;
}

@ -3,12 +3,8 @@
.infopages_main();
.infopages_topbar();
.bio-avatar {
border-radius: 50%;
margin: 1em 0;
max-width: 300px;
max-height: 300px;
#cp-main {
background: #fff;
}
.cp-about-intro {
padding-top: 3em;
@ -21,7 +17,7 @@
color: #fff;
font-family: "Open Sans";
h1 {
font-weight: bold;
font-weight: 700;
}
a {
color: #fff;
@ -31,5 +27,89 @@
padding-top: 1em;
}
}
}
.cp-container {
.row {
background: #fff;
}
.cp-bio-avatar {
padding-right: 0;
@media (max-width: 991px) {
padding-right: 15px;
}
img {
@media (max-width: 991px) {
margin: 0 auto;
display: block;
}
}
}
.cp-bio-avatar-right {
padding-right: 15px;
padding-left: 0;
@media (max-width: 991px) {
padding-left: 15px;
}
}
}
.cp-develop-about {
.cp-icon-cent {
width: 6rem;
background: #fff;
border-radius: 50%;
height: 6rem;
box-shadow: 0 5px 15px rgba(69,145,196, 0.3);
margin: 0 auto;
background-image: url(/customize/code.svg);
background-repeat: no-repeat;
margin-top: 1em;
margin-bottom: 1.5em;
background-position: 50%;
background-size: 4rem;
}
h2 {
margin-top: 0;
font-weight: 600;
color: #1E1F1F;
margin-bottom: 1.5em;
}
}
.cp-profile-det {
padding-left: 30px;
h3 {
color: #1E1F1F;
font-weight: 700;
}
p {
color: #3F4141;
margin-bottom: 1em;
}
hr {
margin-left: 0;
width: 15rem;
border-top: 2px solid @cryptpad_color_blue;
}
margin-bottom: 1em;
}
.cp-soc-media {
font-size: 1.5em;
color: @cryptpad_color_blue;
padding-right: 1em;
display: inline-block;
&:hover {
transform: scale(1.1);
}
&:visited {
color: @cryptpad_color_blue;
}
}
.cp-contrib {
margin-top: 3em;
.cp-icon-cent {
background-image: url(/customize/source-branch.svg);
background-position: 60%;
}
}
.cp-margin-bot {
margin-bottom: 1.5em;
}

@ -25,6 +25,9 @@
}
}
}
body {
font-family: "Open Sans", Helvetica;
}
.cp-right {
.cp-register-btn {
padding: 0.5em 1em 0.7em 1em;
@ -75,7 +78,7 @@
a {
color: #fff;
&:visited {
color: rgba(255,255,255,.8);
color: rgba(255,255,255,.9);
};
}
.nav-link {

@ -17,3 +17,62 @@
}
}
}
.cp-container {
#data {
background: #4591C4;
padding-top: 3em;
padding-bottom: 7em;
padding-left: 30px;
padding-right: 30px;
p {
color: #fff;
}
h2 {
font-weight: 700;
color: @cryptpad_header_col;
}
}
#userForm {
padding-top: 3em;
padding-bottom: 2em;
.form-control {
border-radius: 0;
color: @cryptpad_text_col;
margin-top: 1em;
&:focus {
border-color: @cryptpad_color_blue;
}
}
.checkbox-container {
color: @cryptpad_text_col;
}
}
.align-items-center {
box-shadow: 0 5px 15px rgba(69,145,196, 0.3);
background: #fff;
}
.extra {
margin-top: 1em;
.cp-login-register {
color: @cryptpad_color_blue;
background: #fff;
border: 2px solid @cryptpad_color_blue;
border-radius: 0;
&:hover {
transform: scale(1.05);
}
}
.login {
background: transparent;
color: @cryptpad_color_blue;
padding: 0;
&:hover {
transform: scale(1.05);
}
}
}
}
.cp-container {
padding-top: 0;
min-height: 66vh;
}

@ -19,14 +19,112 @@
#register {
margin-top: 16px;
font-size: 1.25em;
min-width: 30%;
min-width: 30%; // conflict?
width: 30%;
@media (max-width: 500px) {
width: 45%;
}
}
}
padding-bottom: 3em;
min-height: 5vh;
}
.alertify {
// workaround for alertify making empty p
p:empty {
display: none;
}
}
.cp-register-wel {
padding-top: 6em;
padding-bottom: 20em;
background-image: url(/customize/bkregister.jpg);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
h1 {
font-weight: 700;
color: #fff;
text-shadow: 0 1px 5px rgba(0,0,0,.2);
}
}
.cp-register-det {
margin-top: -7em;
background: #fff;
box-shadow: 0 5px 15px rgba(69,145,196, 0.3);
#data {
background: #4591C4; /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #FF7C4F, #4592C4); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #FF7C4F, #4592C4); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
padding-top: 3em;
padding-bottom: 7em;
padding-left: 30px;
padding-right: 30px;
p {
color: #fff;
li {
margin-bottom: 1em;
}
.fa {
font-size: 1.5em;
padding-right: 10px;
color: #000;
}
}
h3 {
font-weight: 700;
margin-bottom: 1em;
}
}
#userForm {
padding-top: 3em;
padding-bottom: 2em;
.form-control {
border-radius: 0;
color: @cryptpad_text_col;
margin-top: 1em;
&:focus {
border-color: @cryptpad_color_blue;
}
}
.checkbox-container {
color: @cryptpad_text_col;
}
}
.cp-login-register {
color: @cryptpad_color_blue;
background: #fff;
border: 2px solid @cryptpad_color_blue;
border-radius: 0;
&:hover {
transform: scale(1.05);
}
}
}
.cp-register-test {
margin-top: 3em;
hr {
width: 15rem;
border-top: 2px solid @cryptpad_color_blue;
margin-top: 0;
margin-bottom: 2em;
}
p {
margin-bottom: 0;
}
.cp-test-source {
font-style: italic;
}
.test-details {
padding-left: 4em;
background-image: url(/customize/testimonial.svg);
background-repeat: no-repeat;
background-position: left top;
background-size: 3em;
color: @cryptpad_text_col;
}
}
#cp-main {
background: #fff;
}

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 26 25" style="enable-background:new 0 0 26 25;" xml:space="preserve">
<style type="text/css">
.st0{fill:#4591C4;}
</style>
<title>testimonial</title>
<g id="Layer_2">
<g id="_25_Quote_Quotation_Text_Sample">
<path class="st0" d="M8.5,12l-4.1,0c0.5-3.5,2.9-6.5,6.2-7.7l0.2,0c1-0.4,1.6-1.5,1.2-2.6c-0.4-1-1.5-1.6-2.6-1.2l-0.2,0
c-5.3,2-8.8,7.1-8.8,12.7l0,7.4l0,0c-0.1,2,1.4,3.8,3.5,3.9c0.1,0,0.3,0,0.4,0l4,0c2,0.1,3.7-1.5,3.8-3.6c0,0,0-0.1,0-0.1l0-5l0,0
C12.1,13.8,10.5,12.1,8.5,12z M8.2,20.6l-3.9,0l0-4.7l3.9,0L8.2,20.6z"/>
<path class="st0" d="M25.5,15.8c0-2.1-1.7-3.8-3.8-3.8c0,0-0.1,0-0.1,0l-3.8,0c0.5-3.5,2.9-6.5,6.2-7.7h0.2c1-0.4,1.6-1.5,1.2-2.6
S24,0.2,22.9,0.5l-0.2,0c-5.3,2-8.8,7.1-8.8,12.7l0,7.6c0.1,2,1.7,3.6,3.7,3.7l4.1,0c2,0.1,3.8-1.4,3.9-3.5c0-0.1,0-0.3,0-0.4
L25.5,15.8L25.5,15.8z M21.7,20.7l-3.9,0l0-4.8l3.9,0l0,4.6V20.7z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -265,8 +265,8 @@ define(function () {
out.profile_fieldSaved = 'Nouvelle valeur enregistrée: {0}';
out.profile_inviteButton = "Inviter";
out.profile_inviteButtonTitle = 'Creer un lien pour inviter cet utilisateur à se connecter avec vous.';
out.profile_inviteExplanation = "Cliquer sur <strong>OK</strong> créera un lien vers un session de messagerie sécurisée <em>uniquement accessible par {0}.</em><br><br>Le lien peut être copié et partagé de manièé de manière publique.";
out.profile_inviteButtonTitle = 'Créer un lien pour inviter cet utilisateur à se connecter avec vous.';
out.profile_inviteExplanation = "Cliquer sur <strong>OK</strong> créera un lien vers une session de messagerie sécurisée <em>uniquement accessible par {0}.</em><br><br>Le lien peut être copié et partagé de manière publique.";
out.profile_viewMyProfile = "Voir mon profil";
// contacts/userlist
@ -413,7 +413,7 @@ define(function () {
"<li>Vous pouvez importer les pads récents de ce navigateur pour les avoir dans votre compte utilisateur.</li>",
"<li>Si vous utilisez un ordinateur partagé, vous devez vous déconnecter avant de partir, fermer l'onglet n'est pas suffisant.</li>",
"</ul>"
];
].join('');
// Settings
out.settings_cat_account = "Compte";
@ -487,8 +487,8 @@ define(function () {
out.todo_title = "CryptTodo";
out.todo_newTodoNamePlaceholder = "Décrivez votre tâche...";
out.todo_newTodoNameTitle = "Ajouter cette tâche à votre liste";
out.todo_markAsCompleteTitle = "Marquer tâche comme terminée";
out.todo_markAsIncompleteTitle = "Marquer tâche comme non incomplète";
out.todo_markAsCompleteTitle = "Marquer cette tâche comme terminée";
out.todo_markAsIncompleteTitle = "Marquer cette tâche comme incomplète";
out.todo_removeTaskTitle = "Enlever cette tâche de votre liste";
// pad
@ -506,7 +506,7 @@ define(function () {
//contact.html
out.main_about_p2 = 'Si vous avez des questions ou commentaires, vous pouvez <a href="https://twitter.com/cryptpad"><i class="fa fa-twitter"></i>nous tweeter</a>, ouvrir une issue sur <a href="https://github.com/xwiki-labs/cryptpad/issues/" title="our issue tracker"><i class="fa fa-github"></i>GitHub</a>, venir dire bonjour sur <a href="https://riot.im/app/#/room/#cryptpad:matrix.org" title="Matrix">notre <i class="fa fa-comment"></i>salle Matrix</a> ou IRC (#cryptpad sur irc.freenode.net), ou bien encore <a href="mailto:research@xwiki.com"><i class="fa fa-envelope"></i>nous envoyer un email</a>.';
out.main_info = "<h2>Collaborez avec confiance</h2><br>Développez vos idées en groupe avec des document partagés; la technologie <strong>Zero Knowledge</strong> sécurise vos données.";
out.main_info = "<h2>Collaborez avec confiance</h2><br>Développez vos idées en groupe avec des documents partagés; la technologie <strong>Zero Knowledge</strong> sécurise vos données.";
out.main_catch_phrase = "Le Cloud Zero Knowledge";
out.main_howitworks = 'Comment ça fonctionne';
@ -536,6 +536,7 @@ define(function () {
out.main_whiteboardPad = 'Tableau blanc';
out.main_localPads = 'Pads Locaux';
out.main_yourCryptDrive = 'Votre CryptDrive';
out.main_footerText = "Avec CryptPad, vous pouvez créer des documents collaboratifs rapidement pour prendre des notes à plusieurs.";
out.footer_applications = "Applications";
out.footer_contact = "Contact";
@ -589,7 +590,7 @@ define(function () {
out.header_support = '<a href="http://ng.open-paas.org/" title="OpenPaaS::ng" target="_blank" rel="noopener noreferrer"> <img src="/customize/openpaasng.png" alt="OpenPaaS-ng" class="bottom-bar-openpaas" /></a>';
out.updated_0_header_logoTitle = 'Retourner vers votre CryptDrive';
out.header_logoTitle = out.updated_0_header_logoTitle;
out.header_homeTitle = "Aller sur la page d'acceuil";
out.header_homeTitle = "Aller sur la page d'accueil";
// Initial states

@ -404,13 +404,15 @@ define(function () {
out.register_header = "Welcome to CryptPad";
out.register_explanation = [
"<p>Lets go over a couple things first</p>",
"<ul>",
"<li>Your password is your secret key which encrypts all of your pads. If you lose it there is no way we can recover your data.</li>",
"<li>You can import pads which were recently viewed in your browser so you have them in your account.</li>",
"<li>If you are using a shared computer, you need to log out when you are done, closing the tab is not enough.</li>",
"<h3>Lets go over a couple things first:</h3>",
"<ul class='list-unstyled'>",
"<li><i class='fa fa-info-circle'> </i> Your password is your secret key which encrypts all of your pads. If you lose it there is no way we can recover your data.</li>",
"<li><i class='fa fa-info-circle'> </i> You can import pads which were recently viewed in your browser so you have them in your account.</li>",
"<li><i class='fa fa-info-circle'> </i> If you are using a shared computer, you need to log out when you are done, closing the tab is not enough.</li>",
"</ul>"
].join('');
out.register_testimonial =" \"Tools like Etherpad and Google Docs [...] all share a weakness, which is that whomever owns the document server can see everything you're typing. Cryptpad is a free/open project that uses some of the ideas behind blockchain to implement a \"zero-knowledge\" version of a collaborative document editor, ensuring that only the people working on a document can see it.\" ";
out.register_testimonial_name = "Cory Doctorow";
out.register_writtenPassword = "I have written down my username and password, proceed";
out.register_cancel = "Go back";
@ -512,7 +514,7 @@ define(function () {
// contact.html
out.main_about_p2 = 'If you have any questions or comments, feel free to reach out! You can <a href="https://twitter.com/cryptpad"><i class="fa fa-twitter"></i>tweet us</a>, open an issue <a href="https://github.com/xwiki-labs/cryptpad/issues/" title="our issue tracker">on <i class="fa fa-github"></i>GitHub</a>. Come say hi on <a href="https://riot.im/app/#/room/#cryptpad:matrix.org" title="Matrix">our <i class="fa fa-comment"></i>Matrix channel</a> or IRC (#cryptpad on irc.freenode.net), or <a href="mailto:research@xwiki.com"><i class="fa fa-envelope"></i>send us an email</a>.';
out.main_info = "<h1>Collaborate in Confidence</h1><br> Grow your ideas together with shared documents while <strong>Zero Knowledge</strong> technology secures your privacy; even from us.";
out.main_info = "<h2>Collaborate in Confidence</h2> Grow your ideas together with shared documents while <strong>Zero Knowledge</strong> technology secures your privacy; <strong>even from us</strong>.";
out.main_catch_phrase = "The Zero Knowledge Cloud";
out.main_howitworks = 'How It Works';
@ -543,6 +545,7 @@ define(function () {
out.main_whiteboardPad = 'Whiteboard';
out.main_localPads = 'Local Pads';
out.main_yourCryptDrive = 'Your CryptDrive';
out.main_footerText = "With CryptPad, you can make quick collaborative documents for taking notes and writing down ideas together.";
out.footer_applications = "Applications";
out.footer_contact = "Contact";
@ -682,13 +685,13 @@ define(function () {
// Tips
out.tips = {};
out.tips.lag = "The green icon in the upper right shows the quality of your internet connection to the CryptPad server.";
out.tips.shortcuts = "`ctrl+b`, `ctrl+i` and `ctrl+u` are quick shortcuts for bold, italic and underline.";
out.tips.indent = "In numbered and bulleted lists, you can use tab or shift+tab to quickly increase or decrease indentation.";
out.tips.title = "You can set the title of your pad by clicking the top center.";
out.tips.store = "Every time you visit a pad, if you're logged in it will be saved to your CryptDrive.";
out.tips.marker = "You can highlight text in a pad using the \"marker\" item in the styles dropdown menu.";
out.tips.driveUpload = "Registered users can upload encrypted files by dragging and dropping them into their CryptDrive.";
out.tips.filenames = "You can rename files in your CryptDrive, this name is just for you.";
out.tips.drive = "Logged in users can organize their files in their CryptDrive, accessible from the CryptPad icon at the top left of all pads.";
out.feedback_about = "If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions";
out.feedback_privacy = "We care about your privacy, and at the same time we want CryptPad to be very easy to use. We use this file to figure out which UI features matter to our users, by requesting it along with a parameter specifying which action was taken.";

@ -1,7 +1,7 @@
{
"name": "cryptpad",
"description": "realtime collaborative visual editor with zero knowlege server",
"version": "1.12.0",
"version": "1.13.0",
"dependencies": {
"chainpad-server": "^1.0.1",
"express": "~4.10.1",

@ -30,6 +30,7 @@ body {
min-width: 20%;
max-width: 80%;
resize: horizontal;
font-size: initial;
}
.CodeMirror.fullPage {
//min-width: 100%;

@ -410,6 +410,7 @@ define([
}
});
/*
// add the splitter
if (!$iframe.has('.cp-splitter').length) {
var $preview = $iframe.find('#previewContainer');
@ -437,6 +438,7 @@ define([
});
});
}
*/
Cryptpad.removeLoadingScreen();
setEditable(true);

@ -6,6 +6,23 @@ define([
var Nacl = window.nacl;
var module = {};
var blobToArrayBuffer = function (blob, cb) {
var reader = new FileReader();
reader.onloadend = function () {
cb(void 0, this.result);
};
reader.readAsArrayBuffer(blob);
};
var arrayBufferToString = function (AB) {
try {
return Nacl.util.encodeBase64(new Uint8Array(AB));
} catch (e) {
console.error(e);
return null;
}
};
module.create = function (common, config) {
var File = {};
@ -227,19 +244,33 @@ define([
queue.next();
};
var handleFile = File.handleFile = function (file, e) {
var reader = new FileReader();
reader.onloadend = function () {
var handleFile = File.handleFile = function (file, e, thumbnail) {
var thumb;
var finish = function (arrayBuffer) {
var metadata = {
name: file.name,
type: file.type,
};
if (thumb) { metadata.thumbnail = thumb; }
queue.push({
blob: this.result,
metadata: {
name: file.name,
type: file.type,
},
blob: arrayBuffer,
metadata: metadata,
dropEvent: e
});
};
reader.readAsArrayBuffer(file);
var processFile = function () {
blobToArrayBuffer(file, function (e, buffer) {
finish(buffer);
});
};
if (!thumbnail) { return void processFile(); }
blobToArrayBuffer(thumbnail, function (e, buffer) {
if (e) { console.error(e); }
thumb = arrayBufferToString(buffer);
processFile();
});
};
var onFileDrop = File.onFileDrop = function (file, e) {

@ -256,7 +256,7 @@ define([
var $friend = ui.getFriend(curvePublic);
var $chat = ui.getChannel(curvePublic);
$friend.remove();
$chat.remove();
if ($chat) { $chat.remove(); }
ui.showInfo();
};
@ -892,7 +892,7 @@ define([
var addToFriendList = Msg.addToFriendList = function (common, data, cb) {
var proxy = common.getProxy();
var friends = getFriendList(proxy);
var pubKey = data.curvePublic;
var pubKey = data.curvePublic; // todo validata data
if (pubKey === proxy.curvePublic) { return void cb("E_MYKEY"); }
@ -938,7 +938,7 @@ define([
var todo = function (yes) {
if (yes) {
pending[sender] = msgData;
msg = ["FRIEND_REQ_OK", chan, createData(common, msgData.channel)];
msg = ["FRIEND_REQ_OK", chan, createData(proxy, msgData.channel)];
}
msgStr = Crypto.encrypt(JSON.stringify(msg), key);
network.sendto(sender, msgStr);
@ -1005,7 +1005,7 @@ define([
if (!parsed.hashData) { return; }
// Message
var chan = parsed.hashData.channel;
var myData = createData(common);
var myData = createData(common.getProxy());
var msg = ["FRIEND_REQ", chan, myData];
// Encryption
var keyStr = parsed.hashData.key;

@ -8,6 +8,8 @@ define([
var BAD_STATE_TIMEOUT = typeof(AppConfig.badStateTimeout) === 'number'?
AppConfig.badStateTimeout: 30000;
var connected = false;
/*
TODO make this not blow up when disconnected or lagging...
*/
@ -20,6 +22,7 @@ define([
}
var to = setTimeout(function () {
if (!connected) { return; }
realtime.abort();
// don't launch more than one popup
if (common.infiniteSpinnerDetected) { return; }
@ -38,5 +41,10 @@ define([
}, 0);
};
common.setConnectionState = function (bool) {
if (typeof(bool) !== 'boolean') { return; }
connected = bool;
};
return common;
});

@ -0,0 +1,51 @@
define([
'/bower_components/tweetnacl/nacl-fast.min.js',
], function () {
var Nacl = window.nacl;
var Thumb = {
dimension: 150, // thumbnails are all 150px
};
// create thumbnail image from metadata
// return an img tag, or undefined if anything goes wrong
Thumb.fromMetadata = function (metadata) {
if (!metadata || typeof(metadata) !== 'object' || !metadata.thumbnail) { return; }
try {
var u8 = Nacl.util.decodeBase64(metadata.thumbnail);
var blob = new Blob([u8], {
type: 'image/png'
});
var url = URL.createObjectURL(blob);
var img = new Image();
img.src = url;
img.width = Thumb.dimension;
img.height = Thumb.dimension;
return img;
} catch (e) {
console.error(e);
return;
}
};
// assumes that your canvas is square
// nodeback returning blob
Thumb.fromCanvas = function (canvas, cb) {
canvas = canvas;
var c2 = document.createElement('canvas');
var d = Thumb.dimension;
c2.width = d;
c2.height = 2;
var ctx = c2.getContext('2d');
ctx.drawImage(canvas, 0, 0, d, d);
c2.toBlob(function (blob) {
cb(void 0, blob);
});
};
Thumb.fromVideo = function (video, cb) {
cb = cb; // WIP
};
return Thumb;
});

@ -571,6 +571,7 @@ define([
_onDisplayNameChanged.forEach(function (h) {
h(newName, isLocal);
});
common.clearTooltips();
};
// STORAGE
@ -1848,12 +1849,18 @@ define([
Store.ready(function (err, storeObj) {
store = common.store = env.store = storeObj;
common.addDirectMessageHandler(common);
var proxy = getProxy();
var network = getNetwork();
network.on('disconnect', function () {
Realtime.setConnectionState(false);
});
network.on('reconnect', function () {
Realtime.setConnectionState(true);
});
if (Object.keys(proxy).length === 1) {
feedback("FIRST_APP_USE", true);
}

@ -50,25 +50,35 @@ define([
};
Curve.deriveKeys = function (theirs, mine) {
var pub = decodeBase64(theirs);
var secret = decodeBase64(mine);
try {
var pub = decodeBase64(theirs);
var secret = decodeBase64(mine);
var sharedSecret = Nacl.box.before(pub, secret);
var salt = decodeUTF8('CryptPad.signingKeyGenerationSalt');
var sharedSecret = Nacl.box.before(pub, secret);
var salt = decodeUTF8('CryptPad.signingKeyGenerationSalt');
// 64 uint8s
var hash = Nacl.hash(concatenateUint8s([salt, sharedSecret]));
var signKp = Nacl.sign.keyPair.fromSeed(hash.subarray(0, 32));
var cryptKey = hash.subarray(32, 64);
// 64 uint8s
var hash = Nacl.hash(concatenateUint8s([salt, sharedSecret]));
var signKp = Nacl.sign.keyPair.fromSeed(hash.subarray(0, 32));
var cryptKey = hash.subarray(32, 64);
return {
cryptKey: encodeBase64(cryptKey),
signKey: encodeBase64(signKp.secretKey),
validateKey: encodeBase64(signKp.publicKey)
};
return {
cryptKey: encodeBase64(cryptKey),
signKey: encodeBase64(signKp.secretKey),
validateKey: encodeBase64(signKp.publicKey)
};
} catch (e) {
console.error('invalid keys or other problem deriving keys');
console.error(e);
return null;
}
};
Curve.createEncryptor = function (keys) {
if (!keys || typeof(keys) !== 'object') {
return void console.error("invalid input for createEncryptor");
}
var cryptKey = decodeBase64(keys.cryptKey);
var signKey = decodeBase64(keys.signKey);
var validateKey = decodeBase64(keys.validateKey);

File diff suppressed because one or more lines are too long

@ -1,4 +1,11 @@
(function () {
var Mod = function (ApiConfig) {
var requireConf;
if (ApiConfig && ApiConfig.requireConf) {
requireConf = ApiConfig.requireConf;
}
var urlArgs = typeof(requireConf.urlArgs) === 'string'? '?' + urlArgs: '';
var Module = {};
var isSupported = Module.isSupported = function () {
@ -41,8 +48,8 @@
}
};
var DEFAULT_MAIN = '/customize/main-favicon.png';
var DEFAULT_ALT = '/customize/alt-favicon.png';
var DEFAULT_MAIN = '/customize/main-favicon.png' + urlArgs;
var DEFAULT_ALT = '/customize/alt-favicon.png' + urlArgs;
var createFavicon = function () {
console.log("creating favicon");
@ -110,14 +117,14 @@
cancel: cancel,
};
};
return Module;
};
if (typeof(module) !== 'undefined' && module.exports) {
module.exports = Module;
module.exports = Mod();
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
define(function () {
return Module;
});
define(['/api/config'], Mod);
} else {
window.Visible = Module;
window.Visible = Mod();
}
}());

@ -341,25 +341,14 @@ function isDataSchema(url) {
return url.substr(i, 5).toLowerCase() === 'data:';
}
function getPDFFileNameFromURL(url) {
var defaultFilename = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'document.pdf';
if (isDataSchema(url)) {
console.warn('getPDFFileNameFromURL: ' + 'ignoring "data:" URL for performance reasons.');
return defaultFilename;
}
var reURI = /^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/;
var reFilename = /[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i;
var splitURI = reURI.exec(url);
var suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]);
if (suggestedFilename) {
suggestedFilename = suggestedFilename[0];
if (suggestedFilename.indexOf('%') !== -1) {
try {
suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0];
} catch (e) {}
}
var query;
var title;
if (/\#/.test(url)) {
url.replace(/\#(.*)$/, function (all, t) {
title = t;
});
}
return suggestedFilename || defaultFilename;
return title || 'document.pdf';
}
function normalizeWheelEventDelta(evt) {
var delta = Math.sqrt(evt.deltaX * evt.deltaX + evt.deltaY * evt.deltaY);
@ -1192,11 +1181,13 @@ var PDFViewerApplication = {
setTitleUsingUrl: function pdfViewSetTitleUsingUrl(url) {
this.url = url;
this.baseUrl = url.split('#')[0];
var title = (0, _ui_utils.getPDFFileNameFromURL)(url, '');
var title = _ui_utils.getPDFFileNameFromURL(url);
if (!title) {
try {
title = decodeURIComponent((0, _pdfjsLib.getFilenameFromUrl)(url)) || url;
} catch (e) {
console.error(e)
title = url;
}
}

@ -24,7 +24,7 @@ body {
}
#app.ready {
background: url('/customize/bg3.jpg') no-repeat center center;
//background: url('/customize/bg3.jpg') no-repeat center center;
background-size: cover;
background-position: center;
}

@ -91,7 +91,14 @@ define([
Title.updateTitle(title || Title.defaultTitle);
toolbar.addElement(['pageTitle'], {pageTitle: title});
var displayFile = function (ev, sizeMb) {
var displayFile = function (ev, sizeMb, CB) {
var called_back;
var cb = function (e) {
if (called_back) { return; }
called_back = true;
if (CB) { CB(e); }
};
var $mt = $dlview.find('media-tag');
var cryptKey = secret.keys && secret.keys.fileKeyStr;
var hexFileName = Cryptpad.base64ToHex(secret.channel);
@ -127,7 +134,7 @@ define([
// make pdfs big
var toolbarHeight = $iframe.find('#toolbar').height();
$iframe.find('media-tag iframe').css({
var $another_iframe = $iframe.find('media-tag iframe').css({
'height': 'calc(100vh - ' + toolbarHeight + 'px)',
'width': '100vw',
'position': 'absolute',
@ -135,10 +142,19 @@ define([
'left': 0,
'border': 0
});
if ($another_iframe.length) {
$another_iframe.load(function () {
cb();
});
} else {
cb();
}
})
.on('decryptionError', function (e) {
var error = e.originalEvent;
Cryptpad.alert(error.message);
//Cryptpad.alert(error.message);
cb(error.message);
})
.on('decryptionProgress', function (e) {
var progress = e.originalEvent;
@ -188,7 +204,9 @@ define([
var onClick = function (ev) {
if (decrypting) { return; }
decrypting = true;
displayFile(ev, sizeMb);
displayFile(ev, sizeMb, function (err) {
if (err) { Cryptpad.alert(err); }
});
};
if (typeof(sizeMb) === 'number' && sizeMb < 5) { return void onClick(); }
$dlform.find('#dl, #progress').click(onClick);

@ -2,7 +2,7 @@
<html class="cp">
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
<head>
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
<title data-localization="main_title">CryptPad: Zero Knowledge, Collaborative Real Time Editing</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>

@ -1,3 +1,3 @@
<!DOCTYPE html>
<html dir="ltr" lang="en"><head><title>Rich Text Editor, editor1</title><style data-cke-temp="1">html{cursor:text;*cursor:auto}
img,input,textarea{cursor:default}</style><link type="text/css" rel="stylesheet" href="/customize/ckeditor-contents.css"><link type="text/css" rel="stylesheet" href="http://localhost:3000/bower_components/ckeditor/plugins/tableselection//styles/tableselection.css"></head><body><p><br></p></body></html>
img,input,textarea{cursor:default}</style><link type="text/css" rel="stylesheet" href="/customize/ckeditor-contents.css"><link type="text/css" rel="stylesheet" href="/bower_components/ckeditor/plugins/tableselection/styles/tableselection.css"></head><body><p><br></p></body></html>

@ -313,6 +313,10 @@ define([
if (!readOnly && !initializing) {
userDocStateDom.setAttribute("contenteditable", "true"); // lol wtf
}
$(userDocStateDom).find('script, applet, object, iframe').remove();
$(userDocStateDom).find('a').filter(function (i, x) {
return ! /^(https|http|ftp):\/\/[^\s\n]*$/.test(x.getAttribute('href'));
}).remove();
var patch = (DD).diff(inner, userDocStateDom);
(DD).apply(inner, patch);
if (readOnly) {
@ -625,8 +629,10 @@ define([
if (stringify(hjson2) !== stringify(hjson)) {
console.log('err');
console.error("shjson2 !== shjson");
Cryptpad.errorLoadingScreen(Messages.wrongApp);
throw new Error();
// TODO(cjd): This is removed because the XSS filter in applyHjson()
// is applied on incoming content so it causes this to fail.
//Cryptpad.errorLoadingScreen(Messages.wrongApp);
//throw new Error();
}
}
} else {

@ -470,13 +470,16 @@
// CryptPad
var _iframe = window._iframe = iframe.$;
var fw = this;
var fw = this;
_iframe.contentWindow.onload = function () {}
var intr = setInterval(function () {
//console.log(_iframe.contentWindow.document.body);
if (_iframe.contentWindow && _iframe.contentWindow.document && _iframe.contentWindow.document.body) {
clearInterval(intr);
CKEDITOR.tools.callFunction(fw._.frameLoadedHandler, _iframe.contentWindow);
}
if (!_iframe.contentWindow) { return; }
if (!_iframe.contentWindow.document) { return; }
if (_iframe.contentWindow.document.readyState !== 'complete') { return; }
if (!_iframe.contentWindow.document.getElementsByTagName('title').length) { return; }
clearInterval(intr);
CKEDITOR.tools.callFunction(fw._.frameLoadedHandler, _iframe.contentWindow);
}, 10);
return;

@ -2,7 +2,7 @@
<html class="cp">
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
<head>
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
<title data-localization="main_title">CryptPad: Zero Knowledge, Collaborative Real Time Editing</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>

@ -36,6 +36,7 @@ h6 { font-size: 24px; }
body {
.CodeMirror {
height: 100%;
font-size: initial;
}
.CodeMirror-focused .cm-matchhighlight {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);

@ -11,6 +11,7 @@ define([
'/common/cryptget.js',
'/whiteboard/colors.js',
'/customize/application_config.js',
'/common/common-thumbnail.js',
'/bower_components/secure-fabric.js/dist/fabric.min.js',
'/bower_components/file-saver/FileSaver.min.js',
@ -19,7 +20,7 @@ define([
'less!/customize/src/less/cryptpad.less',
'less!/whiteboard/whiteboard.less',
'less!/customize/src/less/toolbar.less',
], function ($, Config, Realtime, Crypto, Toolbar, TextPatcher, JSONSortify, JsonOT, Cryptpad, Cryptget, Colors, AppConfig) {
], function ($, Config, Realtime, Crypto, Toolbar, TextPatcher, JSONSortify, JsonOT, Cryptpad, Cryptget, Colors, AppConfig, Thumb) {
var saveAs = window.saveAs;
var Messages = Cryptpad.Messages;
@ -212,13 +213,18 @@ window.canvas = canvas;
module.FM = Cryptpad.createFileManager({});
module.upload = function (title) {
$canvas[0].toBlob(function (blob) {
blob.name = title;
var reader = new FileReader();
reader.onloadend = function () {
module.FM.handleFile(blob);
};
reader.readAsArrayBuffer(blob);
var canvas = $canvas[0];
var finish = function (thumb) {
canvas.toBlob(function (blob) {
blob.name = title;
module.FM.handleFile(blob, void 0, thumb);
});
};
Thumb.fromCanvas(canvas, function (e, blob) {
// carry on even if you can't get a thumbnail
if (e) { console.error(e); }
finish(blob);
});
};

Loading…
Cancel
Save