mirror of https://github.com/vector-im/riot-web
Restructure host signup terms dialog documents config and dialog
parent
3ed6f1fe5d
commit
e31b89b952
|
@ -168,12 +168,32 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
|
||||||
}
|
}
|
||||||
|
|
||||||
private onAccountDetailsRequest = () => {
|
private onAccountDetailsRequest = () => {
|
||||||
|
const termsDialog = this.config.termsDialog;
|
||||||
|
const textComponent = (
|
||||||
|
<>
|
||||||
|
<p>
|
||||||
|
{termsDialog.text}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{_t("Learn more in our")}
|
||||||
|
<a href={termsDialog.privacyPolicy.href} target="_blank" rel="noreferrer noopener">
|
||||||
|
{termsDialog.privacyPolicy.text}
|
||||||
|
</a>,
|
||||||
|
<a href={termsDialog.termsOfService.href} target="_blank" rel="noreferrer noopener">
|
||||||
|
{termsDialog.termsOfService.text}
|
||||||
|
</a> {_t("and")}
|
||||||
|
<a href={termsDialog.cookiePolicy.href} target="_blank" rel="noreferrer noopener">
|
||||||
|
{termsDialog.cookiePolicy.text}
|
||||||
|
</a>.
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
|
);
|
||||||
Modal.createDialog(
|
Modal.createDialog(
|
||||||
QuestionDialog,
|
QuestionDialog,
|
||||||
{
|
{
|
||||||
title: this.config.termsDialog.title,
|
title: termsDialog.title,
|
||||||
description: this.config.termsDialog.text,
|
description: textComponent,
|
||||||
button: this.config.termsDialog.acceptText,
|
button: termsDialog.acceptText,
|
||||||
onFinished: this.onAccountDetailsDialogFinished,
|
onFinished: this.onAccountDetailsDialogFinished,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -53,7 +53,9 @@ interface ILink {
|
||||||
|
|
||||||
interface IHostSignupTermsDialogConfig {
|
interface IHostSignupTermsDialogConfig {
|
||||||
acceptText: string;
|
acceptText: string;
|
||||||
termsDocuments: Array<ILink>;
|
cookiePolicy: ILink;
|
||||||
|
privacyPolicy: ILink;
|
||||||
|
termsOfService: ILink;
|
||||||
text: string;
|
text: string;
|
||||||
title: string;
|
title: string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue