From ec9a32c15a7a1626a345bf9f1d643ce12197baa0 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 1 Jun 2021 19:27:24 +0530 Subject: [PATCH] minor UI improvements for report page --- CHANGELOG.md | 1 + .../src/less2/pages/page-report.less | 12 ++++++ www/common/clipboard.js | 18 +++++++-- www/report/main.js | 38 ++++++++++++++++++- 4 files changed, 64 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b02ebf004..384814692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ * more detailed messages for some tests on the checkup page * log messages which fail signature validation * make drive-redirect configurable via the settings page (disabled by default) +* minor UI improvements for report page ## Bug fixes diff --git a/customize.dist/src/less2/pages/page-report.less b/customize.dist/src/less2/pages/page-report.less index bd2cd6c60..220240237 100644 --- a/customize.dist/src/less2/pages/page-report.less +++ b/customize.dist/src/less2/pages/page-report.less @@ -12,6 +12,18 @@ html, body { background-color: @cp_static-bg !important; color: @cryptpad_text_col; font-family: "IBM Plex Mono"; + + #cp-report, #cp-report-ui { + max-width: 900px; + margin: auto; + padding: 15px; + } + #cp-report { + border: 1px solid @cryptpad_text_col; + } + #cp-report-ui { + text-align: right; + } } diff --git a/www/common/clipboard.js b/www/common/clipboard.js index 191895dfd..7d93e15f3 100644 --- a/www/common/clipboard.js +++ b/www/common/clipboard.js @@ -1,13 +1,15 @@ define(['jquery'], function ($) { var Clipboard = {}; - // copy arbitrary text to the clipboard - // return boolean indicating success - Clipboard.copy = function (text) { + var copy = function (text, multiline) { var $ta = $('', { type: 'text', }).val(text); + if (multiline) { + $ta = $('