diff --git a/res/home.html b/res/home.html new file mode 100644 index 0000000000..ddcfb0e887 --- /dev/null +++ b/res/home.html @@ -0,0 +1,9 @@ + + + + Riot - Home + + +
Welcome to Riot
+ + \ No newline at end of file diff --git a/scripts/copy-res.js b/scripts/copy-res.js index d3a2ee5e7b..c177925900 100755 --- a/scripts/copy-res.js +++ b/scripts/copy-res.js @@ -8,6 +8,7 @@ // "dest/b/...". const COPY_LIST = [ ["res/manifest.json", "webapp"], + ["res/home.html", "webapp"], ["res/{media,vector-icons}/**", "webapp"], ["res/flags/*", "webapp/flags/"], ["src/skins/vector/{fonts,img}/**", "webapp"], diff --git a/src/components/structures/BottomLeftMenu.js b/src/components/structures/BottomLeftMenu.js index f378cac628..f357bede96 100644 --- a/src/components/structures/BottomLeftMenu.js +++ b/src/components/structures/BottomLeftMenu.js @@ -27,7 +27,6 @@ module.exports = React.createClass({ propTypes: { collapsed: React.PropTypes.bool.isRequired, - teamToken: React.PropTypes.string, }, getInitialState: function() { @@ -114,21 +113,13 @@ module.exports = React.createClass({ render: function() { var TintableSvg = sdk.getComponent('elements.TintableSvg'); - - var homeButton; - if (this.props.teamToken) { - homeButton = ( - - - { this.getLabel("Welcome page", this.state.homeHover) } - - ); - } - return (
- { homeButton } + + + { this.getLabel("Welcome page", this.state.homeHover) } + { this.getLabel("Start chat", this.state.peopleHover) } diff --git a/src/components/structures/HomePage.js b/src/components/structures/HomePage.js index 8d44c90a2e..5518cb95bb 100644 --- a/src/components/structures/HomePage.js +++ b/src/components/structures/HomePage.js @@ -25,15 +25,25 @@ module.exports = React.createClass({ displayName: 'HomePage', propTypes: { + // URL base of the team server. teamServerUrl: React.PropTypes.string.isRequired, - teamToken: React.PropTypes.string.isRequired, - collapsedRhs: React.PropTypes.bool, + // Team token. Optional. If set, used as to get the static homepage of the team + // associated. If unset, homePageUrl will be used. + teamToken: React.PropTypes.string, + // URL to use as the iFrame src. Defaults to /home.html. + homePageUrl: React.PropTypes.string, }, render: function() { + let src = this.props.homePageUrl || '/home.html'; + + if (this.props.teamToken) { + src = `${this.props.teamServerUrl}/static/${this.props.teamToken}/home.html`; + } + return (
-