diff --git a/config.sample.json b/config.sample.json
index 9be92fa747..f26a6553f9 100644
--- a/config.sample.json
+++ b/config.sample.json
@@ -11,5 +11,6 @@
"matrix.org"
]
},
- "welcomeUserId": "@RiotBot:matrix.org"
+ "welcomeUserId": "@RiotBot:matrix.org",
+ "welcomePageUrl": "https://about.riot.im"
}
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..4f93eaae21 100644
--- a/src/components/structures/HomePage.js
+++ b/src/components/structures/HomePage.js
@@ -25,15 +25,24 @@ 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 unset, the 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 (
-
);
}
diff --git a/src/components/structures/LeftPanel.js b/src/components/structures/LeftPanel.js
index a9df37a8b8..e86dd7b1d3 100644
--- a/src/components/structures/LeftPanel.js
+++ b/src/components/structures/LeftPanel.js
@@ -30,7 +30,6 @@ var LeftPanel = React.createClass({
propTypes: {
collapsed: React.PropTypes.bool.isRequired,
- teamToken: React.PropTypes.string,
},
getInitialState: function() {
@@ -129,7 +128,7 @@ var LeftPanel = React.createClass({
collapsed={this.props.collapsed}
searchFilter={this.state.searchFilter}
ConferenceHandler={VectorConferenceHandler} />
-
+
);
}