Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
yflory 8 years ago
commit d3e947f17e

@ -9,15 +9,20 @@ mkdir -p customize
# Linking config.js # Linking config.js
[ ! -h config.js ] && echo "Linking config.js" && ln -s customize/config.js config.js [ ! -h config.js ] && echo "Linking config.js" && ln -s customize/config.js config.js
# Thanks to http://stackoverflow.com/a/10467453
sedeasy() {
sed -i "s/$1/$(echo $2 | sed -e 's/[\/&]/\\&/g')/g" $3
}
# Configure # Configure
[ -n "$USE_SSL" ] && echo "Using secure websockets: $USE_SSL" \ [ -n "$USE_SSL" ] && echo "Using secure websockets: $USE_SSL" \
&& sed -i "s/useSecureWebsockets: .*/useSecureWebsockets: ${USE_SSL},/g" customize/config.js && sedeasy "useSecureWebsockets: [^,]*," "useSecureWebsockets: ${USE_SSL}," customize/config.js
[ -n "$STORAGE" ] && echo "Using storage adapter: $STORAGE" \ [ -n "$STORAGE" ] && echo "Using storage adapter: $STORAGE" \
&& sed -i "s/storage: .*/storage: ${STORAGE},/g" customize/config.js && sedeasy "storage: [^,]*," "storage: ${STORAGE}," customize/config.js
[ -n "$LOG_TO_STDOUT" ] && echo "Logging to stdout: $LOG_TO_STDOUT" \ [ -n "$LOG_TO_STDOUT" ] && echo "Logging to stdout: $LOG_TO_STDOUT" \
&& sed -i "s/logToStdout: .*/logToStdout: ${LOG_TO_STDOUT},/g" customize/config.js && sedeasy "logToStdout: [^,]*," "logToStdout: ${LOG_TO_STDOUT}," customize/config.js
exec node ./server.js exec node ./server.js

@ -410,7 +410,7 @@ define([
}), }),
h('div.spinnerContainer', h('div.spinnerContainer',
h('span.fa.fa-circle-o-notch.fa-spin.fa-4x.fa-fw')), h('span.fa.fa-circle-o-notch.fa-spin.fa-4x.fa-fw')),
h('p', Msg.loading) h('p'),
]) ])
); );
}; };

@ -695,6 +695,8 @@ define(function () {
out.tips.driveUpload = "Registered users can upload encrypted files by dragging and dropping them into their CryptDrive."; out.tips.driveUpload = "Registered users can upload encrypted files by dragging and dropping them into their CryptDrive.";
out.tips.filenames = "You can rename files in your CryptDrive, this name is just for you."; out.tips.filenames = "You can rename files in your CryptDrive, this name is just for you.";
out.tips.drive = "Logged in users can organize their files in their CryptDrive, accessible from the CryptPad icon at the top left of all pads."; out.tips.drive = "Logged in users can organize their files in their CryptDrive, accessible from the CryptPad icon at the top left of all pads.";
out.tips.profile = "Registered users can create a profile from the user menu in the top right.";
out.tips.avatars = "You can upload an avatar in your profile. People will see it when you collaborate in a pad.";
out.feedback_about = "If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions"; out.feedback_about = "If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions";
out.feedback_privacy = "We care about your privacy, and at the same time we want CryptPad to be very easy to use. We use this file to figure out which UI features matter to our users, by requesting it along with a parameter specifying which action was taken."; out.feedback_privacy = "We care about your privacy, and at the same time we want CryptPad to be very easy to use. We use this file to figure out which UI features matter to our users, by requesting it along with a parameter specifying which action was taken.";

@ -22,15 +22,6 @@ Or, using docker-compose
docker-compose up -d docker-compose up -d
``` ```
## TODO
```
cryptpad_1 | Linking config.js
cryptpad_1 | Using secure websockets: true
cryptpad_1 | Using storage adapter: './storage/file'
cryptpad_1 | sed: -e expression #1, char 27: unknown option to `s'
```
## Configuration ## Configuration
Set configurations Dockerfile or in .env (using docker-compose) file. Set configurations Dockerfile or in .env (using docker-compose) file.

@ -73,7 +73,7 @@ define([
var proxy = Cryptpad.getProxy(); var proxy = Cryptpad.getProxy();
var updateIndentSettings = function () { var updateIndentSettings = APP.updateIndentSettings = function () {
var indentUnit = proxy[indentKey]; var indentUnit = proxy[indentKey];
var useTabs = proxy[useTabsKey]; var useTabs = proxy[useTabsKey];
setIndentation( setIndentation(
@ -208,6 +208,9 @@ define([
$previewContainer.hide(); $previewContainer.hide();
APP.$previewButton.removeClass('active'); APP.$previewButton.removeClass('active');
$codeMirror.addClass('fullPage'); $codeMirror.addClass('fullPage');
if (typeof(APP.updateIndentSettings) === 'function') {
APP.updateIndentSettings();
}
}; };
config.onInit = function (info) { config.onInit = function (info) {

@ -18,13 +18,6 @@ define([
if (!document.body) { return; } if (!document.body) { return; }
clearInterval(intr); clearInterval(intr);
document.body.appendChild(elem); document.body.appendChild(elem);
require([
'/customize/messages.js',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
], function (Messages) {
document.getElementById('cp-loading-message').innerText = Messages.loading;
});
}; };
intr = setInterval(append, 100); intr = setInterval(append, 100);
append(); append();

@ -773,11 +773,18 @@ define([
} }
// Used in ckeditor-config.js // Used in ckeditor-config.js
Ckeditor.CRYPTPAD_URLARGS = ApiConfig.requireConf.urlArgs; Ckeditor.CRYPTPAD_URLARGS = ApiConfig.requireConf.urlArgs;
editor = Ckeditor.replace('editor1', { module.ckeditor = editor = Ckeditor.replace('editor1', {
customConfig: '/customize/ckeditor-config.js', customConfig: '/customize/ckeditor-config.js',
}); });
editor.on('instanceReady', waitFor()); editor.on('instanceReady', waitFor());
}).nThen(function (/*waitFor*/) { }).nThen(function (/*waitFor*/) {
if (Ckeditor.env.safari) {
var fixIframe = function () {
$('iframe.cke_wysiwyg_frame').height($('#cke_1_contents').height());
};
$(window).resize(fixIframe);
fixIframe();
}
Links.addSupportForOpeningLinksInNewTab(Ckeditor)({editor: editor}); Links.addSupportForOpeningLinksInNewTab(Ckeditor)({editor: editor});
Cryptpad.onError(function (info) { Cryptpad.onError(function (info) {
if (info && info.type === "store") { if (info && info.type === "store") {

@ -176,7 +176,8 @@ define([
var $inputBlock = $('<div>', { var $inputBlock = $('<div>', {
'class': 'inputBlock', 'class': 'inputBlock',
}).appendTo($div); }).css('flex-flow', 'column')
.appendTo($div);
var $input = $('<input>', { var $input = $('<input>', {
type: 'checkbox', type: 'checkbox',
@ -186,16 +187,9 @@ define([
proxy[key] = val; proxy[key] = val;
}).appendTo($inputBlock); }).appendTo($inputBlock);
proxy.on('change', [key], function (o, n) { $input.val(n); }); $input[0].checked = !!proxy[key];
proxy.on('change', [key], function (o, n) { $input[0].checked = !!n; });
Cryptpad.getAttribute('indentUnit', function (e, val) {
if (e) { return void console.error(e); }
if (typeof(val) !== 'number') {
$input.val(2);
} else {
$input.val(val);
}
});
return $div; return $div;
}; };

Loading…
Cancel
Save