Use separate config settings for each page
This commit is contained in:
parent
7cc38f9d96
commit
c587dcab92
2 changed files with 15 additions and 2 deletions
|
@ -459,8 +459,18 @@ const LoggedInView = React.createClass({
|
||||||
|
|
||||||
case PageTypes.HomePage:
|
case PageTypes.HomePage:
|
||||||
{
|
{
|
||||||
|
const pagesConfig = this.props.config.pages;
|
||||||
|
let pageUrl;
|
||||||
|
if (pagesConfig) {
|
||||||
|
pageUrl = pagesConfig.homeUrl;
|
||||||
|
} else {
|
||||||
|
// This is a deprecated config option for the home page
|
||||||
|
// (despite the name, given we also now have a welcome
|
||||||
|
// page, which is not the same).
|
||||||
|
pageUrl = this.props.config.welcomePageUrl;
|
||||||
|
}
|
||||||
pageElement = <EmbeddedPage className="mx_HomePage"
|
pageElement = <EmbeddedPage className="mx_HomePage"
|
||||||
url={this.props.config.welcomePageUrl || 'home.html'}
|
url={pageUrl}
|
||||||
scrollbar={true}
|
scrollbar={true}
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,12 +25,15 @@ export default class Welcome extends React.PureComponent {
|
||||||
const AuthBody = sdk.getComponent("auth.AuthBody");
|
const AuthBody = sdk.getComponent("auth.AuthBody");
|
||||||
const EmbeddedPage = sdk.getComponent('structures.EmbeddedPage');
|
const EmbeddedPage = sdk.getComponent('structures.EmbeddedPage');
|
||||||
|
|
||||||
|
const pagesConfig = SdkConfig.get().pages;
|
||||||
|
const pageUrl = pagesConfig ? pagesConfig.welcomeUrl : 'welcome.html';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AuthPage>
|
<AuthPage>
|
||||||
<AuthHeader />
|
<AuthHeader />
|
||||||
<AuthBody>
|
<AuthBody>
|
||||||
<EmbeddedPage className="mx_WelcomePage"
|
<EmbeddedPage className="mx_WelcomePage"
|
||||||
url={SdkConfig.get().welcomePageUrl || 'home.html'}
|
url={pageUrl}
|
||||||
/>
|
/>
|
||||||
</AuthBody>
|
</AuthBody>
|
||||||
</AuthPage>
|
</AuthPage>
|
||||||
|
|
Loading…
Reference in a new issue