From 83da9cf752b996cdd60f9b5e7c74f53c35821d49 Mon Sep 17 00:00:00 2001 From: Evilham Date: Thu, 26 Oct 2017 20:29:14 +0200 Subject: [PATCH 1/3] Moved colours to colortheme.less to enable theming --- customize.dist/src/less2/include/colortheme.less | 6 +++++- www/pad/app-pad.less | 2 +- www/poll/app-poll.less | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less index e5e57cc74..d3db9e7cd 100644 --- a/customize.dist/src/less2/include/colortheme.less +++ b/customize.dist/src/less2/include/colortheme.less @@ -41,6 +41,7 @@ @colortheme_pad-bg: #1c4fa0; @colortheme_pad-color: #fff; +@colortheme_pad-toolbar-bg: #c1e7ff; @colortheme_slide-bg: #e57614; @colortheme_slide-color: #fff; @@ -50,6 +51,9 @@ @colortheme_poll-bg: #006304; @colortheme_poll-color: #fff; +@colortheme_poll-help-bg: #bbffbb; +@colortheme_poll-th-bg: #005bef; +@colortheme_poll-th-fg: #fff; @colortheme_whiteboard-bg: #800080; @colortheme_whiteboard-color: #fff; @@ -60,7 +64,7 @@ @colortheme_file-bg: #cd2532; @colortheme_file-color: #fff; -@colortheme_friends-bg: #607B8D; +@colortheme_friends-bg: #607b8d; @colortheme_friends-color: #fff; @colortheme_default-bg: #ddd; diff --git a/www/pad/app-pad.less b/www/pad/app-pad.less index 258f4f66a..086b27f81 100644 --- a/www/pad/app-pad.less +++ b/www/pad/app-pad.less @@ -16,7 +16,7 @@ #cke_1_toolbox { display: inline-block; width: 100%; - background-color: #c1e7ff; + background-color: @colortheme_pad-toolbar-bg; } #cke_1_toolbox .cke_toolbar { height: 28px; diff --git a/www/poll/app-poll.less b/www/poll/app-poll.less index 7d2cf1216..51976b925 100644 --- a/www/poll/app-poll.less +++ b/www/poll/app-poll.less @@ -14,15 +14,15 @@ @poll-fore: #555; -@poll-th-bg: #005bef; -@poll-th-fg: #fff; +@poll-th-bg: @colortheme_poll-th-bg; +@poll-th-fg: @colortheme_poll-th-fg; @poll-th-user-bg: darken(@poll-th-bg, 10%); @poll-editing: lighten(@poll-th-bg, 10%); @poll-winner: darken(@poll-th-bg, 15%); @poll-td-bg: @poll-th-bg; @poll-td-fg: @poll-th-fg; -@poll-help-bg: #bbffbb; // lightgreen +@poll-help-bg: @colortheme_poll-help-bg; @poll-uncommitted-cell: #eee; @poll-uncommitted-bg: #ddd; //lighten(@poll-th-bg, 50%); From 4933aafbc8cd8f83339469df7c6fa4bdbc64a1c0 Mon Sep 17 00:00:00 2001 From: Evilham Date: Fri, 27 Oct 2017 18:31:52 +0200 Subject: [PATCH 2/3] Added default values to avoid breaking existing themes. --- www/pad/app-pad.less | 4 ++++ www/poll/app-poll.less | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/www/pad/app-pad.less b/www/pad/app-pad.less index 086b27f81..55a50e28e 100644 --- a/www/pad/app-pad.less +++ b/www/pad/app-pad.less @@ -1,3 +1,7 @@ +// Defaults to avoid breaking existing themes + +@colortheme_pad-toolbar-bg: #c1e7ff; + @import (once) "../../customize/src/less2/include/toolbar.less"; @import (once) '../../customize/src/less2/include/alertify.less'; @import (once) '../../customize/src/less2/include/tokenfield.less'; diff --git a/www/poll/app-poll.less b/www/poll/app-poll.less index 51976b925..a2b3838f9 100644 --- a/www/poll/app-poll.less +++ b/www/poll/app-poll.less @@ -1,3 +1,9 @@ +// Defaults to avoid breaking existing themes + +@colortheme_poll-th-bg: #005bef; +@colortheme_poll-th-fg: #fff; +@colortheme_poll-help-bg: #bbffbb; + @import (once) "../../customize/src/less2/include/browser.less"; @import (once) "../../customize/src/less2/include/toolbar.less"; @import (once) "../../customize/src/less2/include/markdown.less"; From 0a14c715ad0188001a7b7008782afbed1f4c8b25 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 30 Oct 2017 14:40:43 +0100 Subject: [PATCH 3/3] add test for support of invite urls --- www/assert/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/assert/main.js b/www/assert/main.js index 0b759c99b..3eb9e5892 100644 --- a/www/assert/main.js +++ b/www/assert/main.js @@ -237,6 +237,14 @@ define([ !secret.hashData.present); }, "test support for trailing slashes in version 1 hash failed to parse"); + assert(function (cb) { + var secret = Cryptpad.parsePadUrl('/invite/#/1/ilrOtygzDVoUSRpOOJrUuQ/e8jvf36S3chzkkcaMrLSW7PPrz7VDp85lIFNI26dTmr=/'); + var hd = secret.hashData; + cb(hd.channel === "ilrOtygzDVoUSRpOOJrUuQ" && + hd.pubkey === "e8jvf36S3chzkkcaMrLSW7PPrz7VDp85lIFNI26dTmr=" && + hd.type === 'invite'); + }, "test support for invite urls"); + assert(function (cb) { // TODO return cb(true);