From fa526d5618fda086fbb3d54bc310726afa8be1f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Mon, 14 Jun 2021 14:06:48 +0100 Subject: [PATCH 1/8] Add spacing to form responses page --- www/form/app-form.less | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/www/form/app-form.less b/www/form/app-form.less index f68b02be5..2307be493 100644 --- a/www/form/app-form.less +++ b/www/form/app-form.less @@ -461,11 +461,16 @@ display: flex; flex-flow: column; position: relative; - & > div { + .cp-form-creator-results-controls { + margin-bottom: 20px; background: @cp_form-bg1; padding: 10px; - &:not(:last-child) { - margin-bottom: 20px; + + } + .cp-form-creator-results-content { + .cp-form-block { + background: @cp_form-bg1; + padding: 10px; } } .cp-form-block-question { @@ -477,7 +482,7 @@ margin-top: -10px; margin-right: -10px; i { margin-right: 5px; } - background: @cp_form-bg2; + background: fade(@cryptpad_text_col, 15%); } .cp-form-results-type-text { max-height: 300px; @@ -515,6 +520,7 @@ } } .cp-form-individual { + margin-bottom: 10px; & > *:not(:last-child) { margin-right: 10px; } From dc091b81c7997c93a146eb5dd4f8311e04b20342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Mon, 14 Jun 2021 14:16:47 +0100 Subject: [PATCH 2/8] Adjust list of individual responses --- www/form/app-form.less | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/www/form/app-form.less b/www/form/app-form.less index 2307be493..8c796dd4f 100644 --- a/www/form/app-form.less +++ b/www/form/app-form.less @@ -463,8 +463,8 @@ position: relative; .cp-form-creator-results-controls { margin-bottom: 20px; - background: @cp_form-bg1; - padding: 10px; + //background: @cp_form-bg1; + //padding: 10px; } .cp-form-creator-results-content { @@ -520,7 +520,8 @@ } } .cp-form-individual { - margin-bottom: 10px; + background: @cp_form-bg1; + padding: 10px; & > *:not(:last-child) { margin-right: 10px; } From bba014af99ef433dd13cc15949b6837aaa88fc87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Mon, 14 Jun 2021 15:07:27 +0100 Subject: [PATCH 3/8] Swap update and reset buttons --- www/form/inner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/form/inner.js b/www/form/inner.js index 06d8b16aa..aac6c42c0 100644 --- a/www/form/inner.js +++ b/www/form/inner.js @@ -1931,7 +1931,7 @@ define([ return h('div.cp-form-send-container', [ invalid, cbox ? h('div.cp-form-anon-answer', cbox) : undefined, - send, reset + reset, send ]); }; var updateForm = function (framework, content, editable, answers, temp) { From 825badea71bfa6dc1c4195a881d3ec47e9f7feb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Mon, 14 Jun 2021 15:21:36 +0100 Subject: [PATCH 4/8] Fix spacing at the bottom of form pages --- www/form/app-form.less | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/form/app-form.less b/www/form/app-form.less index 8c796dd4f..24ff46de3 100644 --- a/www/form/app-form.less +++ b/www/form/app-form.less @@ -177,7 +177,8 @@ .cp-form-creator-add-full { display: flex; flex-flow: column; - margin: 20px 0px 100px 0px; + margin: 20px 0px 0px 0px; + padding-bottom: 100px; &> div:first-child { display: flex; height: 100%; @@ -224,7 +225,8 @@ .cp-form-send-container { text-align: center; - margin: 50px auto 100px auto; + margin: 50px auto 0px auto; + padding-bottom: 100px; button { &:not(:last-child) { margin-right: 10px; From 942a136886bfd84dba174fad0e2fcbe183825da0 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 15 Jun 2021 03:52:12 +0530 Subject: [PATCH 5/8] somewhat stricter httpUnsafeOrigin validation --- server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 72779c5f5..848167a98 100644 --- a/server.js +++ b/server.js @@ -24,8 +24,8 @@ var fancyURL = function (domain, path) { }; (function () { - // you absolutely must provide an 'httpUnsafeOrigin' - if (typeof(Env.httpUnsafeOrigin) !== 'string') { + // you absolutely must provide an 'httpUnsafeOrigin' (a truthy string) + if (!Env.httpUnsafeOrigin || typeof(Env.httpUnsafeOrigin) !== 'string') { throw new Error("No 'httpUnsafeOrigin' provided"); } @@ -66,7 +66,7 @@ var setHeaders = (function () { } // next define the base Content Security Policy (CSP) headers - if (typeof(config.contentSecurity) === 'string') { // XXX deprecate this + if (typeof(config.contentSecurity) === 'string') { headers['Content-Security-Policy'] = config.contentSecurity; if (!/;$/.test(headers['Content-Security-Policy'])) { headers['Content-Security-Policy'] += ';' } if (headers['Content-Security-Policy'].indexOf('frame-ancestors') === -1) { From 14483814fd795ea5d8e07ba31e381e4169b3ef1e Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 15 Jun 2021 03:52:54 +0530 Subject: [PATCH 6/8] update nginx trailing-slash rewrite for new apps --- docs/example.nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/example.nginx.conf b/docs/example.nginx.conf index a51a1ecaa..85f42dd81 100644 --- a/docs/example.nginx.conf +++ b/docs/example.nginx.conf @@ -214,7 +214,7 @@ server { # The nodejs server has some built-in forwarding rules to prevent # URLs like /pad from resulting in a 404. This simply adds a trailing slash # to a variety of applications. - location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media|profile|contacts|todo|filepicker|debug|kanban|sheet|support|admin|notifications|teams|calendar|presentation|doc)$ { + location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media|profile|contacts|todo|filepicker|debug|kanban|sheet|support|admin|notifications|teams|calendar|presentation|doc|form|report)$ { rewrite ^(.*)$ $1/ redirect; } From d3f878c8f0e5e9a1e83d66991cf263cfe2659189 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 15 Jun 2021 03:53:13 +0530 Subject: [PATCH 7/8] WIP changelog updates --- CHANGELOG.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 384814692..54952f524 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,25 @@ -# WIP +# 4.7.0 ## Goals +* deploy new forms page + ## Update notes * `bower update` for `chainpad-crypto#0.2.6` ([signed mailbox extensions](https://github.com/xwiki-labs/chainpad-crypto/releases/tag/0.2.6)) * log some information about the checkup page when launching the server +* new admin panel features + * link to checkup for better discoverability + * opt in to public listings + * opt in to email contact + * opt out of telemetry + * `blockDailyCheck` option moved here from default config + * preliminary work for statistical aggregation + * `removeDonateButton` option moved here from default config +* new app, so you probably want to review that your custom color schemes don't conflict +* server update and restart is required +* ready to display warnings about new server updates starting in 4.7.1 or 4.8.0 +* lots of new translations! ## Features @@ -13,10 +27,30 @@ * log messages which fail signature validation * make drive-redirect configurable via the settings page (disabled by default) * minor UI improvements for report page + * copy report to clipboard + * margins? +* new form app + * with participant, author, and auditor roles + * partially replaces the poll app + * polls no longer listed on home page + * it is still possible to make copies of existing polls + * otherwise the poll app redirects to the form app +* ability to add a file to your drive from the file menu even if it's already in a team +* embed file option in markdown toolbar + * kanban + * code + * slide? ## Bug fixes * variably display "Features" or "Pricing" in the _top bar_ +* default to the 'general' tab of the admin panel when the URL includes an unsupported hash +* guard against DOMException when updating atime in cache entries +* code app improvements + * guard against codemirror scroll-jank + * allow preview pane resize +* self-XSS via accountName +* password-protected files could not be opened or shared # 4.6.0 From 92fd7e7c80dfde14cfa85a2672e6be428ee44aab Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 15 Jun 2021 03:53:37 +0530 Subject: [PATCH 8/8] remove extraneous log --- www/common/drive-ui.js | 1 - 1 file changed, 1 deletion(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index b897d75ae..a145ab23b 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -4453,7 +4453,6 @@ define([ // Form: get auditor hash var auditorHash; if (parsed.hash && parsed.type === "form") { - console.error('ICI'); var formData = Hash.getFormData(null, parsed.hash, data.password); console.log(formData); if (formData) {