From 11d056fd05a9d8947f667df4f44fa1c8b13e4ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Mon, 15 Mar 2021 14:10:06 +0000 Subject: [PATCH 1/6] Improve display of broadcast messages --- www/admin/app-admin.less | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/www/admin/app-admin.less b/www/admin/app-admin.less index c85994796..ee9d7f30d 100644 --- a/www/admin/app-admin.less +++ b/www/admin/app-admin.less @@ -232,6 +232,19 @@ .empty { font-style: italic; } + tbody { + tr { + background-color: @cp_support-msg-bg; + border-bottom: 5px solid @cp_sidebar-right-bg; + padding: 5px; + td { + padding: 5px; + button { + margin: 0 !important; + } + } + } + } .cp-notification { display: flex; align-items: center; From cdf801b857325a5ad7ece46541c9f951f92724e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Mon, 15 Mar 2021 14:43:30 +0000 Subject: [PATCH 2/6] Layout of broadcast send buttons --- www/admin/app-admin.less | 7 +++++-- www/admin/inner.js | 25 +++++++++++++++++-------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/www/admin/app-admin.less b/www/admin/app-admin.less index ee9d7f30d..444c3010c 100644 --- a/www/admin/app-admin.less +++ b/www/admin/app-admin.less @@ -201,8 +201,11 @@ .cp-admin-broadcast-form { margin-top: 30px; - & > button:last-child { - margin-top: 30px !important; + .cp-broadcast-form-submit { + margin-top: 30px; + button { + margin-bottom: 10px !important; + } } .cp-broadcast-container { display: flex; diff --git a/www/admin/inner.js b/www/admin/inner.js index b680139ae..5925c6f29 100644 --- a/www/admin/inner.js +++ b/www/admin/inner.js @@ -1161,8 +1161,11 @@ define([ h('label', Messages.broadcast_translations), h('div.cp-broadcast-languages', boxes), container, - button, - noFallbackBtn + h('div.cp-broadcast-form-submit', [ + noFallbackBtn, + h('br'), + button + ]) ]); })(); return; @@ -1213,8 +1216,10 @@ define([ h('label', Messages.broadcast_end), end, h('br'), - button, - preview + h('div.cp-broadcast-form-submit', [ + button, + preview + ]) ]); })(); return; @@ -1242,8 +1247,10 @@ define([ $form.append([ $cbox[0], h('br'), - button, - preview + h('div.cp-broadcast-form-submit', [ + button, + preview + ]) ]); })(); return; @@ -1272,8 +1279,10 @@ define([ label, input, h('br'), - button, - preview + h('div.cp-broadcast-form-submit', [ + button, + preview + ]) ]); })(); return; From 9fd0402585532e175a294e0af24ffd4b2c47f88f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Mon, 15 Mar 2021 16:04:11 +0000 Subject: [PATCH 3/6] Fix hover color in light theme dropdown --- customize.dist/src/less2/include/colortheme.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less index f353758c8..de3ef5c6c 100644 --- a/customize.dist/src/less2/include/colortheme.less +++ b/customize.dist/src/less2/include/colortheme.less @@ -190,7 +190,7 @@ // Dropdown @cp_dropdown-fg: @cryptpad_text_col; @cp_dropdown-bg: @cryptpad_color_grey_100; -@cp_dropdown-bg-hover: @cryptpad_color_grey_100; +@cp_dropdown-bg-hover: @cryptpad_color_grey_200; @cp_dropdown-bg-active: @cryptpad_color_grey_300; // Rendered Markdown From a608d6ca6c7e4bdbe6d21420a060883f24fa1254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 16 Mar 2021 10:51:28 +0000 Subject: [PATCH 4/6] Show long broadcast messages in text color --- customize.dist/src/less2/include/alertify.less | 4 ++++ www/common/notifications.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/customize.dist/src/less2/include/alertify.less b/customize.dist/src/less2/include/alertify.less index 2f95a637e..982fa0db1 100644 --- a/customize.dist/src/less2/include/alertify.less +++ b/customize.dist/src/less2/include/alertify.less @@ -64,6 +64,10 @@ color: @cryptpad_text_col; } + .cp-admin-message { + color: @cryptpad_text_col; + } + .cp-inline-alert-text { flex: 1; } diff --git a/www/common/notifications.js b/www/common/notifications.js index aa25d0d31..41cfd075e 100644 --- a/www/common/notifications.js +++ b/www/common/notifications.js @@ -477,7 +477,7 @@ define([ // XXX Allow markdown (sanitized)? var content = h('div', [ h('h4', Messages.broadcast_newCustom), - h('div', toShow) + h('div.cp-admin-message', toShow) ]); UI.alert(content); // XXX Dismiss on click? From 3cd8bb1b77984fb290539faaf91c929ce360b2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 16 Mar 2021 10:51:54 +0000 Subject: [PATCH 5/6] Use existing red for preview notifications --- customize.dist/src/less2/include/notifications.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customize.dist/src/less2/include/notifications.less b/customize.dist/src/less2/include/notifications.less index def320120..892779a37 100644 --- a/customize.dist/src/less2/include/notifications.less +++ b/customize.dist/src/less2/include/notifications.less @@ -24,7 +24,7 @@ padding: 0 5px; color: @cp_dropdown-fg; &.preview { - color: red; // XXX + color: @cryptpad_color_red; } } .cp-avatar { From 685b118fe860e4b2a5b3e64c987c09e8e5285f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 16 Mar 2021 10:52:26 +0000 Subject: [PATCH 6/6] Adjust style of empty broadcasts --- www/admin/app-admin.less | 2 +- www/admin/inner.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/www/admin/app-admin.less b/www/admin/app-admin.less index 444c3010c..fa1989026 100644 --- a/www/admin/app-admin.less +++ b/www/admin/app-admin.less @@ -233,7 +233,7 @@ width: 100%; min-width: 600px; .empty { - font-style: italic; + background-color: transparent; } tbody { tr { diff --git a/www/admin/inner.js b/www/admin/inner.js index 5925c6f29..bcf5c4757 100644 --- a/www/admin/inner.js +++ b/www/admin/inner.js @@ -1300,7 +1300,7 @@ define([ // Empty history if (!msgs.length) { - $table.append(h('tr', h('td.empty', Messages.broadcast_empty))); + $table.append(h('tr.empty', h('td', Messages.broadcast_empty))); } // Build the table