diff --git a/.jshintignore b/.jshintignore index 45b4087f5..c403b39b3 100644 --- a/.jshintignore +++ b/.jshintignore @@ -5,7 +5,7 @@ www/common/tippy/ www/common/jquery-ui/ server.js -www/common/media-tag.js +www/common/old-media-tag.js www/scratch www/common/toolbar.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b3b8c058..fd2c1059f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,31 @@ +# Donkey release (v2.3.0) + +## Goals + +For this release we wanted to deploy some new features related to our encrypted file functionality. + +## Update notes + +* new clientside dependencies. run `bower update` +* new serverside APIs. Restart your server + +## What's new + +### Features + +* When uploading files to your CryptDrive or a pad, users will now be prompted to protect the file with a password (in addition to some random data) + * this adds an additional layer of security in case a third party gains access to the file's link, but not the password. +* Users are also able to claim an encrypted file as their own, allowing them the option to delete it from the server at a later date. +* We've refactored the Media-Tag library to be much smaller and easier to use. + +### Bug fixes + +* When setting a title for a pad which was created from a template, titles were not correctly inferred from the content of a document. This has been fixed. +* We discovered that users who had installed _AdBlock Plus_ and configured it to **Block social media icons tracking** were unable to use the _share menu_ to construct alternative links to the same pad, but with different attributes. We have worked around the problem. +* Admins who had configured their CryptPad instance to use custom icons for applications in the CryptDrive may have noticed that the same icons were not used on the home page. We've fixed this such that the same icons will be used everywhere +* We have also updated the icon for the Kanban app to a more appropriate symbol +* We found that the download button in the _file_ app was downloading the user's avatar, instead of the correct encrypted file embedded in the page. We've since fixed this + # Coati release (v2.2.0) ## Goals diff --git a/customize.dist/CryptPadlogo_op5.svg b/customize.dist/CryptPadlogo_op5.svg new file mode 100644 index 000000000..aa5acb201 --- /dev/null +++ b/customize.dist/CryptPadlogo_op5.svg @@ -0,0 +1 @@ +CryptPadlogo \ No newline at end of file diff --git a/customize.dist/images/cover-faq.jpg b/customize.dist/images/cover-faq.jpg new file mode 100644 index 000000000..27be3af99 Binary files /dev/null and b/customize.dist/images/cover-faq.jpg differ diff --git a/customize.dist/images/cover-features.jpg b/customize.dist/images/cover-features.jpg new file mode 100644 index 000000000..6652c9b28 Binary files /dev/null and b/customize.dist/images/cover-features.jpg differ diff --git a/customize.dist/images/cover-privacy.jpg b/customize.dist/images/cover-privacy.jpg new file mode 100644 index 000000000..ff873c99d Binary files /dev/null and b/customize.dist/images/cover-privacy.jpg differ diff --git a/customize.dist/pages.js b/customize.dist/pages.js index 1cd3d5f7c..300d8b9cb 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -69,7 +69,7 @@ define([ footerCol(null, [ h('div.cp-bio-foot', [ h('p', Msg.main_footerText), - //languageSelector() + languageSelector() ]) ], ''), footerCol('footer_applications', [ @@ -95,7 +95,7 @@ define([ ]) ]) ]), - h('div.cp-version-footer', "CryptPad v2.2.0 (Coati)") + h('div.cp-version-footer', "CryptPad v2.3.0 (Donkey)") ]); }; @@ -181,10 +181,10 @@ define([ ]), ]), h('div.row.align-items-center',[ - h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-2.cp-bio-avatar.cp-bio-avatar-right', [ + h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-lg-2.cp-bio-avatar.cp-bio-avatar-right', [ h('img.img-fluid', {'src': '/customize/images/AaronMacSween.jpg'}) ]), - h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-1.cp-profile-det',[ + h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-lg-1.cp-profile-det',[ h('h3', "Aaron MacSween"), h('hr'), setHTML(h('div#bioAaron'), '

Aaron transitioned into distributed systems development from a background in jazz and live stage performance.
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.
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.
He spends his spare time experimenting with guitars, photography, science fiction, and spicy food.

