From 18ed6eb63c3075efeda709505b77615c7d8c0544 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 24 Aug 2018 11:35:21 +0100 Subject: [PATCH 1/2] Rener terms & conditions in settings If configured in config file --- src/components/structures/UserSettings.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index f4dc92aca4..ea700272b6 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -921,6 +921,25 @@ module.exports = React.createClass({ ; }, + _renderTermsAndConditionsLinks: function() { + if (SdkConfig.get().terms_and_conditions_links) { + const tncLinks = []; + for (const tncEntry of SdkConfig.get().terms_and_conditions_links) { + tncLinks.push(
+ {tncEntry.text} +
); + } + return
+

{ _t("Terms and Conditions") }

+
+ {tncLinks} +
+
; + } else { + return null; + } + }, + _renderClearCache: function() { return

{ _t("Clear Cache") }

@@ -1407,6 +1426,8 @@ module.exports = React.createClass({ { this._renderDeactivateAccount() } + { this._renderTermsAndConditionsLinks() } +
); From c03abddd1c7c3208cd62cf56cc47814b4c15c7c8 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 24 Aug 2018 11:38:38 +0100 Subject: [PATCH 2/2] s/terms and conditions/legal/ --- src/components/structures/UserSettings.js | 2 +- src/i18n/strings/en_EN.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index ea700272b6..53e1ddea71 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -930,7 +930,7 @@ module.exports = React.createClass({ ); } return
-

{ _t("Terms and Conditions") }

+

{ _t("Legal") }

{tncLinks}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b560c7e71b..2371ba0ca6 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1117,6 +1117,7 @@ "Lazy loading members not supported": "Lazy loading members not supported", "Lazy loading is not supported by your current homeserver.": "Lazy loading is not supported by your current homeserver.", "Deactivate my account": "Deactivate my account", + "Legal": "Legal", "Clear Cache": "Clear Cache", "Clear Cache and Reload": "Clear Cache and Reload", "Updates": "Updates",