From 18ed6eb63c3075efeda709505b77615c7d8c0544 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 24 Aug 2018 11:35:21 +0100 Subject: [PATCH] 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() } +
);