diff --git a/customize.dist/messages.js b/customize.dist/messages.js
index 629a87054..5b66e8a1b 100644
--- a/customize.dist/messages.js
+++ b/customize.dist/messages.js
@@ -155,9 +155,11 @@ define(req, function(Default, Language) {
$('#pad-iframe').contents().find('[data-localization-title]').each(translateTitle);
};
- messages.driveReadme = '["BODY",{"class":"cke_editable cke_editable_themed cke_contents_ltr cke_show_borders","contenteditable":"true","spellcheck":"false","style":"color: rgb(51, 51, 51);"},' +
+ /*messages.driveReadme = '["BODY",{"class":"cke_editable cke_editable_themed cke_contents_ltr cke_show_borders","contenteditable":"true","spellcheck":"false","style":"color: rgb(51, 51, 51);"},' +
'[["H1",{},["' + messages.driveReadme_h1 + '",["BR",{},[]]]],["UL",{},[["LI",{},["' + messages.driveReadme_li1 + '",["BR",{},[]],["UL",{},[["LI",{},["' + messages.driveReadme_li1_1 + '",["BR",{},[]]]]]]]]]]],' +
'{"metadata":{"defaultTitle":"' + messages.driveReadmeTitle + '","title":"' + messages.driveReadmeTitle + '"}}]';
+*/
+ messages.driveReadme = '[["H1",{},["'+messages.readme_welcome+'"]],["P",{},["'+messages.readme_p1+'"]],["P",{},["'+messages.readme_p2+'"]],["HR",{},[]],["H2",{},["'+messages.readme_cat1+'",["BR",{},[]]]],["UL",{},[["LI",{},["'+messages._getKey("readme_cat1_l1", ['",["STRONG",{},["'+messages.newButton+'"]],"', '",["STRONG",{},["'+messages.type.pad+'"]],"'])+'"]],["LI",{},["'+messages.readme_cat1_l2+'"]],["LI",{},["'+messages._getKey("readme_cat1_l3", ['",["STRONG",{},["'+messages.unsortedName+'"]],"'])+'",["UL",{},[["LI",{},["You can click and drag files into folders in the ",["STRONG",{},["Documents"]]," section of your drive and make new folders."]],["LI",{},["Remember to try right clicking on icons because there are often additional menus."]]]]]],["LI",{},["Put old pads in the trash: You can click and drag your pads into the ",["STRONG",{},["Trash"]]," the same way you drag them into folders.",["BR",{},[]]]]]],["P",{},[["BR",{},[]]]],["H2",{},["Make pads like a pro",["BR",{},[]]]],["UL",{},[["LI",{},["The ",["STRONG",{},["Share"]]," button in your pad allows you to give access to collaborators to either ",["STRONG",{},["edit"]]," or to ",["STRONG",{},["view"]]," the pad."]],["LI",{},["Change the title of the pad by clicking on the pencil"]]]],["P",{},[["BR",{},[]]]],["H2",{},["Discover CryptPad apps"]],["UL",{},[["LI",{},["With CryptPad code editor, you can collaborate on code like Javascript and markdown like HTML and Markdown"]],["LI",{},["With CryptPad slide editor, you can make quick presentations using Markdown"]],["LI",{},["With CryptPoll you can take quick votes, especially for scheduling meetings which fit with everybody\'s calander",["BR",{},[]]]]]]]';
return messages;
diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js
index 87852fac7..5928ce9fb 100644
--- a/customize.dist/translations/messages.js
+++ b/customize.dist/translations/messages.js
@@ -391,5 +391,13 @@ define(function () {
out.driveReadme_li1 = "CryptDrive : all your pads sorted in one place";
out.driveReadme_li1_1 = "Tree, trash, unsorted files, etc.";
+ 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.";
+ out.readme_cat1 = "Get to know your CryptDrive";
+ out.readme_cat1_l1 = "Make a pad: In your CryptDrive, click {0} then {1} and you can make a pad.";
+ out.readme_cat1_l2 = "Open Pads from your CryptDrive: double-click on a pad icon to open it.";
+ out.readme_cat1_l3 = "Organize your pads: When you are logged in, every pad you access will be shown as in the {0} section of your drive.";
+
return out;
});
diff --git a/www/code/main.js b/www/code/main.js
index dff4be7dc..5ece7a208 100644
--- a/www/code/main.js
+++ b/www/code/main.js
@@ -52,6 +52,7 @@ define([
var $bar = $('#pad-iframe')[0].contentWindow.$('#cme_toolbox');
var parsedHash = Cryptpad.parsePadUrl(window.location.href);
var defaultName = Cryptpad.getDefaultName(parsedHash);
+ var initialState = Messages.codeInitialState;
var editor = module.editor = CMeditor.fromTextArea($textarea[0], {
lineNumbers: true,
@@ -68,7 +69,7 @@ define([
mode: "javascript",
readOnly: true
});
- editor.setOption('placeholder', Messages.codeInitialState);
+ editor.setValue(Messages.codeInitialState);
var setMode = module.setMode = function (mode, $select) {
module.highlightMode = mode;
@@ -84,8 +85,6 @@ define([
}
};
- editor.setValue('');
-
var setTheme = module.setTheme = (function () {
var path = '/common/theme/';
@@ -562,7 +561,9 @@ define([
// Update the user list (metadata) from the hyperjson
updateMetadata(userDoc);
- editor.setValue(newDoc || '');
+ if (newDoc) {
+ editor.setValue(newDoc);
+ }
if (Cryptpad.initialName && document.title === defaultName) {
updateTitle(Cryptpad.initialName);
diff --git a/www/common/cryptget.js b/www/common/cryptget.js
index d74bcee1d..80feacec0 100644
--- a/www/common/cryptget.js
+++ b/www/common/cryptget.js
@@ -70,10 +70,16 @@ define([
TextPatcher.create({
realtime: realtime,
})(doc);
- realtime.sync();
- realtime.abort();
- finish(Session, void 0);
+ var to = window.setTimeout(function () {
+ cb(new Error("Timeout"));
+ }, 5000);
+
+ Cryptpad.whenRealtimeSyncs(realtime, function () {
+ window.clearTimeout(to);
+ realtime.abort();
+ finish(Session, void 0);
+ });
};
overwrite(config, opt);
diff --git a/www/drive/main.js b/www/drive/main.js
index 9d4479d1c..edf26c66c 100644
--- a/www/drive/main.js
+++ b/www/drive/main.js
@@ -1903,9 +1903,11 @@ define([
var createReadme = function (proxy, cb) {
if (proxy.initializing) {
var hash = Cryptpad.createRandomHash();
+ console.log(Messages.driveReadme);
Get.put(hash, Messages.driveReadme, function (e) {
if (e) { console.error(e); }
var href = '/pad/#' + hash;
+ console.log(href);
proxy.drive[UNSORTED].push(href);
proxy.drive[FILES_DATA].push({
href: href,
diff --git a/www/pad/inner.html b/www/pad/inner.html
index 557e813ab..9d649f85e 100644
--- a/www/pad/inner.html
+++ b/www/pad/inner.html
@@ -4,7 +4,6 @@
-