Support custom HTML for signup and signin pages.

This commit is contained in:
Gucheng Wang
2021-10-26 13:11:21 +08:00
parent 5526286ad8
commit 2e1b51910f
4 changed files with 66 additions and 2 deletions

View File

@ -412,6 +412,12 @@ class LoginPage extends React.Component {
return Util.renderMessageLarge(this, this.state.msg);
}
if (application.signinHtml !== "") {
return (
<div dangerouslySetInnerHTML={{ __html: application.signinHtml}} />
)
}
const visibleOAuthProviderItems = application.providers.filter(providerItem => this.isProviderVisible(providerItem));
if (this.props.application === undefined && !application.enablePassword && visibleOAuthProviderItems.length === 1) {
Setting.goToLink(Provider.getAuthUrl(application, visibleOAuthProviderItems[0].provider, "signup"));