mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Rener terms & conditions in settings
If configured in config file
This commit is contained in:
parent
8313dcd0dd
commit
18ed6eb63c
@ -921,6 +921,25 @@ module.exports = React.createClass({
|
|||||||
</div>;
|
</div>;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_renderTermsAndConditionsLinks: function() {
|
||||||
|
if (SdkConfig.get().terms_and_conditions_links) {
|
||||||
|
const tncLinks = [];
|
||||||
|
for (const tncEntry of SdkConfig.get().terms_and_conditions_links) {
|
||||||
|
tncLinks.push(<div key={tncEntry.url}>
|
||||||
|
<a href={tncEntry.url} rel="noopener" target="_blank">{tncEntry.text}</a>
|
||||||
|
</div>);
|
||||||
|
}
|
||||||
|
return <div>
|
||||||
|
<h3>{ _t("Terms and Conditions") }</h3>
|
||||||
|
<div className="mx_UserSettings_section">
|
||||||
|
{tncLinks}
|
||||||
|
</div>
|
||||||
|
</div>;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
_renderClearCache: function() {
|
_renderClearCache: function() {
|
||||||
return <div>
|
return <div>
|
||||||
<h3>{ _t("Clear Cache") }</h3>
|
<h3>{ _t("Clear Cache") }</h3>
|
||||||
@ -1407,6 +1426,8 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
{ this._renderDeactivateAccount() }
|
{ this._renderDeactivateAccount() }
|
||||||
|
|
||||||
|
{ this._renderTermsAndConditionsLinks() }
|
||||||
|
|
||||||
</GeminiScrollbarWrapper>
|
</GeminiScrollbarWrapper>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user