From 66f450b99573dda6559b11661808d56930c8796c Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 26 Sep 2019 18:03:12 +0100 Subject: [PATCH 1/4] Lowercase terms --- src/components/views/dialogs/TermsDialog.js | 2 +- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/dialogs/TermsDialog.js b/src/components/views/dialogs/TermsDialog.js index dee183bc6c..f80a0dc059 100644 --- a/src/components/views/dialogs/TermsDialog.js +++ b/src/components/views/dialogs/TermsDialog.js @@ -184,7 +184,7 @@ export default class TermsDialog extends React.PureComponent { hasCancel={false} >
-

{_t("To continue you need to accept the Terms of this service.")}

+

{_t("To continue you need to accept the terms of this service.")}

diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index c23cd6d324..8c17a2c976 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1383,7 +1383,7 @@ "Be found by phone or email": "Be found by phone or email", "Use bots, bridges, widgets and sticker packs": "Use bots, bridges, widgets and sticker packs", "Terms of Service": "Terms of Service", - "To continue you need to accept the Terms of this service.": "To continue you need to accept the Terms of this service.", + "To continue you need to accept the terms of this service.": "To continue you need to accept the terms of this service.", "Service": "Service", "Summary": "Summary", "Terms": "Terms", From 701ec259e66ad733f8edc757d35b2f88856dcbe4 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 27 Sep 2019 17:43:04 +0100 Subject: [PATCH 2/4] Rename Terms column in modal to Document --- src/components/views/dialogs/TermsDialog.js | 2 +- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/dialogs/TermsDialog.js b/src/components/views/dialogs/TermsDialog.js index f80a0dc059..20c9fe5367 100644 --- a/src/components/views/dialogs/TermsDialog.js +++ b/src/components/views/dialogs/TermsDialog.js @@ -190,7 +190,7 @@ export default class TermsDialog extends React.PureComponent { - + {rows} diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 8c17a2c976..6453298874 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1386,7 +1386,7 @@ "To continue you need to accept the terms of this service.": "To continue you need to accept the terms of this service.", "Service": "Service", "Summary": "Summary", - "Terms": "Terms", + "Document": "Document", "Next": "Next", "You are currently blacklisting unverified devices; to send messages to these devices you must verify them.": "You are currently blacklisting unverified devices; to send messages to these devices you must verify them.", "We recommend you go through the verification process for each device to confirm they belong to their legitimate owner, but you can resend the message without verifying if you prefer.": "We recommend you go through the verification process for each device to confirm they belong to their legitimate owner, but you can resend the message without verifying if you prefer.", From d80a2df979334d2f4dc8d98d8cac32e2bd0d7231 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 27 Sep 2019 17:57:10 +0100 Subject: [PATCH 3/4] Move document name to new column --- res/css/views/dialogs/_TermsDialog.scss | 1 + src/components/views/dialogs/TermsDialog.js | 11 +++-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/res/css/views/dialogs/_TermsDialog.scss b/res/css/views/dialogs/_TermsDialog.scss index df2a72010f..aad679a5b3 100644 --- a/res/css/views/dialogs/_TermsDialog.scss +++ b/res/css/views/dialogs/_TermsDialog.scss @@ -40,6 +40,7 @@ limitations under the License. } .mx_TermsDialog_link { + display: inline-block; mask-image: url('$(res)/img/external-link.svg'); background-color: $accent-color; width: 10px; diff --git a/src/components/views/dialogs/TermsDialog.js b/src/components/views/dialogs/TermsDialog.js index 20c9fe5367..1e706ff1a7 100644 --- a/src/components/views/dialogs/TermsDialog.js +++ b/src/components/views/dialogs/TermsDialog.js @@ -90,21 +90,17 @@ export default class TermsDialog extends React.PureComponent { } } - _summaryForServiceType(serviceType, docName) { + _summaryForServiceType(serviceType) { switch (serviceType) { case Matrix.SERVICE_TYPES.IS: return
{_t("Find others by phone or email")}
{_t("Be found by phone or email")} - {docName !== null ?
: ''} - {docName !== null ? '('+docName+')' : ''}
; case Matrix.SERVICE_TYPES.IM: return
{_t("Use bots, bridges, widgets and sticker packs")} - {docName !== null ?
: ''} - {docName !== null ? '('+docName+')' : ''}
; } } @@ -133,14 +129,13 @@ export default class TermsDialog extends React.PureComponent { } const summary = this._summaryForServiceType( policiesAndService.service.serviceType, - policyValues.length > 1 ? termDoc[termsLang].name : null, ); rows.push(
-
{_t("Service")} {_t("Summary")}{_t("Terms")}{_t("Document")} {_t("Accept")}
{serviceName} {summary} -
+
{termDoc[termsLang].name} + Date: Mon, 30 Sep 2019 17:37:30 +0100 Subject: [PATCH 4/4] Only show service summary once --- src/components/views/dialogs/TermsDialog.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/views/dialogs/TermsDialog.js b/src/components/views/dialogs/TermsDialog.js index 1e706ff1a7..6fd818c97c 100644 --- a/src/components/views/dialogs/TermsDialog.js +++ b/src/components/views/dialogs/TermsDialog.js @@ -124,12 +124,13 @@ export default class TermsDialog extends React.PureComponent { const termDoc = policyValues[i]; const termsLang = pickBestLanguage(Object.keys(termDoc).filter((k) => k !== 'version')); let serviceName; + let summary; if (i === 0) { serviceName = this._nameForServiceType(policiesAndService.service.serviceType, parsedBaseUrl.host); + summary = this._summaryForServiceType( + policiesAndService.service.serviceType, + ); } - const summary = this._summaryForServiceType( - policiesAndService.service.serviceType, - ); rows.push(
{serviceName}