You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Tweak page URL defaulting
This commit is contained in:
@@ -460,10 +460,11 @@ const LoggedInView = React.createClass({
|
|||||||
case PageTypes.HomePage:
|
case PageTypes.HomePage:
|
||||||
{
|
{
|
||||||
const pagesConfig = this.props.config.pages;
|
const pagesConfig = this.props.config.pages;
|
||||||
let pageUrl;
|
let pageUrl = null;
|
||||||
if (pagesConfig) {
|
if (pagesConfig) {
|
||||||
pageUrl = pagesConfig.homeUrl;
|
pageUrl = pagesConfig.homeUrl;
|
||||||
} else {
|
}
|
||||||
|
if (!pageUrl) {
|
||||||
// This is a deprecated config option for the home page
|
// This is a deprecated config option for the home page
|
||||||
// (despite the name, given we also now have a welcome
|
// (despite the name, given we also now have a welcome
|
||||||
// page, which is not the same).
|
// page, which is not the same).
|
||||||
|
|||||||
@@ -25,7 +25,13 @@ export default class Welcome extends React.PureComponent {
|
|||||||
const LanguageSelector = sdk.getComponent('auth.LanguageSelector');
|
const LanguageSelector = sdk.getComponent('auth.LanguageSelector');
|
||||||
|
|
||||||
const pagesConfig = SdkConfig.get().pages;
|
const pagesConfig = SdkConfig.get().pages;
|
||||||
const pageUrl = pagesConfig ? pagesConfig.welcomeUrl : 'welcome.html';
|
let pageUrl = null;
|
||||||
|
if (pagesConfig) {
|
||||||
|
pageUrl = pagesConfig.welcomeUrl;
|
||||||
|
}
|
||||||
|
if (!pageUrl) {
|
||||||
|
pageUrl = 'welcome.html';
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AuthPage>
|
<AuthPage>
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ export class TopLeftMenu extends React.Component {
|
|||||||
hasHomePage() {
|
hasHomePage() {
|
||||||
const config = SdkConfig.get();
|
const config = SdkConfig.get();
|
||||||
const pagesConfig = config.pages;
|
const pagesConfig = config.pages;
|
||||||
if (pagesConfig) {
|
if (pagesConfig && pagesConfig.homeUrl) {
|
||||||
return !!pagesConfig.homeUrl;
|
return true;
|
||||||
}
|
}
|
||||||
// This is a deprecated config option for the home page
|
// This is a deprecated config option for the home page
|
||||||
// (despite the name, given we also now have a welcome
|
// (despite the name, given we also now have a welcome
|
||||||
|
|||||||
Reference in New Issue
Block a user