diff --git a/.jshintignore b/.jshintignore
index 45011b5dc..aad5dea36 100644
--- a/.jshintignore
+++ b/.jshintignore
@@ -9,3 +9,5 @@ www/scratch
www/common/toolbar.js
www/common/hyperscript.js
www/common/tippy.min.js
+
+www/pad/wysiwygarea-plugin.js
diff --git a/config.example.js b/config.example.js
index 73444b94c..2602549cc 100644
--- a/config.example.js
+++ b/config.example.js
@@ -81,23 +81,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
*/
@@ -237,14 +220,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.
*/
diff --git a/customize.dist/bkregister.jpg b/customize.dist/bkregister.jpg
new file mode 100644
index 000000000..03660433f
Binary files /dev/null and b/customize.dist/bkregister.jpg differ
diff --git a/customize.dist/code.svg b/customize.dist/code.svg
new file mode 100644
index 000000000..29647b529
--- /dev/null
+++ b/customize.dist/code.svg
@@ -0,0 +1,14 @@
+
+
+
diff --git a/customize.dist/images/AaronMacSween.jpg b/customize.dist/images/AaronMacSween.jpg
new file mode 100644
index 000000000..2ee96ea6f
Binary files /dev/null and b/customize.dist/images/AaronMacSween.jpg differ
diff --git a/customize.dist/images/CalebJames.jpg b/customize.dist/images/CalebJames.jpg
new file mode 100644
index 000000000..65d5a6cae
Binary files /dev/null and b/customize.dist/images/CalebJames.jpg differ
diff --git a/customize.dist/images/Catalin.jpg b/customize.dist/images/Catalin.jpg
index 3a7cb2f13..109a5404b 100644
Binary files a/customize.dist/images/Catalin.jpg and b/customize.dist/images/Catalin.jpg differ
diff --git a/customize.dist/images/LudovicDuboist.jpg b/customize.dist/images/LudovicDuboist.jpg
new file mode 100644
index 000000000..6a9988942
Binary files /dev/null and b/customize.dist/images/LudovicDuboist.jpg differ
diff --git a/customize.dist/images/Pierre-new.jpg b/customize.dist/images/Pierre-new.jpg
index b4fef2583..4f197aeb0 100644
Binary files a/customize.dist/images/Pierre-new.jpg and b/customize.dist/images/Pierre-new.jpg differ
diff --git a/customize.dist/images/YannFlory.jpg b/customize.dist/images/YannFlory.jpg
new file mode 100644
index 000000000..19d10ec56
Binary files /dev/null and b/customize.dist/images/YannFlory.jpg differ
diff --git a/customize.dist/images/atest.jpg b/customize.dist/images/atest.jpg
new file mode 100644
index 000000000..4ce7014fe
Binary files /dev/null and b/customize.dist/images/atest.jpg differ
diff --git a/customize.dist/main.js b/customize.dist/main.js
index 2cf0ae61f..4049ec659 100644
--- a/customize.dist/main.js
+++ b/customize.dist/main.js
@@ -30,6 +30,9 @@ define([
return;
}
+ $main.find('a[href="/drive/"] div.pad-button-text h4')
+ .text(Messages.main_yourCryptDrive);
+
var name = localStorage[Cryptpad.userNameKey] || sessionStorage[Cryptpad.userNameKey];
var $loggedInBlock = $main.find('#loggedIn');
var $hello = $loggedInBlock.find('#loggedInHello');
diff --git a/customize.dist/pages.js b/customize.dist/pages.js
index de0a9968a..9e2759786 100644
--- a/customize.dist/pages.js
+++ b/customize.dist/pages.js
@@ -46,7 +46,9 @@ define([
h('div.container', [
h('div.row', [
footerCol(null, [
- setHTML(h('div.cp-bio-foot'), '
With CryptPad, you can make quick collaborative documents for taking notes and writing down ideas together.
'),
+ h('div.cp-bio-foot', [
+ h('p', Msg.main_footerText)
+ ])
], ''),
/* footerCol(null, [
footLink('/about.html', 'about'),
@@ -84,11 +86,11 @@ define([
var username = window.localStorage.getItem('User_name');
if (username === null) {
rightLinks = [
- h('a.nav-item.nav-link.cp-login-btn', { href: '/login'}, Msg.login_login),
- h('a.nav-item.nav-link.cp-register-btn', { href: '/register'}, Msg.login_register)
+ h('a.nav-item.nav-link.cp-login-btn', { href: '/login/'}, Msg.login_login),
+ h('a.nav-item.nav-link.cp-register-btn', { href: '/register/'}, Msg.login_register)
];
} else {
- rightLinks = h('a.nav-item.nav-link.cp-user-btn', { href: '/drive' }, [
+ rightLinks = h('a.nav-item.nav-link.cp-user-btn', { href: '/drive/' }, [
h('i.fa.fa-user-circle'),
" ",
username
@@ -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 XWiki SAS, 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'), '
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.
Caleb is a cryptography developer, Machine Technology graduate of the Franklin County Technical School and lifelong tinkerer.
In 2011, he started the cjdns Open Source project to show that secure networking could be invisible and easily deployed.
After joining XWiki SAS in 2014, he started the CryptPad project with the intent of bringing the same transparent security to collaborative editing.
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!".
')
+ h('hr'),
+ setHTML(h('div#bioCaleb'), '
Caleb is a cryptography developer, Machine Technology graduate of the Franklin County Technical School and lifelong tinkerer. In 2011, he started the cjdns Open Source project to show that secure networking could be invisible and easily deployed. After joining XWiki SAS in 2014, he started the CryptPad project with the intent of bringing the same transparent security to collaborative editing. 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!".
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.
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. 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. Yann is soft spoken but brutally efficient, he is known to say "It will take 5 minutes".
Resident CSS wizard and emoji extraordinaire, Pierre is passionate about anything related to technology. He loves to hack around computers and put parts together.
He is currently studying at 42, where he learns about algorithms, networking, kernel programming and graphics.
As a part of an internship, he joined XWiki SAS and worked on CryptPad to improve user experience. He also maintains the Spanish translation.
')
+ h('hr'),
+ setHTML(h('div#bioPierre'), '
Resident CSS wizard and emoji extraordinaire, Pierre is passionate about anything related to technology. He loves to hack around computers and put parts together. He is currently studying at 42, where he learns about algorithms, networking, kernel programming and graphics. As a part of an internship, he joined XWiki SAS and worked on CryptPad to improve user experience. He also maintains the Spanish translation.
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 family, where he worked both on the business and the community side of XWiki, including the research team and CryptPad.
')
+ 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.
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.
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.
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. 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.
Le lien peut être copié et partagé de manière publique.";
out.profile_viewMyProfile = "Voir mon profil";
// contacts/userlist
@@ -338,6 +348,8 @@ define(function () {
out.fm_backup_title = 'Lien de secours';
out.fm_nameFile = 'Comment souhaitez-vous nommer ce fichier ?';
out.fm_error_cantPin = "Erreur interne du serveur. Veuillez recharger la page et essayer de nouveau.";
+ out.fm_viewListButton = "Liste";
+ out.fm_viewGridButton = "Grille";
// File - Context menu
out.fc_newfolder = "Nouveau dossier";
out.fc_rename = "Renommer";
@@ -383,8 +395,6 @@ define(function () {
out.login_invalPass = 'Mot de passe requis';
out.login_unhandledError = "Une erreur inattendue s'est produite :(";
- out.login_notRegistered = 'Pas encore inscrit ?';
-
out.register_importRecent = "Importer l'historique (Recommendé)";
out.register_acceptTerms = "J'accepte les conditions d'utilisation";
out.register_passwordsDontMatch = "Les mots de passe doivent être identiques!";
@@ -403,11 +413,12 @@ define(function () {
"
Vous pouvez importer les pads récents de ce navigateur pour les avoir dans votre compte utilisateur.
",
"
Si vous utilisez un ordinateur partagé, vous devez vous déconnecter avant de partir, fermer l'onglet n'est pas suffisant.
",
""
- ];
+ ].join('');
// Settings
out.settings_cat_account = "Compte";
out.settings_cat_drive = "CryptDrive";
+ out.settings_cat_code = "Code";
out.settings_title = "Préférences";
out.settings_save = "Sauver";
@@ -454,6 +465,9 @@ define(function () {
out.settings_logoutEverywhere = "Se déconnecter de force de toutes les autres sessions.";
out.settings_logoutEverywhereConfirm = "Êtes-vous sûr ? Vous devrez vous reconnecter sur tous vos autres appareils.";
+ out.settings_codeIndentation = "Indentation dans l'éditeur de code (nombre d'espaces)";
+ out.settings_codeUseTabs = "Utiliser des tabulations au lieu d'espaces";
+
out.upload_title = "Hébergement de fichiers";
out.upload_serverError = "Erreur interne: impossible d'importer le fichier pour l'instant.";
out.upload_uploadPending = "Vous avez déjà un fichier en cours d'importation. Souhaitez-vous l'annuler et importer ce nouveau fichier ?";
@@ -473,10 +487,14 @@ 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
+ out.pad_showToolbar = "Afficher la barre d'outils";
+ out.pad_hideToolbar = "Cacher la barre d'outils";
+
// general warnings
out.warn_notPinned = "Ce pad n'est stocké dans aucun CryptDrive. Il va expirer après 3 mois d'inactivité. En savoir plus...";
@@ -488,7 +506,8 @@ define(function () {
//contact.html
out.main_about_p2 = 'Si vous avez des questions ou commentaires, vous pouvez nous tweeter, ouvrir une issue sur GitHub, venir dire bonjour sur notre salle Matrix ou IRC (#cryptpad sur irc.freenode.net), ou bien encore nous envoyer un email.';
- out.main_info = "
Collaborez avec confiance
Développez vos idées en groupe avec des document partagés; la technologie Zero Knowledge sécurise vos données.";
+ out.main_info = "
Collaborez avec confiance
Développez vos idées en groupe avec des documents partagés; la technologie Zero Knowledge sécurise vos données.";
+ out.main_catch_phrase = "Le Cloud Zero Knowledge";
out.main_howitworks = 'Comment ça fonctionne';
out.main_zeroKnowledge = 'Zero Knowledge';
@@ -510,6 +529,15 @@ define(function () {
out.main_poll_p = 'Plannifiez vos réunions ou évènements, ou votez pour la meilleure solution concernant votre problème.';
out.main_drive = 'CryptDrive';
+ out.main_richTextPad = 'Pad de Texte Riche';
+ out.main_codePad = 'Pad de Code';
+ out.main_slidePad = 'Présentation Markdown';
+ out.main_pollPad = 'Sondage ou Planning';
+ 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";
out.footer_aboutUs = "À propos";
@@ -562,6 +590,7 @@ define(function () {
out.header_support = '';
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'accueil";
// Initial states
@@ -602,7 +631,7 @@ define(function () {
' - La présentation est mise à jour en temps-réel'
].join('');
- out.driveReadmeTitle = "Qu'est-ce que CryptDrive ?";
+ out.driveReadmeTitle = "Qu'est-ce que CryptPad ?";
out.readme_welcome = "Bienvenue dans CryptPad !";
out.readme_p1 = "Bienvenue dans CryptPad, le lieu où vous pouvez prendre des notes seul ou avec des amis.";
out.readme_p2 = "Ce pad va vous donner un aperçu de la manière dont vous pouvez utiliser CryptPad pour prendre des notes, les organiser et travailler en groupe sur celles-ci.";
diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js
index 7c5c64ceb..262f9890c 100644
--- a/customize.dist/translations/messages.js
+++ b/customize.dist/translations/messages.js
@@ -336,10 +336,10 @@ define(function () {
out.updated_0_fm_info_trash = 'Empty your trash to free space in your CryptDrive.';
out.fm_info_trash = out.updated_0_fm_info_trash;
out.fm_info_allFiles = 'Contains all the files from "Documents", "Unsorted" and "Trash". You can\'t move or remove files from here.'; // Same here
- out.fm_info_anonymous = 'You are not logged in so these pads may be deleted (find out why). ' +
+ out.fm_info_anonymous = 'You are not logged in so your pads will expire after 3 months (find out more). ' +
'Sign up or Log in to keep them alive.';
out.fm_alert_backupUrl = "Backup link for this drive. " +
- "It is highly recommended that you keep ip for yourself only. " +
+ "It is highly recommended that you keep it secret. " +
"You can use it to retrieve all your files in case your browser memory got erased. " +
"Anybody with that link can edit or remove all the files in your file manager. ";
out.fm_alert_anonymous = "Hello there, you are currently using CryptPad anonymously, that's ok but your pads may be deleted after a period of " +
@@ -404,13 +404,15 @@ define(function () {
out.register_header = "Welcome to CryptPad";
out.register_explanation = [
- "
Lets go over a couple things first
",
- "
",
- "
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.
",
- "
You can import pads which were recently viewed in your browser so you have them in your account.
",
- "
If you are using a shared computer, you need to log out when you are done, closing the tab is not enough.
",
+ "
Lets go over a couple things first:
",
+ "
",
+ "
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.
",
+ "
You can import pads which were recently viewed in your browser so you have them in your account.
",
+ "
If you are using a shared computer, you need to log out when you are done, closing the tab is not enough.
",
"
"
].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";
@@ -422,6 +424,7 @@ define(function () {
// Settings
out.settings_cat_account = "Account";
out.settings_cat_drive = "CryptDrive";
+ out.settings_cat_code = "Code";
out.settings_title = "Settings";
out.settings_save = "Save";
@@ -468,6 +471,9 @@ define(function () {
out.settings_logoutEverywhere = "Force log out of all other web sessions";
out.settings_logoutEverywhereConfirm = "Are you sure? You will need to log in with all your devices.";
+ out.settings_codeIndentation = 'Code editor indentation (spaces)';
+ out.settings_codeUseTabs = "Indent using tabs (instead of spaces)";
+
out.upload_title = "File upload";
out.upload_serverError = "Server Error: unable to upload your file at this time.";
out.upload_uploadPending = "You already have an upload in progress. Cancel it and upload your new file?";
@@ -508,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 tweet us, open an issue on GitHub. Come say hi on our Matrix channel or IRC (#cryptpad on irc.freenode.net), or send us an email.';
- out.main_info = "
Collaborate in Confidence
Grow your ideas together with shared documents while Zero Knowledge technology secures your privacy; even from us.";
+ out.main_info = "
Collaborate in Confidence
Grow your ideas together with shared documents while Zero Knowledge technology secures your privacy; even from us.";
out.main_catch_phrase = "The Zero Knowledge Cloud";
out.main_howitworks = 'How It Works';
@@ -538,6 +544,8 @@ define(function () {
out.main_pollPad = 'Poll or Schedule';
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";
@@ -654,7 +662,7 @@ define(function () {
// Readme
- out.driveReadmeTitle = "What is CryptDrive?";
+ out.driveReadmeTitle = "What is CryptPad?";
out.readme_welcome = "Welcome to CryptPad !";
out.readme_p1 = "Welcome to CryptPad, this is where you can take note of things alone and with friends.";
out.readme_p2 = "This pad will give you a quick walk through of how you can use CryptPad to take notes, keep them organized and work together on them.";
diff --git a/customize.dist/translations/messages.pt-br.js b/customize.dist/translations/messages.pt-br.js
index 8764c7233..e2c29fae1 100644
--- a/customize.dist/translations/messages.pt-br.js
+++ b/customize.dist/translations/messages.pt-br.js
@@ -522,7 +522,7 @@ define(function () {
// Readme
- out.driveReadmeTitle = "What is CryptDrive?";
+ out.driveReadmeTitle = "What is CryptPad?";
out.readme_welcome = "Welcome to CryptPad !";
out.readme_p1 = "Welcome to CryptPad, this is where you can take note of things alone and with friends.";
out.readme_p2 = "This pad will give you a quick walk through of how you can use CryptPad to take notes, keep them organized and work together on them.";
diff --git a/customize.dist/translations/messages.ro.js b/customize.dist/translations/messages.ro.js
index d2d497dbd..61881eb36 100644
--- a/customize.dist/translations/messages.ro.js
+++ b/customize.dist/translations/messages.ro.js
@@ -334,7 +334,7 @@ define(function () {
out.initialState = "
Acesta este CryptPad, editorul colaborativ bazat pe tehnologia Zero Knowledge în timp real. Totul este salvat pe măsură ce scrii. Partajează link-ul către acest pad pentru a edita cu prieteni sau folosește Share butonul pentru a partaja read-only link permițând vizualizarea dar nu și editarea.
Îndrăznește, începe să scrii...
";
out.codeInitialState = "/*\n Acesta este editorul colaborativ de cod bazat pe tehnologia Zero Knowledge CryptPad.\n Ce scrii aici este criptat, așa că doar oamenii care au link-ul pot să-l acceseze.\n Poți să alegi ce limbaj de programare pus n evidență și schema de culori UI n dreapta sus.\n*/";
out.slideInitialState = "# CryptSlide\n* Acesta este un editor colaborativ bazat pe tehnologia Zero Knowledge.\n* Ce scrii aici este criptat, așa că doar oamenii care au link-ul pot să-l acceseze.\n* Nici măcar serverele nu au acces la ce scrii tu.\n* Ce vezi aici, ce auzi aici, atunci când pleci, lași aici.\n\n-\n# Cum se folosește\n1. Scrie-ți conținutul slide-urilor folosind sintaxa markdown\n - Află mai multe despre sintaxa markdown [aici](http://www.markdowntutorial.com/)\n2. Separă-ți slide-urile cu -\n3. Click pe butonul \"Play\" pentru a vedea rezultatele - Slide-urile tale sunt actualizate în timp real.";
- out.driveReadmeTitle = "Ce este CryptDrive?";
+ out.driveReadmeTitle = "Ce este CryptPad?";
out.readme_welcome = "Bine ai venit n CryptPad !";
out.readme_p1 = "Bine ai venit în CryptPad, acesta este locul unde îți poți lua notițe, singur sau cu prietenii.";
out.readme_p2 = "Acest pad o să îți ofere un scurt ghid în cum poți să folosești CryptPad pentru a lua notițe, a le ține organizate și a colabora pe ele.";
diff --git a/customize.dist/translations/messages.zh.js b/customize.dist/translations/messages.zh.js
index 012b31018..d835f928e 100644
--- a/customize.dist/translations/messages.zh.js
+++ b/customize.dist/translations/messages.zh.js
@@ -505,7 +505,7 @@ define(function () {
// Readme
- out.driveReadmeTitle = "什麼是 CryptDrive?";
+ out.driveReadmeTitle = "什麼是 CryptPad?";
out.readme_welcome = "歡迎來到 CryptPad !";
out.readme_p1 = "歡迎來到 CryptPad, 這裏你可以獨自作個人筆記或是和別人共享協作。";
out.readme_p2 = "這個工作檔案可以讓你快速地了解如何使用 CryptPad 作筆記,有效地整理管理文件工作檔案。";
diff --git a/package.json b/package.json
index a2b893d21..9821b6bdb 100644
--- a/package.json
+++ b/package.json
@@ -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",
diff --git a/server.js b/server.js
index 1ee8b08e5..1bf53f02d 100644
--- a/server.js
+++ b/server.js
@@ -32,10 +32,7 @@ var setHeaders = (function () {
if (typeof(config.httpHeaders) !== 'object') { return function () {}; }
const headers = clone(config.httpHeaders);
-
- headers['Access-Control-Allow-Origin'] = "*";
-
- if (config.contentSecurity && false) {
+ if (config.contentSecurity) {
headers['Content-Security-Policy'] = clone(config.contentSecurity);
if (!/;$/.test(headers['Content-Security-Policy'])) { headers['Content-Security-Policy'] += ';' }
if (headers['Content-Security-Policy'].indexOf('frame-ancestors') === -1) {
diff --git a/www/code/code.less b/www/code/code.less
index ce7c7898e..36883f377 100644
--- a/www/code/code.less
+++ b/www/code/code.less
@@ -30,6 +30,7 @@ body {
min-width: 20%;
max-width: 80%;
resize: horizontal;
+ font-size: initial;
}
.CodeMirror.fullPage {
//min-width: 100%;
@@ -84,7 +85,6 @@ body {
width: 8px;
top: 0;
left: 0;
- z-index: 9999;
cursor: col-resize;
}
diff --git a/www/code/main.js b/www/code/main.js
index 36f734d0f..a7e6f1447 100644
--- a/www/code/main.js
+++ b/www/code/main.js
@@ -61,19 +61,28 @@ define([
$iframe.find('.CodeMirror').addClass('fullPage');
editor = CodeMirror.editor;
- var setIndentation = APP.setIndentation = function (units) {
+ var setIndentation = APP.setIndentation = function (units, useTabs) {
if (typeof(units) !== 'number') { return; }
editor.setOption('indentUnit', units);
editor.setOption('tabSize', units);
- //editor.setOption('indentWithTabs', true);
+ editor.setOption('indentWithTabs', useTabs);
};
var indentKey = 'cryptpad.indentUnit';
+ var useTabsKey = 'cryptpad.indentWithTabs';
+
var proxy = Cryptpad.getProxy();
- proxy.on('change', [indentKey], function (o, n) {
- APP.setIndentation(n);
- });
- setIndentation(proxy[indentKey]);
+
+ var updateIndentSettings = function () {
+ var indentUnit = proxy[indentKey];
+ var useTabs = proxy[useTabsKey];
+ setIndentation(
+ typeof(indentUnit) === 'number'? indentUnit: 2,
+ typeof(useTabs) === 'boolean'? useTabs: false);
+ };
+
+ proxy.on('change', [indentKey], updateIndentSettings);
+ proxy.on('change', [useTabsKey], updateIndentSettings);
var $bar = $('#pad-iframe')[0].contentWindow.$('#cme_toolbox');
@@ -401,6 +410,7 @@ define([
}
});
+/*
// add the splitter
if (!$iframe.has('.cp-splitter').length) {
var $preview = $iframe.find('#previewContainer');
@@ -428,6 +438,7 @@ define([
});
});
}
+*/
Cryptpad.removeLoadingScreen();
setEditable(true);
diff --git a/www/common/common-interface.js b/www/common/common-interface.js
index 83389b816..4c05432f9 100644
--- a/www/common/common-interface.js
+++ b/www/common/common-interface.js
@@ -301,7 +301,16 @@ define([
// Tooltips
UI.clearTooltips = function () {
- $('.tippy-popper').remove();
+ // If an element is removed from the UI while a tooltip is applied on that element, the tooltip will get hung
+ // forever, this is a solution which just searches for tooltips which have no corrisponding element and removes
+ // them.
+ var win;
+ $('.tippy-popper').each(function (i, el) {
+ win = win || $('#pad-iframe')[0].contentWindow;
+ if (win.$('[aria-describedby=' + el.getAttribute('id') + ']').length === 0) {
+ el.remove();
+ }
+ });
};
UI.addTooltips = function () {
diff --git a/www/common/common-messaging.js b/www/common/common-messaging.js
index 8a846482a..f92eaed33 100644
--- a/www/common/common-messaging.js
+++ b/www/common/common-messaging.js
@@ -2,8 +2,42 @@ define([
'jquery',
'/bower_components/chainpad-crypto/crypto.js',
'/common/curve.js',
+ '/common/common-hash.js',
+
'/bower_components/marked/marked.min.js',
-], function ($, Crypto, Curve, Marked) {
+ '/common/common-realtime.js',
+
+ // displayAvatar
+ // whenRealtimeSyncs
+ // getRealtime -> removeFromFriendList
+ /* UI
+ Messages
+ confirm
+ fixHTML
+ displayAvatar
+ clearOwnedChannel
+ alert
+
+
+ pushMsg
+ removeFromFriendList
+
+ onDirectMessage
+ getNetwork
+ getProxy
+ pushMsg
+
+ Init
+ getNetwork
+ getProxy
+ onDirectMessage
+ removeFromFriendList
+ notify
+ onMessage
+
+ */
+
+], function ($, Crypto, Curve, Hash, Marked, Realtime) {
var Msg = {
inputs: [],
};
@@ -28,11 +62,10 @@ define([
return Marked(content);
};
- var createData = Msg.createData = function (common, hash) {
- var proxy = common.getProxy();
+ var createData = Msg.createData = function (proxy, hash) {
return {
- channel: hash || common.createChannelId(),
- displayName: proxy[common.displayNameKey],
+ channel: hash || Hash.createChannelId(),
+ displayName: proxy['cryptpad.username'],
profile: proxy.profile && proxy.profile.view,
edPublic: proxy.edPublic,
curvePublic: proxy.curvePublic,
@@ -40,39 +73,39 @@ define([
};
};
- var getFriend = function (common, pubkey) {
- var proxy = common.getProxy();
+ var getFriend = function (proxy, pubkey) {
if (pubkey === proxy.curvePublic) {
- var data = createData(common);
+ var data = createData(proxy);
delete data.channel;
return data;
}
return proxy.friends ? proxy.friends[pubkey] : undefined;
};
- var removeFromFriendList = Msg.removeFromFriendList = function (common, curvePublic, cb) {
- var proxy = common.getProxy();
- if (!proxy.friends) {
- return;
- }
+ var removeFromFriendList = function (proxy, realtime, curvePublic, cb) {
+ if (!proxy.friends) { return; }
var friends = proxy.friends;
delete friends[curvePublic];
- common.whenRealtimeSyncs(common.getRealtime(), cb);
+ Realtime.whenRealtimeSyncs(realtime, cb);
};
- // TODO set this up as an observable data structure
- var getFriendList = Msg.getFriendList = function (common) {
- var proxy = common.getProxy();
+ var getFriendList = Msg.getFriendList = function (proxy) {
if (!proxy.friends) { proxy.friends = {}; }
return proxy.friends;
};
- Msg.getFriendChannelsList = function (common) {
- var friends = getFriendList(common);
+ var eachFriend = function (friends, cb) {
+ Object.keys(friends).forEach(function (id) {
+ if (id === 'me') { return; }
+ cb(friends[id], id, friends);
+ });
+ };
+
+
+ Msg.getFriendChannelsList = function (proxy) {
var list = [];
- Object.keys(friends).forEach(function (key) {
- if (key === "me") { return; }
- list.push(friends[key].channel);
+ eachFriend(proxy, function (friend) {
+ list.push(friend.channel);
});
return list;
};
@@ -85,131 +118,6 @@ define([
var UI = Msg.UI = {};
- // TODO extract into UI method
- var createChatBox = function (common, $container, curvePublic, ui) {
- var data = getFriend(common, curvePublic);
-
- // Input
- var channel = channels[data.channel];
-
- var $header = $('