diff --git a/container-start.sh b/container-start.sh index 2aa4ae10f..990a83cd2 100755 --- a/container-start.sh +++ b/container-start.sh @@ -9,15 +9,20 @@ mkdir -p customize # Linking 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 [ -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" \ - && 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" \ - && 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 diff --git a/customize.dist/pages.js b/customize.dist/pages.js index 0261c839f..bc50ac22d 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -410,7 +410,7 @@ define([ }), h('div.spinnerContainer', h('span.fa.fa-circle-o-notch.fa-spin.fa-4x.fa-fw')), - h('p', Msg.loading) + h('p'), ]) ); }; diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index 661254f5d..43cbc9b22 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -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.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.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_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."; diff --git a/docs/cryptpad-docker.md b/docs/cryptpad-docker.md index d329f0354..027792c2e 100644 --- a/docs/cryptpad-docker.md +++ b/docs/cryptpad-docker.md @@ -22,15 +22,6 @@ Or, using docker-compose 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 Set configurations Dockerfile or in .env (using docker-compose) file. diff --git a/www/code/main.js b/www/code/main.js index a7e6f1447..07f02e6a1 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -73,7 +73,7 @@ define([ var proxy = Cryptpad.getProxy(); - var updateIndentSettings = function () { + var updateIndentSettings = APP.updateIndentSettings = function () { var indentUnit = proxy[indentKey]; var useTabs = proxy[useTabsKey]; setIndentation( @@ -208,6 +208,9 @@ define([ $previewContainer.hide(); APP.$previewButton.removeClass('active'); $codeMirror.addClass('fullPage'); + if (typeof(APP.updateIndentSettings) === 'function') { + APP.updateIndentSettings(); + } }; config.onInit = function (info) { diff --git a/www/common/loading.js b/www/common/loading.js index 41c9365ff..d9c3b8df9 100644 --- a/www/common/loading.js +++ b/www/common/loading.js @@ -18,14 +18,7 @@ define([ if (!document.body) { return; } clearInterval(intr); 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); append(); -}); \ No newline at end of file +}); diff --git a/www/pad/inner.js b/www/pad/inner.js index 48c901d69..28bfd6fa0 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -773,11 +773,18 @@ define([ } // Used in ckeditor-config.js Ckeditor.CRYPTPAD_URLARGS = ApiConfig.requireConf.urlArgs; - editor = Ckeditor.replace('editor1', { + module.ckeditor = editor = Ckeditor.replace('editor1', { customConfig: '/customize/ckeditor-config.js', }); editor.on('instanceReady', 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}); Cryptpad.onError(function (info) { if (info && info.type === "store") { diff --git a/www/settings/main.js b/www/settings/main.js index c36e6cf0c..bc65e10fa 100644 --- a/www/settings/main.js +++ b/www/settings/main.js @@ -176,7 +176,8 @@ define([ var $inputBlock = $('