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:
|
||||
{
|
||||
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"
|
||||
url={this.props.config.welcomePageUrl || 'home.html'}
|
||||
url={pageUrl}
|
||||
scrollbar={true}
|
||||
/>;
|
||||
}
|
||||
|
|
|
@ -25,12 +25,15 @@ export default class Welcome extends React.PureComponent {
|
|||
const AuthBody = sdk.getComponent("auth.AuthBody");
|
||||
const EmbeddedPage = sdk.getComponent('structures.EmbeddedPage');
|
||||
|
||||
const pagesConfig = SdkConfig.get().pages;
|
||||
const pageUrl = pagesConfig ? pagesConfig.welcomeUrl : 'welcome.html';
|
||||
|
||||
return (
|
||||
<AuthPage>
|
||||
<AuthHeader />
|
||||
<AuthBody>
|
||||
<EmbeddedPage className="mx_WelcomePage"
|
||||
url={SdkConfig.get().welcomePageUrl || 'home.html'}
|
||||
url={pageUrl}
|
||||
/>
|
||||
</AuthBody>
|
||||
</AuthPage>
|
||||
|
|
Loading…
Reference in a new issue