'), @@ -232,10 +232,10 @@ define([ ]), ]), h('div.row.align-items-center',[ - h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-2.cp-bio-avatar.cp-bio-avatar-right', [ + h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-lg-2.cp-bio-avatar.cp-bio-avatar-right', [ h('img.img-fluid', {'src': '/customize/images/Catalin.jpg'}) ]), - h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-1.cp-profile-det',[ + h('div.col-12.col-sm-12.col-md-12.col-lg-6.order-lg-1.cp-profile-det',[ h('h3', "Catalin Scripcariu"), h('hr'), setHTML(h('div#bioCatalin'), '

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.
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.

'), @@ -271,113 +271,83 @@ define([ Pages['/features.html'] = function () { return h('div#cp-main', [ infopageTopbar(), - h('div.container.cp-container', [ - h('center', h('h1', Msg.features_title)), - h('table#cp-features-table', [ - h('thead', h('tr', [ - h('th', Msg.features_feature), - h('th', Msg.features_anon), - h('th', Msg.features_registered), - h('th', Msg.features_notes) - ])), - h('tbody', [ - h('tr', [ - h('td', Msg.features_f_pad), - h('td.yes', '✔'),// u2714, u2715 - h('td.yes', '✔'), - h('td', Msg.features_f_pad_notes) - ]), - h('tr', [ - h('td', Msg.features_f_history), - h('td.yes', '✔'), - h('td.yes', '✔'), - h('td', Msg.features_f_history_notes) - ]), - h('tr', [ - h('td', Msg.features_f_export), - h('td.yes', '✔'), - h('td.yes', '✔'), - h('td', Msg.features_f_export_notes) - ]), - h('tr', [ - h('td', Msg.features_f_todo), - h('td.yes', '✔'), - h('td.yes', '✔'), - h('td') - ]), - h('tr', [ - h('td', Msg.features_f_viewFiles), - h('td.yes', '✔'), - h('td.yes', '✔'), - h('td') - ]), - h('tr', [ - h('td', Msg.features_f_drive), - h('td.part', '~'), - h('td.yes', '✔'), - h('td', Msg.features_f_drive_notes) - ]), - h('tr', [ - h('td', Msg.features_f_uploadFiles), - h('td.no', '✕'), - h('td.yes', '✔'), - h('td') - ]), - h('tr', [ - h('td', Msg.features_f_embedFiles), - h('td.no', '✕'), - h('td.yes', '✔'), - h('td') - ]), - h('tr', [ - h('td', Msg.features_f_multiple), - h('td.no', '✕'), - h('td.yes', '✔'), - h('td', Msg.features_f_multiple_notes) - ]), - h('tr', [ - h('td', Msg.features_f_logoutEverywhere), - h('td.no', '✕'), - h('td.yes', '✔'), - h('td', Msg.features_f_logoutEverywhere_notes || '') - ]), - h('tr', [ - h('td', Msg.features_f_templates), - h('td.no', '✕'), - h('td.yes', '✔'), - h('td', Msg.features_f_templates_notes) - ]), - h('tr', [ - h('td', Msg.features_f_profile), - h('td.no', '✕'), - h('td.yes', '✔'), - h('td', Msg.features_f_profile_notes) - ]), - h('tr', [ - h('td', Msg.features_f_tags), - h('td.no', '✕'), - h('td.yes', '✔'), - h('td', Msg.features_f_tags_notes) - ]), - h('tr', [ - h('td', Msg.features_f_contacts), - h('td.no', '✕'), - h('td.yes', '✔'), - h('td', Msg.features_f_contacts_notes) - ]), - h('tr', [ - h('td', Msg.features_f_storage), - h('td.no', Msg.features_f_storage_anon), - setHTML(h('td.yes.left'), Msg.features_f_storage_registered), - h('td') - ]), - ]) + h('div.container-fluid.cp_cont_features',[ + h('div.container',[ + h('center', h('h1', Msg.features_title)), + ]), + ]), + h('div.container',[ + h('div.row.cp-container.cp-features-web.justify-content-sm-center',[ + h('div.col-12.col-sm-6.cp-anon-user',[ + h('div.card',[ + h('div.card-body',[ + h('h3.text-center',Msg.features_anon) + ]), + h('ul.list-group.list-group-flush', [ + h('li.list-group-item.text-center', Msg.features_f_pad , [ + h('a.voted', {href: '#', 'data-toggle' : 'tooltip', 'data-placement': 'bottom', title : Msg.features_f_pad_notes}, h('i.fa.fa-question')) + ]), + h('li.list-group-item.text-center', Msg.features_f_history, [ + h('a.voted', {href: '#', 'data-toggle' : 'tooltip', 'data-placement': 'bottom', title : Msg.features_f_history_notes }, h('i.fa.fa-question') ) + ]), + h('li.list-group-item.text-center', Msg.features_f_export, [ + h('a.voted', {href: '#', 'data-toggle' : 'tooltip', 'data-placement': 'bottom', title : Msg.features_f_export_notes }, h('i.fa.fa-question')) + ]), + h('li.list-group-item.text-center', Msg.features_f_todo), + h('li.list-group-item.text-center', Msg.features_f_viewFiles), + h('li.list-group-item.text-center', Msg.features_f_drive), + h('li.list-group-item.text-center', Msg.features_f_storage_anon), + ]), + ]), + ]), + h('div.col-12.col-sm-6.cp-regis-user',[ + h('div.card',[ + h('div.card-body',[ + h('h3.text-center',Msg.features_registered) + ]), + h('ul.list-group.list-group-flush', [ + h('li.list-group-item.text-center', Msg.features_f_pad, [ + h('a.voted', {href: '#', 'data-toggle' : 'tooltip', 'data-placement': 'bottom', title : Msg.features_f_pad_notes}, h('i.fa.fa-question')) + ]), + h('li.list-group-item.text-center', Msg.features_f_history, [ + h('a.voted', {href: '#', 'data-toggle' : 'tooltip', 'data-placement': 'bottom', title : Msg.features_f_history_notes }, h('i.fa.fa-question')) + ]), + h('li.list-group-item.text-center', Msg.features_f_export, [ + h('a.voted', {href: '#', 'data-toggle' : 'tooltip', 'data-placement': 'bottom', title : Msg.features_f_export_notes }, h('i.fa.fa-question')) + ]), + h('li.list-group-item.text-center', Msg.features_f_todo), + h('li.list-group-item.text-center', Msg.features_f_viewFiles), + h('li.list-group-item.text-center', Msg.features_f_drive_full), + h('li.list-group-item.text-center', Msg.features_f_uploadFiles), + h('li.list-group-item.text-center', Msg.features_f_embedFiles), + h('li.list-group-item.text-center', Msg.features_f_multiple, [ + h('a.voted', {href: '#', 'data-toggle' : 'tooltip', 'data-placement': 'bottom', title : Msg.features_f_multiple_notes }, h('i.fa.fa-question')) + ]), + h('li.list-group-item.text-center', Msg.features_f_logoutEverywhere), + h('li.list-group-item.text-center', Msg.features_f_templates, [ + h('a.voted', {href: '#', 'data-toggle' : 'tooltip', 'data-placement': 'bottom', title : Msg.features_f_templates_notes }, h('i.fa.fa-question')) + ]), + h('li.list-group-item.text-center', Msg.features_f_profile, [ + h('a.voted', {href: '#', 'data-toggle' : 'tooltip', 'data-placement': 'bottom', title : Msg.features_f_profile_notes }, h('i.fa.fa-question')) + ]), + h('li.list-group-item.text-center', Msg.features_f_tags, [ + h('a.voted', {href: '#', 'data-toggle' : 'tooltip', 'data-placement': 'bottom', title : Msg.features_f_tags_notes }, h('i.fa.fa-question')) + ]), + h('li.list-group-item.text-center', Msg.features_f_contacts, [ + h('a.voted', {href: '#', 'data-toggle' : 'tooltip', 'data-placement': 'bottom', title : Msg.features_f_contacts_notes }, h('i.fa.fa-question')) + ]), + h('li.list-group-item.text-center', setHTML(h('div'), Msg.features_f_storage_registered)), + ]), + h('div.card-body',[ + h('div#cp-features-register', [ + h('a', { + href: '/register/' + }, h('button.cp-features-register-button', Msg.features_f_register)) + ]), + ]), + ]), + ]), ]), - h('div#cp-features-register', [ - h('a', { - href: '/register/' - }, h('button.cp-features-register-button', 'Register for free')) - ]) ]), infopageFooter() ]); @@ -386,25 +356,35 @@ define([ Pages['/privacy.html'] = function () { return h('div#cp-main', [ infopageTopbar(), - h('div.container.cp-container', [ - h('center', h('h1', Msg.policy_title)), - h('h2', Msg.policy_whatweknow), + h('.container-fluid.cp-privacy-top', [ + h('div.container',[ + h('center', h('h1', Msg.policy_title)), + ]), + ]), + h('div.container.cp-container.cp-privacy',[ + h('h3', Msg.policy_whatweknow), + h('hr'), setHTML(h('p'), Msg.policy_whatweknow_p1), - h('h2', Msg.policy_howweuse), + h('h3', Msg.policy_howweuse), + h('hr'), h('p', Msg.policy_howweuse_p1), h('p', Msg.policy_howweuse_p2), - h('h2', Msg.policy_whatwetell), + h('h3', Msg.policy_whatwetell), + h('hr'), h('p', Msg.policy_whatwetell_p1), - h('h2', Msg.policy_links), + h('h3', Msg.policy_links), + h('hr'), h('p', Msg.policy_links_p1), - h('h2', Msg.policy_ads), + h('h3', Msg.policy_ads), + h('hr'), h('p', Msg.policy_ads_p1), - h('h2', Msg.policy_choices), + h('h3', Msg.policy_choices), + h('hr'), h('p', Msg.policy_choices_open), setHTML(h('p'), Msg.policy_choices_vpn), ]), @@ -425,8 +405,10 @@ define([ var question = h('p.cp-faq-questions-q#' + hash); $(question).click(function () { if ($(answer).is(':visible')) { + $(question).toggleClass('cp-active-faq'); return void $(answer).slideUp(); } + $(question).toggleClass('cp-active-faq'); $(answer).slideDown(); }); questions.push(h('div.cp-faq-questions-items', [ @@ -445,11 +427,15 @@ define([ } return h('div#cp-main', [ infopageTopbar(), - h('div.container.cp-container', [ - h('center', h('h1', Msg.faq_title)), - h('p.cp-faq-header', h('a.nav-item.nav-link', { + h('div.container-fluid.cp-faq', [ + h('div.container',[ + h('center', h('h1', Msg.faq_title)), + ]), + ]), + h('div.container.cp-faq-ques-det',[ + h('div.cp-faq-header.text-center', h('a.nav-item.nav-link', { href: '/what-is-cryptpad.html' - }, Msg.faq_whatis)), + }, setHTML(h('h4'),Msg.faq_whatis))), h('div.cp-faq-container', categories) ]), infopageFooter() @@ -484,28 +470,28 @@ define([ 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('div.col-12.col-sm-6.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('div.col-12.col-sm-6.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('div.col-12.col-sm-6.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('div.col-12.col-sm-6.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) @@ -585,13 +571,13 @@ define([ var showingMore = false; var icons = [ - [ 'pad', '/pad/', Msg.main_richTextPad, 'fa-file-word-o' ], - [ 'code', '/code/', Msg.main_codePad, 'fa-file-code-o' ], - [ 'slide', '/slide/', Msg.main_slidePad, 'fa-file-powerpoint-o' ], - [ 'poll', '/poll/', Msg.main_pollPad, 'fa-calendar' ], - [ 'kanban', '/kanban/', Msg.main_kanbanPad, 'fa-calendar' ], - [ 'whiteboard', '/whiteboard/', Msg.main_whiteboardPad, 'fa-paint-brush' ], - [ 'recent', '/drive/', Msg.main_localPads, 'fa-hdd-o' ] + [ 'pad', '/pad/', Msg.main_richTextPad, 'pad' ], + [ 'code', '/code/', Msg.main_codePad, 'code' ], + [ 'slide', '/slide/', Msg.main_slidePad, 'slide' ], + [ 'poll', '/poll/', Msg.main_pollPad, 'poll' ], + [ 'kanban', '/kanban/', Msg.main_kanbanPad, 'kanban' ], + [ 'whiteboard', '/whiteboard/', Msg.main_whiteboardPad, 'whiteboard' ], + [ 'recent', '/drive/', Msg.main_localPads, 'drive' ] ].filter(function (x) { return isAvailableType(x[1]); }) @@ -601,7 +587,7 @@ define([ return h('a', [ { href: x[1] }, h(s, [ - h('i.fa.' + x[3]), + h('i.fa.' + AppConfig.applicationsIcon[x[3]]), h('div.pad-button-text', [ h('h4', x[2]) ]) ]) ]); diff --git a/customize.dist/src/less2/include/alertify.less b/customize.dist/src/less2/include/alertify.less index ebc0b1383..fd340f8d2 100644 --- a/customize.dist/src/less2/include/alertify.less +++ b/customize.dist/src/less2/include/alertify.less @@ -204,7 +204,16 @@ } span.cp-password-container { + display: flex; + align-items: center; margin-bottom: 15px; + justify-content: space-between; + & > * { + margin-bottom: 0 !important; + } + button { + margin: 0 !important; + } } input[type="checkbox"], input[type="radio"] { @@ -220,85 +229,84 @@ } } - nav { - - text-align: right; - - button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button) { - - background-color: @colortheme_alertify-cancel; - box-sizing: border-box; - position: relative; - outline: 0; - display: inline-block; - align-items: center; - padding: 0 6px; - margin: 6px 8px; - line-height: 36px; - min-height: 36px; - white-space: nowrap; - min-width: 88px; - text-align: center; - text-transform: uppercase; - font-size: 14px; - text-decoration: none; - cursor: pointer; - border-radius: 0; - - color: @alertify-btn-fg; - border: 1px solid @colortheme_alertify-cancel-border; - - &.safe, &.danger { - color: @colortheme_old-base; - white-space: normal; - font-weight: bold; - } - &.danger { - background-color: @colortheme_alertify-red; - border-color: @colortheme_alertify-red-border; - color: @colortheme_alertify-red-color; - &:hover, &:active { - background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-red, 10%), lighten(@colortheme_alertify-red, 10%)); - } - } - - &.safe { - background-color: @colortheme_alertify-green; - border-color: @colortheme_alertify-green-border; - color: @colortheme_alertify-green-color; - &:hover, &:active { - background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-green, 10%), lighten(@colortheme_alertify-green, 10%)); - } + button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button) { + + background-color: @colortheme_alertify-cancel; + box-sizing: border-box; + position: relative; + outline: 0; + display: inline-block; + align-items: center; + padding: 0 6px; + margin: 6px 8px; + line-height: 36px; + min-height: 36px; + white-space: nowrap; + min-width: 88px; + text-align: center; + text-transform: uppercase; + font-size: 14px; + text-decoration: none; + cursor: pointer; + border-radius: 0; + + color: @alertify-btn-fg; + border: 1px solid @colortheme_alertify-cancel-border; + + &.safe, &.danger { + color: @colortheme_old-base; + white-space: normal; + font-weight: bold; + } + &.danger { + background-color: @colortheme_alertify-red; + border-color: @colortheme_alertify-red-border; + color: @colortheme_alertify-red-color; + &:hover, &:active { + background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-red, 10%), lighten(@colortheme_alertify-red, 10%)); } + } - &.primary { - background-color: @colortheme_alertify-primary; - color: @colortheme_alertify-primary-text; - border-color: @colortheme_alertify-primary-border; - font-weight: bold; - &:hover, &:active { - background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-primary, 10%), lighten(@colortheme_alertify-primary, 10%)); - } + &.safe { + background-color: @colortheme_alertify-green; + border-color: @colortheme_alertify-green-border; + color: @colortheme_alertify-green-color; + &:hover, &:active { + background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-green, 10%), lighten(@colortheme_alertify-green, 10%)); } + } + &.primary { + background-color: @colortheme_alertify-primary; + color: @colortheme_alertify-primary-text; + border-color: @colortheme_alertify-primary-border; + font-weight: bold; &:hover, &:active { - background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-cancel, 10%), lighten(@colortheme_alertify-cancel, 10%)); + background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-primary, 10%), lighten(@colortheme_alertify-primary, 10%)); } + } - &:focus { - //border: 1px dotted @alertify-base; - box-shadow: 0px 0px 5px @colortheme_alertify-primary; - outline: none; - } - &::-moz-focus-inner { - border: 0; - } + &:hover, &:active { + background-color: contrast(@colortheme_modal-bg, darken(@colortheme_alertify-cancel, 10%), lighten(@colortheme_alertify-cancel, 10%)); } - button.btn { - margin: 6px 4px; + &:focus { + //border: 1px dotted @alertify-base; + box-shadow: 0px 0px 5px @colortheme_alertify-primary; + outline: none; + } + &::-moz-focus-inner { + border: 0; } } + + button.btn { + margin: 6px 4px; + } + + nav { + text-align: right; + } } } diff --git a/customize.dist/src/less2/include/infopages.less b/customize.dist/src/less2/include/infopages.less index 131877a65..4f3f6d0ad 100644 --- a/customize.dist/src/less2/include/infopages.less +++ b/customize.dist/src/less2/include/infopages.less @@ -161,6 +161,9 @@ background-size: contain; height: 50px; width: 250px; + @media (max-width: 326px) { + width: 180px; + } margin-right: 0; } a { diff --git a/customize.dist/src/less2/include/password-input.less b/customize.dist/src/less2/include/password-input.less index 015f364aa..8836476fd 100644 --- a/customize.dist/src/less2/include/password-input.less +++ b/customize.dist/src/less2/include/password-input.less @@ -5,7 +5,6 @@ input { flex: 1; min-width: 0; - margin-bottom: 0 !important; // Override margin from alertify } label, .fa { margin-left: 10px; diff --git a/customize.dist/src/less2/include/sidebar-layout.less b/customize.dist/src/less2/include/sidebar-layout.less index 5640e014b..ef6e1189a 100644 --- a/customize.dist/src/less2/include/sidebar-layout.less +++ b/customize.dist/src/less2/include/sidebar-layout.less @@ -10,7 +10,7 @@ .sidebar-layout_main() { - input[type="text"] { + input[type="text"], input[type="password"] { padding-left: 10px; } #cp-sidebarlayout-container { @@ -60,7 +60,7 @@ } margin-bottom: 20px; } - [type="text"], button { + [type="text"], [type="password"], button { vertical-align: middle; height: 40px; box-sizing: border-box; diff --git a/customize.dist/src/less2/include/toolbar-history.less b/customize.dist/src/less2/include/toolbar-history.less index abf14f3ac..31da75ad1 100644 --- a/customize.dist/src/less2/include/toolbar-history.less +++ b/customize.dist/src/less2/include/toolbar-history.less @@ -5,23 +5,47 @@ display: none; text-align: center; width: 100%; + padding: 10px 0; + align-items: center; + justify-content: center; * { font: @colortheme_app-font; } - .cp-toolbar-history-next { - display: inline-block; - vertical-align: middle; - margin: 20px; + .cp-history-filler { + flex: 1; } - .cp-toolbar-history-previous { - display: inline-block; - vertical-align: middle; - margin: 20px; + .cp-toolbar-history-close, + .cp-toolbar-history-revert { + background: white; + color: black; + //margin-top: 5px; + &:hover { + background-color: #e6e6e6; + } + } + .cp-toolbar-history-loadmore { + height: 100%; + color: black; + width: 25px; + position: absolute; + left: 0; + padding: 0; + } + .cp-toolbar-history-version { + position: absolute; + height: 25px; + line-height: 25px; + width: 100%; + text-align: center; } .cp-toolbar-history-goto { display: inline-block; vertical-align: middle; text-align: center; + flex: 1; + flex-basis: 80%; + min-width: 0; + max-width: 600px; input { width: 75px; } } .cp-toolbar-history-goto-input { @@ -29,6 +53,30 @@ margin-left: 5px; vertical-align: middle; } + .cp-toolbar-history-bar { + width: 100%; + background: white; + height: 25px; + margin: auto; + position: relative; + } + .cp-toolbar-history-pos-container { + width: ~"calc(100% - 2px)"; + height: 25px; + position: relative; + } + @pos-color: #55FF55; + .cp-toolbar-history-pos { + width: 2px; + height: 25px; + background: @pos-color; + &:after { + content: ''; + border: 6px solid transparent; + border-top-color: @pos-color; + margin-left: -5px; + } + } button { color: inherit; background-color: rgba(0,0,0,0.2); @@ -36,14 +84,6 @@ background-color: rgba(0,0,0,0.4); } } - .cp-toolbar-history-close { - background: white; - color: black; - margin-top: 5px; - &:hover { - background-color: #e6e6e6; - } - } .fa-spinner { font-size: 66px; } diff --git a/customize.dist/src/less2/include/toolbar.less b/customize.dist/src/less2/include/toolbar.less index 602868fe4..ad696382f 100644 --- a/customize.dist/src/less2/include/toolbar.less +++ b/customize.dist/src/less2/include/toolbar.less @@ -22,6 +22,10 @@ @toolbar_top-height: 64px; @toolbar_button-font: @colortheme_app-font; + // if we spell 'share' correctly, then adblock plus hides the share button + // this is a workaround + .fa-shhare-alt:before { content: "\f1e0"; } + .dropdown_main(); .ckeditor_fix(); .history_main(); diff --git a/customize.dist/src/less2/pages/page-about.less b/customize.dist/src/less2/pages/page-about.less index 83354abd7..9850b9621 100644 --- a/customize.dist/src/less2/pages/page-about.less +++ b/customize.dist/src/less2/pages/page-about.less @@ -7,25 +7,25 @@ background: #fff; } .cp-about-intro { - padding-top: 3em; - padding-bottom: 3em; - background-image: url(/customize/bkabout.jpg); + padding-top: 3em; + padding-bottom: 3em; + background-image: url(/customize/bkabout.jpg); background-size: cover; background-repeat: no-repeat; background-position: center; .container { - color: #fff; - font-family: "Open Sans"; - h1 { - font-weight: 700; - } - a { - color: #fff; - text-decoration: underline; - } - p { - padding-top: 1em; - } + color: #fff; + font-family: "Open Sans"; + h1 { + font-weight: 700; + } + a { + color: #fff; + text-decoration: underline; + } + p { + padding-top: 1em; + } } } .cp-container { diff --git a/customize.dist/src/less2/pages/page-contact.less b/customize.dist/src/less2/pages/page-contact.less index 4d2f9ad0e..5cfe5245b 100644 --- a/customize.dist/src/less2/pages/page-contact.less +++ b/customize.dist/src/less2/pages/page-contact.less @@ -8,76 +8,76 @@ padding-right: 0.25em; } #cp-main { - background-color: #fff; + 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; - } - } - } - } + 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-top: 3em; padding-bottom: 3em; background-image: url(/customize/images/bkcontact.jpg); background-size: cover; diff --git a/customize.dist/src/less2/pages/page-faq.less b/customize.dist/src/less2/pages/page-faq.less index 99df97f9f..f0861a40d 100644 --- a/customize.dist/src/less2/pages/page-faq.less +++ b/customize.dist/src/less2/pages/page-faq.less @@ -3,20 +3,49 @@ .infopages_main(); .infopages_topbar(); +#cp-main { + background: #fff; +} +.cp-faq { + padding-top: 3em; + padding-bottom: 3em; + background-image: url(/customize/images/cover-faq.jpg); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + .container { + color: #fff; + font-family: "Open Sans"; + } + h1 { + font-weight: 700; + } +} -.cp-faq-header { - padding: 0; - font-size: 1.2em; - a { - padding: 0; +.cp-faq-ques-det { + .cp-faq-header { + a { + padding: 0; + h4 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; + .cp-brand-font { + font-family: "Neuropolitical"; + } + } + } } } .cp-faq-container { + .cp-faq-questions-items { + background: #3a84b6; + color: #fff; + padding: 1rem 1rem 0.5rem 1rem; + margin-bottom: 1rem; + } .cp-faq-questions-q { - color: #3a84b6; padding: 0; - margin-bottom: 0; - margin-top: 5px; + margin-bottom: 0.5rem; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; @@ -24,14 +53,32 @@ -moz-user-select: none; -ms-user-select: none; user-select: none; + &:hover { + text-decoration: none; + } + &:after { + content: '\f067'; + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + float: right; + text-decoration: none; + font-size: 13px; + line-height: 1.5; + } } - .cp-faq-questions-q:hover { - color: #2e688f; - text-decoration: underline; + .cp-faq-questions-q.active-faq { + &:after { + content: '\f068'; + } } .cp-faq-questions-a { display: none; - padding: 0; + padding: 0.5rem; + margin-bottom: 0.5rem; + background-color: #fff; + color: #212529; } + margin-bottom: 1.5rem; } diff --git a/customize.dist/src/less2/pages/page-features.less b/customize.dist/src/less2/pages/page-features.less index 37f2be245..a65eed039 100644 --- a/customize.dist/src/less2/pages/page-features.less +++ b/customize.dist/src/less2/pages/page-features.less @@ -3,53 +3,21 @@ .infopages_main(); .infopages_topbar(); - -@features_th-bg: #555; -@features_th-fg: #fff; -@features_tr-bg-alt: #ddd; -@features_notes: #333; -@features_yes: #c4ffca; -@features_no: #ffc4bc; -@features_part: #faffd3; - -table#cp-features-table { - width: 100%; - th { - background-color: @features_th-bg; - color: @features_th-fg; - padding: 10px; - border: 1px solid @features_th-bg; - } - tbody { - td { - height: 32px; - line-height: 32px; - padding: 5px; - border: 1px solid @features_th-bg; - } - tr:nth-child(odd) { - background-color: @features_tr-bg-alt; - } - } - td:nth-child(4) { - color: @features_notes; - font-size: 14px; - font-style: italic; - } - td:first-child { - font-weight: bold; - } - .yes, .no, .part { - text-align: center; - } - .yes { background-color: @features_yes; } - .no { background-color: @features_no; } - .part { background-color: @features_part; } - .left { - text-align: left; +#cp-main { + background-color: #fff; +} +.cp_cont_features { + padding-top: 3em; + padding-bottom: 3em; + background-image: url('/customize/images/cover-features.jpg'); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + h1 { + font-weight: 700; + color: #fff; } } - #cp-features-register { text-align: center; padding: 20px; @@ -62,6 +30,57 @@ table#cp-features-table { border-radius: 0; &:hover { transform: scale(1.05); + cursor: pointer; + } + padding: 0.5em 1em; +} +.cp-features-web { + .card { + box-shadow: 0 5px 15px rgba(69, 145, 196, 0.3); + border: none; + } + h3 { + color: #fff; + } + .list-group { + li { + &:before { + content: "\f00c"; + font-family: "FontAwesome"; + font-size: 14px; + color: @cryptpad_color_blue; + padding-right: 10px; + } + } + div { + display: inline; + } + } + a.voted { + opacity: 0.6; + margin-left: 15px; + &:hover { + opacity: 1; + } + } + .list-group-item { + border-color: rgba(69, 145, 196, 0.125); + } +} +.cp-anon-user { + .card-body { + background-color: @cryptpad_color_blue; + } +} +.cp-regis-user { + @media (max-width:575px) { + margin-top: 3em; + } + .card-body { + &:first-of-type { + background: #4591C4; + background: -webkit-linear-gradient(to right, #FF7C4F, #4592C4); // lesshint duplicateProperty: false + background: linear-gradient(to right, #FF7C4F, #4592C4); // lesshint duplicateProperty: false + } } } - diff --git a/customize.dist/src/less2/pages/page-index.less b/customize.dist/src/less2/pages/page-index.less index b0a6d124e..75518f5f8 100644 --- a/customize.dist/src/less2/pages/page-index.less +++ b/customize.dist/src/less2/pages/page-index.less @@ -26,20 +26,20 @@ body { font-family: "Open Sans", Helvetica; } .cp-right { - .cp-register-btn { - padding: 0.5em 1em 0.7em 1em; - border: 2px solid #fff; - &:hover { - transform: scale(1.05); - } - } - .cp-login-btn { - color: #fff; - padding: 0.5em 1em 0.7em 1em; - &:hover { - transform: scale(1.05); - } - } + .cp-register-btn { + padding: 0.5em 1em 0.7em 1em; + border: 2px solid #fff; + &:hover { + transform: scale(1.05); + } + } + .cp-login-btn { + color: #fff; + padding: 0.5em 1em 0.7em 1em; + &:hover { + transform: scale(1.05); + } + } } .cp-title { display: flex; diff --git a/customize.dist/src/less2/pages/page-login.less b/customize.dist/src/less2/pages/page-login.less index 5ad874d0f..2f77e74f4 100644 --- a/customize.dist/src/less2/pages/page-login.less +++ b/customize.dist/src/less2/pages/page-login.less @@ -17,7 +17,7 @@ } } .cp-container { - #data { + #data { background: #4591C4; padding-top: 3em; padding-bottom: 7em; @@ -31,7 +31,7 @@ color: @cryptpad_header_col; } } - #userForm { + #userForm { padding-top: 3em; padding-bottom: 2em; .form-control { @@ -47,23 +47,23 @@ } } .align-items-center { - box-shadow: 0 5px 15px rgba(69,145,196, 0.3); - background: #fff; + box-shadow: 0 5px 15px rgba(69,145,196, 0.3); + background: #fff; } .extra { - margin-top: 1em; - .login { - background: @cryptpad_color_blue; - color: #fff; - padding: 10px; + margin-top: 1em; + .login { + background: @cryptpad_color_blue; + color: #fff; + padding: 10px; border-radius: 0; - &:hover { - transform: scale(1.05); - } - } + &:hover { + transform: scale(1.05); + } + } } } .cp-container { - padding-top: 3em; - min-height: 66vh; + padding-top: 3em; + min-height: 66vh; } diff --git a/customize.dist/src/less2/pages/page-privacy.less b/customize.dist/src/less2/pages/page-privacy.less index a1f8b2955..cfd575173 100644 --- a/customize.dist/src/less2/pages/page-privacy.less +++ b/customize.dist/src/less2/pages/page-privacy.less @@ -3,3 +3,46 @@ .infopages_main(); .infopages_topbar(); +#cp-main { + background: #fff; +} +.cp-privacy-top { + padding-top: 3em; + padding-bottom: 3em; + background-image: url(/customize/images/cover-privacy.jpg); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + .container { + color: #fff; + font-family: "Open Sans"; + h1 { + font-weight: 700; + } + a { + color: #fff; + text-decoration: underline; + } + p { + padding-top: 1em; + } + } +} +.cp-privacy { + background-image: url(/customize/CryptPadlogo_op5.svg); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + hr { + margin-left: 0; + width: 15rem; + border-top: 2px solid #4591C4; + } + h3 { + color: #1E1F1F; + font-weight: 700; + } + p { + color: #3F4141; + } +} diff --git a/customize.dist/src/less2/pages/page-what-is-cryptpad.less b/customize.dist/src/less2/pages/page-what-is-cryptpad.less index 0e02ce41a..f08655b9c 100644 --- a/customize.dist/src/less2/pages/page-what-is-cryptpad.less +++ b/customize.dist/src/less2/pages/page-what-is-cryptpad.less @@ -5,39 +5,39 @@ .infopages_topbar(); .cp-what-is { - padding-top: 3em; - padding-bottom: 3em; - background-image: url(/customize/bkwhat.jpg); - background-size: cover; - background-repeat: no-repeat; - background-position: center; - color: #fff; - h1 { - font-weight: 700; - } + padding-top: 3em; + padding-bottom: 3em; + background-image: url(/customize/bkwhat.jpg); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + color: #fff; + h1 { + font-weight: 700; + } } #cp-main { - background: #fff; + background: #fff; } .cp-container { - padding-top: 3em; - padding-bottom: 3em; - h2 { - margin-top: 0; - font-weight: 700; - color: @cryptpad_header_col; - } - p { - color: @cryptpad_text_col; - } - #zeroknowledge { - width: 65%; - } - .row { - margin-bottom: 1.5em; - } - img { - display: block; - margin: 0 auto; - } + padding-top: 3em; + padding-bottom: 3em; + h2 { + margin-top: 0; + font-weight: 700; + color: @cryptpad_header_col; + } + p { + color: @cryptpad_text_col; + } + #zeroknowledge { + width: 65%; + } + .row { + margin-bottom: 1.5em; + } + img { + display: block; + margin: 0 auto; + } } diff --git a/customize.dist/translations/messages.de.js b/customize.dist/translations/messages.de.js index 06b86968c..4e68d9f29 100644 --- a/customize.dist/translations/messages.de.js +++ b/customize.dist/translations/messages.de.js @@ -780,7 +780,7 @@ out.faq_link = "FAQ"; out.faq_title = "Häufigste Fragen"; - out.faq_whatis = "Was ist CryptPad?"; + out.faq_whatis = "Was ist CryptPad?"; out.faq = {}; out.faq.keywords = { title: 'Schlüsselkonzepte', diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index e053d8fab..a936f592c 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -39,6 +39,8 @@ define(function () { 'Appuyez sur Échap pour voir le pad ou rechargez la page pour pouvoir le modifier à nouveau.'; out.errorCopy = ' Vous pouvez toujours copier son contenu ailleurs en appuyant sur Échap.
Dés que vous aurez quitté la page, il sera impossible de le récupérer.'; out.errorRedirectToHome = 'Appuyez sur Échap pour retourner vers votre CryptDrive.'; + out.newVersionError = "Une nouvelle version de CryptPad est disponible.
" + + "Rechargez la page pour utiliser la nouvelle version, ou appuyez sur Échap pour accéder au contenu actuel en mode hors-ligne."; out.loading = "Chargement..."; out.error = "Erreur"; @@ -230,12 +232,11 @@ define(function () { out.historyText = "Historique"; out.historyButton = "Afficher l'historique du document"; - out.history_next = "Voir la version suivante"; - out.history_prev = "Voir la version précédente"; - out.history_goTo = "Voir la version sélectionnée"; + out.history_next = "Version plus récente"; + out.history_prev = "Version plus ancienne"; + out.history_loadMore = "Charger davantage d'historique"; out.history_close = "Retour"; out.history_closeTitle = "Fermer l'historique"; - out.history_restore = "Restaurer"; out.history_restoreTitle = "Restaurer la version du document sélectionnée"; out.history_restorePrompt = "Êtes-vous sûr de vouloir remplacer la version actuelle du document par la version affichée ?"; out.history_restoreDone = "Document restauré"; @@ -616,7 +617,7 @@ define(function () { out.upload_mustLogin = "Vous devez vous connecter pour importer un fichier"; out.download_button = "Déchiffrer et télécharger"; out.download_mt_button = "Télécharger"; - out.download_resourceNotAvailable = "Le fichier demandé n'est pas disponible..."; + out.download_resourceNotAvailable = "Le fichier demandé n'est pas disponible... Appuyez sur Échap pour continuer."; out.todo_title = "CryptTodo"; out.todo_newTodoNamePlaceholder = "Décrivez votre tâche..."; @@ -673,6 +674,7 @@ define(function () { out.main_slidePad = 'Présentation Markdown'; out.main_pollPad = 'Sondage ou Planning'; out.main_whiteboardPad = 'Tableau blanc'; + out.main_kanbanPad = 'Kanban'; 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."; @@ -741,8 +743,8 @@ define(function () { out.features_f_history = "Historique"; out.features_f_history_notes = "Voir et restaurer n'importe quelle version d'un pad"; out.features_f_todo = "Créer une TODO-list"; - out.features_f_drive = "CryptDrive"; - out.features_f_drive_notes = "Fonctionnalités basiques pour les utilisateurs anonymes"; + out.features_f_drive = "Fonctionnalités CryptDrive limitées"; + out.features_f_drive_full = "Fonctionnalités CryptDrive limitées"; out.features_f_export = "Export/Import"; out.features_f_export_notes = "Pour les pads et CryptDrive"; out.features_f_viewFiles = "Voir des fichiers"; @@ -753,7 +755,7 @@ define(function () { out.features_f_multiple_notes = "Moyen facile de voir vos pads depuis n'importe quel appareil"; out.features_f_logoutEverywhere = "Se déconnecter partout"; out.features_f_logoutEverywhere_notes = "Se déconnecter des autres appareils utilisés"; - out.features_f_templates = "Modèles"; + out.features_f_templates = "Utiliser les modèles"; out.features_f_templates_notes = "Créer des modèles et créer des pads basés sur ces modèles"; out.features_f_profile = "Créer un profil"; out.features_f_profile_notes = "Page personnelle contenant un avatar et une description"; @@ -764,12 +766,13 @@ define(function () { out.features_f_storage = "Stockage"; out.features_f_storage_anon = "Pads supprimés après 3 mois"; out.features_f_storage_registered = "Gratuit: 50Mo
Premium: 5Go/20Go/50Go"; + out.features_f_register = "S'inscrire gratuitement"; // faq.html out.faq_link = "FAQ"; out.faq_title = "Foire Aux Questions"; - out.faq_whatis = "Qu'est-ce que CryptPad ?"; + out.faq_whatis = "Qu'est-ce que CryptPad ?"; out.faq = {}; out.faq.keywords = { title: 'Termes spéciaux', @@ -1113,6 +1116,16 @@ define(function () { out.password_submit = "Valider"; out.password_show = "Afficher"; + // Change password in pad properties + out.properties_addPassword = "Ajouter un mot de passe"; + out.properties_changePassword = "Modifier le mot de passe"; + out.properties_confirmNew = "Êtes-vous sûr ? Ajouter un mot de passe changera l'URL de ce pad. Les utilisateurs ne connaissant pas le nouveau mot de passe perdront l'accès au pad."; + out.properties_confirmChange = "Êtes-vous sûr ? Les utilisateurs ne connaissant pas le nouveau mot de passe perdront l'accès au pad."; + out.properties_passwordError = "Une erreur est survenue lors de la modification du mot de passe. Veuillez réessayer."; + out.properties_passwordWarning = "Le mot de passe a été modifié avec succès mais nous n'avons pas réussi à mettre à jour votre CryptDrive avec les nouvelles informations. Vous devrez peut-être supprimer manuellement l'ancienne version de ce pad.
Appuyez sur OK pour recharger le pad et mettre à jour vos droits d'accès."; + out.properties_passwordSuccess = "Le mot de passe a été modifié avec succès.
Appuyez sur OK pour mettre à jour vos droits d'accès."; + out.properties_changePasswordButton = "Valider"; + // New share modal out.share_linkCategory = "Partage"; out.share_linkAccess = "Droits d'accès"; diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index 8251147dd..008d53217 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -40,6 +40,8 @@ define(function () { 'Hit Esc to continue to view this pad, or reload to try editing again.'; out.errorCopy = ' You can still copy the content to another location by pressing Esc.
Once you leave this page, it will disappear forever!'; out.errorRedirectToHome = 'Press Esc to be redirected to your CryptDrive.'; + out.newVersionError = "A new version of CryptPad is available.
" + + "Reload to use the new version, or press escape to access your content in offline mode."; out.loading = "Loading..."; out.error = "Error"; @@ -232,12 +234,10 @@ define(function () { out.historyText = "History"; out.historyButton = "Display the document history"; - out.history_next = "Go to the next version"; - out.history_prev = "Go to the previous version"; - out.history_goTo = "Go to the selected version"; - out.history_close = "Back"; + out.history_next = "Newer version"; + out.history_prev = "Older version"; + out.history_loadMore = "Load more history"; out.history_closeTitle = "Close the history"; - out.history_restore = "Restore"; out.history_restoreTitle = "Restore the selected version of the document"; out.history_restorePrompt = "Are you sure you want to replace the current version of the document by the displayed one?"; out.history_restoreDone = "Document restored"; @@ -600,6 +600,15 @@ define(function () { out.settings_templateSkip = "Skip the template selection modal"; out.settings_templateSkipHint = "When you create a new empty pad, if you have stored templates for this type of pad, a modal appears to ask if you want to use a template. Here you can choose to never show this modal and so to never use a template."; + out.settings_changePasswordTitle = "Change your password"; // XXX + out.settings_changePasswordHint = "Change your account's password without losing its data. You have to enter your existing password once, and the new password you want twice.
" + + "We can't reset your password if you forget it so be very careful!"; // XXX + out.settings_changePasswordButton = "Change password"; // XXX + out.settings_changePasswordCurrent = "Existing password"; // XXX + out.settings_changePasswordNew = "New password"; // XXX + out.settings_changePasswordNewConfirm = "Confirm new password"; // XXX + out.settings_changePasswordConfirm = "Are you sure?"; // XXX + out.upload_title = "File upload"; out.upload_modal_title = "File upload options"; out.upload_modal_filename = "File name (extension {0} added automatically)"; @@ -620,7 +629,7 @@ define(function () { out.upload_mustLogin = "You must be logged in to upload files"; out.download_button = "Decrypt & Download"; out.download_mt_button = "Download"; - out.download_resourceNotAvailable = "The requested resource was not available..."; + out.download_resourceNotAvailable = "The requested resource was not available... Press Esc to continue."; out.todo_title = "CryptTodo"; out.todo_newTodoNamePlaceholder = "Describe your task..."; @@ -678,6 +687,7 @@ define(function () { out.main_slidePad = 'Markdown Presentation'; out.main_pollPad = 'Poll or Schedule'; out.main_whiteboardPad = 'Whiteboard'; + out.main_kanbanPad = 'Kanban'; 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."; @@ -746,8 +756,8 @@ define(function () { out.features_f_history = "History"; out.features_f_history_notes = "View and restore any version of your pads"; out.features_f_todo = "Create a TODO-list"; - out.features_f_drive = "CryptDrive"; - out.features_f_drive_notes = "Basic features for anonymous users"; + out.features_f_drive = "Limited CryptDrive functionality"; + out.features_f_drive_full = "Complete CryptDrive functionality"; out.features_f_export = "Export/Import"; out.features_f_export_notes = "For pads and CryptDrive"; out.features_f_viewFiles = "View files"; @@ -767,14 +777,15 @@ define(function () { out.features_f_contacts = "Contacts application"; out.features_f_contacts_notes = "Add contacts and chat with them in an encrypted session"; out.features_f_storage = "Storage"; - out.features_f_storage_anon = "Pads deleted after 3 months"; + out.features_f_storage_anon = "Pads are deleted after 3 months"; out.features_f_storage_registered = "Free: 50MB
Premium: 5GB/20GB/50GB"; + out.features_f_register = "Register for free"; // faq.html out.faq_link = "FAQ"; out.faq_title = "Frequently Asked Questions"; - out.faq_whatis = "What is CryptPad?"; + out.faq_whatis = "What is CryptPad?"; out.faq = {}; out.faq.keywords = { title: 'Keywords', @@ -1151,13 +1162,23 @@ define(function () { out.creation_newPadModalDescriptionAdvanced = "You can check the box (or press Space to change its value) if you want to display the pad creation screen (for owned pads, expiring pads, etc.)."; out.creation_newPadModalAdvanced = "Display the pad creation screen"; - // Password prompt on the loadind screen - out.password_info = "The pad you're tyring to open is protected with a password. Enter the correct password to access its content."; + // Password prompt on the loading screen + out.password_info = "The pad you're trying to open is protected with a password. Enter the correct password to access its content."; out.password_error = "Pad not found!
This error can be caused by two factors: either the password in invalid, or the pad has been deleted from the server."; out.password_placeholder = "Type the password here..."; out.password_submit = "Submit"; out.password_show = "Show"; + // Change password in pad properties + out.properties_addPassword = "Add a password"; + out.properties_changePassword = "Change the password"; + out.properties_confirmNew = "Are you sure? Adding a password will change this pad's URL. Users without the password will lose access to this pad"; + out.properties_confirmChange = "Are you sure? Users without the new password will lose access to this pad"; + out.properties_passwordError = "An error occured while trying to change the password. Please try again."; + out.properties_passwordWarning = "The password was successfully changed but we were unable to update your CryptDrive with the new data. You may have to remove the old version of the pad manually.
Press OK to reload and update your acces rights."; + out.properties_passwordSuccess = "The password was successfully changed.
Press OK to reload and update your access rights."; + out.properties_changePasswordButton = "Submit"; + // New share modal out.share_linkCategory = "Share link"; out.share_linkAccess = "Access rights"; diff --git a/package.json b/package.json index 06214aab8..27cf19d81 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cryptpad", "description": "realtime collaborative visual editor with zero knowlege server", - "version": "2.2.0", + "version": "2.3.0", "license": "AGPL-3.0-or-later", "dependencies": { "chainpad-server": "^2.0.0", diff --git a/rpc.js b/rpc.js index c21bee11f..69d84b6dd 100644 --- a/rpc.js +++ b/rpc.js @@ -896,13 +896,13 @@ var removeOwnedBlob = function (Env, blobId, unsafeKey, cb) { Fs.unlink(blobPath, w(function (e) { if (e) { w.abort(); - return void cb(e); + return void cb(e.code); } })); }).nThen(function () { // Delete the proof of ownership Fs.unlink(ownPath, function (e) { - cb(e); + cb(e && e.code); }); }); }; @@ -1204,7 +1204,7 @@ var owned_upload_complete = function (Env, safeKey, id, cb) { return void cb(); } else { // it failed in an unexpected way. log it - WARN(e, 'ownedUploadComplete'); + WARN('ownedUploadComplete', e); return void cb(e.code); } }); @@ -1221,13 +1221,13 @@ var owned_upload_complete = function (Env, safeKey, id, cb) { Mkdirp(filePath, w(function (e /*, path */) { if (e) { // does not throw error if the directory already existed w.abort(); - return void cb(e); + return void cb(e.code); } })); Mkdirp(ownPath, w(function (e /*, path */) { if (e) { // does not throw error if the directory already existed w.abort(); - return void cb(e); + return void cb(e.code); } })); }).nThen(function (w) { @@ -1254,12 +1254,11 @@ var owned_upload_complete = function (Env, safeKey, id, cb) { // flow is dumb and I need to guard against this which will never happen /*:: if (typeof(oldPath) === 'object') { throw new Error('should never happen'); } */ - Fs.rename(oldPath /* XXX */, finalPath, w(function (e) { + Fs.rename(oldPath, finalPath, w(function (e) { if (e) { // Remove the ownership file - // XXX not needed if we have a cleanup script? Fs.unlink(finalOwnPath, function (e) { - WARN(e, 'Removing ownership file ownedUploadComplete'); + WARN('E_UNLINK_OWN_FILE', e); }); w.abort(); return void cb(e.code); diff --git a/www/assert/main.js b/www/assert/main.js index 657488b81..4ff862511 100644 --- a/www/assert/main.js +++ b/www/assert/main.js @@ -9,7 +9,8 @@ define([ '/common/common-thumbnail.js', '/common/wire.js', '/common/flat-dom.js', -], function ($, Hyperjson, Sortify, Drive, Test, Hash, Util, Thumb, Wire, Flat) { + '/common/media-tag.js', +], function ($, Hyperjson, Sortify, Drive, Test, Hash, Util, Thumb, Wire, Flat, MediaTag) { window.Hyperjson = Hyperjson; window.Sortify = Sortify; @@ -295,6 +296,26 @@ define([ !secret.hashData.present); }, "test support for ugly tracking query paramaters in url"); + assert(function (cb) { + try { + MediaTag(void 0).on('progress').on('decryption'); + return void cb(true); + } catch (e) { + console.error(e); + return void cb(false); + } + }, 'check that MediaTag does the right thing when passed no value'); + + assert(function (cb) { + try { + MediaTag(document.createElement('div')).on('progress').on('decryption'); + return void cb(true); + } catch (e) { + console.error(e); + return void cb(false); + } + }, 'check that MediaTag does the right thing when passed no value'); + assert(function (cb) { // TODO return cb(true); diff --git a/www/common/LessLoader.js b/www/common/LessLoader.js index 063b3d024..04fa68714 100644 --- a/www/common/LessLoader.js +++ b/www/common/LessLoader.js @@ -49,6 +49,7 @@ define([ if (ua[0].indexOf(':') === -1 && ua[0].indexOf('/') && parent) { ua[0] = parent.replace(/\/[^\/]*$/, '/') + ua[0]; } + ua[0] = ua[0].replace(/^\/\.\.\//, '/'); var out = ua.join('#'); //console.log(url + " --> " + out); return out; @@ -91,17 +92,32 @@ define([ }; var lessEngine; + var tempCache = { key: Math.random() }; var getLessEngine = function (cb) { if (lessEngine) { cb(lessEngine); } else { require(['/bower_components/less/dist/less.min.js'], function (Less) { + if (lessEngine) { return void cb(lessEngine); } lessEngine = Less; var doXHR = lessEngine.FileManager.prototype.doXHR; lessEngine.FileManager.prototype.doXHR = function (url, type, callback, errback) { url = fixURL(url); - //console.log("xhr: " + url); - return doXHR(url, type, callback, errback); + var cached = tempCache[url]; + if (cached && cached.res) { + var res = cached.res; + return void setTimeout(function () { callback(res[0], res[1]); }); + } + if (cached) { return void cached.queue.push(callback); } + cached = tempCache[url] = { queue: [ callback ], res: undefined }; + return doXHR(url, type, function (text, lastModified) { + cached.res = [ text, lastModified ]; + var queue = cached.queue; + cached.queue = []; + queue.forEach(function (f) { + setTimeout(function () { f(text, lastModified); }); + }); + }, errback); }; cb(lessEngine); }); diff --git a/www/common/application_config_internal.js b/www/common/application_config_internal.js index 0ab300721..ec97ac39c 100644 --- a/www/common/application_config_internal.js +++ b/www/common/application_config_internal.js @@ -81,7 +81,8 @@ define(function() { whiteboard: 'fa-paint-brush', todo: 'fa-tasks', contacts: 'fa-users', - kanban: 'fa-list-alt', + kanban: 'fa-columns', + drive: 'fa-hdd-o', }; // Ability to create owned pads and expiring pads through a new pad creation screen. diff --git a/www/common/common-interface.js b/www/common/common-interface.js index e65742d0f..7b05d22fe 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -144,13 +144,15 @@ define([ }; dialog.frame = function (content) { - return h('div.alertify', { + return $(h('div.alertify', { tabindex: 1, }, [ h('div.dialog', [ h('div', content), ]) - ]); + ])).click(function (e) { + e.stopPropagation(); + })[0]; }; /** @@ -624,6 +626,7 @@ define([ h('p.cp-loading-progress-drive'), h('p.cp-loading-progress-pad') ]); + $(progress).hide(); $loading.find('.cp-loading-container').append(progress); } else if (config.noProgress) { $loading.find('.cp-loading-progress').remove(); @@ -645,6 +648,7 @@ define([ UI.updateLoadingProgress = function (data, isDrive) { var $loading = $('#' + LOADING); if (!$loading.length || loading.error) { return; } + $loading.find('.cp-loading-progress').show(); var $progress; if (isDrive) { // Drive state diff --git a/www/common/common-messaging.js b/www/common/common-messaging.js index b5a12da0b..1c75927fc 100644 --- a/www/common/common-messaging.js +++ b/www/common/common-messaging.js @@ -89,7 +89,7 @@ define([ }; /* Used to accept friend requests within apps other than /contacts/ */ - Msg.addDirectMessageHandler = function (cfg) { + Msg.addDirectMessageHandler = function (cfg, href) { var network = cfg.network; var proxy = cfg.proxy; if (!network) { return void console.error('Network not ready'); } @@ -97,13 +97,12 @@ define([ var msg; if (sender === network.historyKeeper) { return; } try { - var parsed = Hash.parsePadUrl(window.location.href); + var parsed = Hash.parsePadUrl(href); + var secret = Hash.getSecrets(parsed.type, parsed.hash); if (!parsed.hashData) { return; } - var chan = Hash.hrefToHexChannelId(window.location.href); + var chan = secret.channel; // Decrypt - var keyStr = parsed.hashData.key; - var cryptor = Crypto.createEditCryptor(keyStr); - var key = cryptor.cryptKey; + var key = secret.keys ? secret.keys.cryptKey : Hash.decodeBase64(secret.key); var decryptMsg; try { decryptMsg = Crypto.decrypt(message, key); @@ -197,15 +196,14 @@ define([ var network = cfg.network; var netfluxId = data.netfluxId; var parsed = Hash.parsePadUrl(data.href); + var secret = Hash.getSecrets(parsed.type, parsed.hash); if (!parsed.hashData) { return; } // Message - var chan = Hash.hrefToHexChannelId(data.href); + var chan = secret.channel; var myData = createData(cfg.proxy); var msg = ["FRIEND_REQ", chan, myData]; // Encryption - var keyStr = parsed.hashData.key; - var cryptor = Crypto.createEditCryptor(keyStr); - var key = cryptor.cryptKey; + var key = secret.keys ? secret.keys.cryptKey : Hash.decodeBase64(secret.key); var msgStr = Crypto.encrypt(JSON.stringify(msg), key); // Send encrypted message if (pendingRequests.indexOf(netfluxId) === -1) { diff --git a/www/common/common-thumbnail.js b/www/common/common-thumbnail.js index bc8145d46..767b0e92a 100644 --- a/www/common/common-thumbnail.js +++ b/www/common/common-thumbnail.js @@ -256,7 +256,7 @@ define([ var k = getKey(parsed.type, channel); var whenNewThumb = function () { var secret = Hash.getSecrets('file', parsed.hash, password); - var hexFileName = channel; + var hexFileName = secret.channel; var src = Hash.getBlobPathFromHex(hexFileName); var key = secret.keys && secret.keys.cryptKey; FileCrypto.fetchDecryptedMetadata(src, key, function (e, metadata) { diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 3c1c9c7ab..e138e7efb 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -18,8 +18,10 @@ define([ var UIElements = {}; // Configure MediaTags to use our local viewer - if (MediaTag && MediaTag.PdfPlugin) { - MediaTag.PdfPlugin.viewer = '/common/pdfjs/web/viewer.html'; + if (MediaTag) { + MediaTag.setDefaultConfig('pdf', { + viewer: '/common/pdfjs/web/viewer.html' + }); } UIElements.updateTags = function (common, href) { @@ -134,12 +136,6 @@ define([ $d.append(UI.dialog.selectable(owners, { id: 'cp-app-prop-owners', })); - /* TODO - if (owned) { - var $deleteOwned = $('button').text(Messages.fc_delete_owned).click(function () { - }); - $d.append($deleteOwned); - }*/ var expire = Messages.creation_expireFalse; if (data.expire && typeof (data.expire) === "number") { @@ -151,11 +147,12 @@ define([ id: 'cp-app-prop-expire', })); - if (typeof data.password !== "undefined") { + var hasPassword = typeof data.password !== "undefined"; + if (hasPassword) { $('