diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ad1f31f3..04b57386b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,48 @@ +# 4.1.0 (B) + +## Goals + +Our recent 4.0.0 release introduced major changes to CryptPad's style-sheets which likely caused some difficulty for admins who'd made extensive changes to their instance's appearance. We figure it's best to make more changes now instead of making small breaking changes more frequently, so we decided now is a good time to refactor a lot of our styles to implement an often-requested dark mode in CryptPad. + +## Update notes + +As noted above, this release introduces some major changes to CryptPad styles. If you have customized the look of your instance we recommend testing this new version locally before deploying it to your server to ensure that there are no critical conflicts. + +Otherwise, to update from 4.0.0 to 4.1.0: + +1. Stop your server +2. Get the latest code from the 4.1.0 tag (`git fetch origin && git checkout 4.1.0`, or just `git pull origin main`) +3. Install the latest dependencies with `bower update` and `npm i` +4. Restart your server + +## Features + +* The new dark theme will be applied if CryptPad detects that your OS or browser are configured to prefer dark modes, otherwise you can choose to enable the dark mode on a per-device basis via the _Appearance_ tab of the settings page. Aside from general tweaks for common stylistic elements like the toolbar and loading screen, we made many app-specific changes: + * Markdown-based slide colors are initialized to match the theme of their creator. + * Freshly-opened whiteboards are initialized with _white_ preselected instead of _black_ if you are using dark mode. + * Markdown-extensions, like mermaid, markmap, and mathjax required additional effort to match users themes. + * The rich-text editor is somewhat challenging, like the whiteboard, because users can choose to use text colors that may not contrast well against the background, and users may not all see the same thing. The default text color will always contrast with the theme background. Manually set light/dark colors may render the text unreadable for users using another theme. +* We made some UI updates to offer an increased ability to hide features that can take up too much of the available screen space. In particular, rich-text editors can choose to hide comments and the table of contents. Document owners can use the new _Document settings_ menu (available from the _File_ dropdown) to suggest settings for the current document, such that new users can view the document in its intended configuration unless they have set their own preferences. +* We've made some performance optimizations in a few key places on the client: + * Large, complex kanbans tended to slow down quite a bit when multiple people were editing or moving cards at once. Boards are now only applied one second after the most recent change (unless updates have not been displayed for more than five seconds). + * The drive's search functionality is similarly throttled to prevent multiple concurrent searches from being executed in parallel. +* Updates to the whiteboard include the undo/redo functionality via _fabric-history.js_, and the ability to add text to drawings. +* The _teams-picker_ page has been redesigned to use a card-based interface so that clicking anywhere on a team's card opens its drive, rather than just a single "open" button. +* We've added a number of new features to the admin panel: + * The _Statistics_ tab now features a button to load the latest stats from the server instead of requiring a page reload to see the latest numbers. + * There is a new _Performance_ tab which includes a table of the time spent executing various server functions. We're using this data to prioritize optimizations to decrease resource consumption and increase the number of users one instance can support. + * We've added a _Check account storage_ section on the _User storage_ tab to allow admins to check how much of their quota any particular user has consumed, however, it seems to return incorrect results some of the time, so you can consider it experimental for now. + +## Bug fixes + +* The recent updates to display recent versions of user data from a local cache before the latest content had been synchronized introduced a few minor issues which have been addressed: + * The user menu (in the top-right corner) incorrectly linked to a _donate link_ instead of a link to their subscription page because their first attempt to check their quota failed. + * The usage bar in the drive, teams, and settings pages only appeared after some time because it is scheduled to update every thirty seconds, and the first attempt failed while it was still connecting. We now update retry more eagerly until a connection is established. +* We've fixed a few links to our documentation which incorrectly concatenated two URLs together. +* Users that had added the same document template to their own drive as well as a team's drive could see two instances of it suggested on the pad creation screen. We now deduplicate this list such that only one copy is suggested for use. +* The Kanban app now offers better touch support, as some users reported that they were unable to drag and drop cards and columns. +* Finally, we now guard against some edge cases in the _access modal_ in which the owner of a document could send themself a request for edit rights if they loaded the document in view mode after deleting it from their drive. + # 4.0.0 (A) We're very happy to introduce CryptPad v4.0! diff --git a/customize.dist/src/less2/include/toolbar.less b/customize.dist/src/less2/include/toolbar.less index d54778efd..7b4e43d0d 100644 --- a/customize.dist/src/less2/include/toolbar.less +++ b/customize.dist/src/less2/include/toolbar.less @@ -1035,6 +1035,7 @@ &.fa-download { order: 30; } &.fa-print { order: 35; } &.fa-trash { order: 40; } + &.cp-toolbar-icon-pad-settings { order: 75; } &.fa-info-circle { order: 100; } &.cp-toolbar-icon-help { order: 150; } diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 900172f16..32cf421d5 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -1674,7 +1674,9 @@ define([ if (padData && padData.validateKey && store.messenger) { store.messenger.storeValidateKey(data.channel, padData.validateKey); } - postMessage(clientId, "PAD_READY", pad.noCache); + onReadyEvt.reg(function () { + postMessage(clientId, "PAD_READY", pad.noCache); + }); }, onMessage: function (m, user, validateKey, isCp, hash) { channel.lastHash = hash; diff --git a/www/pad/inner.js b/www/pad/inner.js index 5e529d12d..3e171c479 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -335,7 +335,7 @@ define([ var $settingsButton = framework._.sfCommon.createButton('', true, { drawer: true, text: Messages.pad_settings_title, - name: 'pad_settings', + name: 'pad-settings', icon: 'fa-cog', }, function () { UI.alert(getSettings()); @@ -655,6 +655,7 @@ define([ var documentBody = ifrWindow.document.body; var inner = window.inner = documentBody; var $inner = $(inner); + $inner.attr('contenteditable', 'false'); var observer = new MutationObserver(function(muts) { muts.forEach(function(mut) { @@ -712,7 +713,6 @@ define([ if (!privateData.isEmbed) { mkHelpMenu(framework); } - mkSettingsMenu(framework); framework._.sfCommon.getAttribute(['pad', 'width'], function(err, data) { var active = data || typeof(data) === "undefined"; @@ -1033,6 +1033,12 @@ define([ $inner.attr('contenteditable', 'false'); } + common.getPadMetadata(null, function (md) { + if (md && md.error) { return; } + if (!common.isOwned(md.owners)) { return; } + mkSettingsMenu(framework); + }); + var fmConfig = { ckeditor: editor, dropArea: $inner,