File tree Expand file tree Collapse file tree
src/components/structures Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < title > Riot - Home</ title >
5+ </ head >
6+ < body >
7+ < div > Welcome to Riot</ div >
8+ </ body >
9+ </ html >
Original file line number Diff line number Diff line change 88// "dest/b/...".
99const COPY_LIST = [
1010 [ "res/manifest.json" , "webapp" ] ,
11+ [ "res/home.html" , "webapp" ] ,
1112 [ "res/{media,vector-icons}/**" , "webapp" ] ,
1213 [ "res/flags/*" , "webapp/flags/" ] ,
1314 [ "src/skins/vector/{fonts,img}/**" , "webapp" ] ,
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ module.exports = React.createClass({
2727
2828 propTypes : {
2929 collapsed : React . PropTypes . bool . isRequired ,
30- teamToken : React . PropTypes . string ,
3130 } ,
3231
3332 getInitialState : function ( ) {
@@ -114,21 +113,13 @@ module.exports = React.createClass({
114113
115114 render : function ( ) {
116115 var TintableSvg = sdk . getComponent ( 'elements.TintableSvg' ) ;
117-
118- var homeButton ;
119- if ( this . props . teamToken ) {
120- homeButton = (
121- < AccessibleButton className = "mx_BottomLeftMenu_homePage" onClick = { this . onHomeClick } onMouseEnter = { this . onHomeMouseEnter } onMouseLeave = { this . onHomeMouseLeave } >
122- < TintableSvg src = "img/icons-home.svg" width = "25" height = "25" />
123- { this . getLabel ( "Welcome page" , this . state . homeHover ) }
124- </ AccessibleButton >
125- ) ;
126- }
127-
128116 return (
129117 < div className = "mx_BottomLeftMenu" >
130118 < div className = "mx_BottomLeftMenu_options" >
131- { homeButton }
119+ < AccessibleButton className = "mx_BottomLeftMenu_homePage" onClick = { this . onHomeClick } onMouseEnter = { this . onHomeMouseEnter } onMouseLeave = { this . onHomeMouseLeave } >
120+ < TintableSvg src = "img/icons-home.svg" width = "25" height = "25" />
121+ { this . getLabel ( "Welcome page" , this . state . homeHover ) }
122+ </ AccessibleButton >
132123 < AccessibleButton className = "mx_BottomLeftMenu_people" onClick = { this . onPeopleClick } onMouseEnter = { this . onPeopleMouseEnter } onMouseLeave = { this . onPeopleMouseLeave } >
133124 < TintableSvg src = "img/icons-people.svg" width = "25" height = "25" />
134125 { this . getLabel ( "Start chat" , this . state . peopleHover ) }
Original file line number Diff line number Diff line change @@ -25,15 +25,25 @@ module.exports = React.createClass({
2525 displayName : 'HomePage' ,
2626
2727 propTypes : {
28+ // URL base of the team server.
2829 teamServerUrl : React . PropTypes . string . isRequired ,
29- teamToken : React . PropTypes . string . isRequired ,
30- collapsedRhs : React . PropTypes . bool ,
30+ // Team token. Optional. If set, used as to get the static homepage of the team
31+ // associated. If unset, homePageUrl will be used.
32+ teamToken : React . PropTypes . string ,
33+ // URL to use as the iFrame src. Defaults to /home.html.
34+ homePageUrl : React . PropTypes . string ,
3135 } ,
3236
3337 render : function ( ) {
38+ let src = this . props . homePageUrl || '/home.html' ;
39+
40+ if ( this . props . teamToken ) {
41+ src = `${ this . props . teamServerUrl } /static/${ this . props . teamToken } /home.html` ;
42+ }
43+
3444 return (
3545 < div className = "mx_HomePage" >
36- < iframe src = { ` ${ this . props . teamServerUrl } /static/ ${ this . props . teamToken } /home.html` } />
46+ < iframe src = { src } />
3747 </ div >
3848 ) ;
3949 }
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ var LeftPanel = React.createClass({
3030
3131 propTypes : {
3232 collapsed : React . PropTypes . bool . isRequired ,
33- teamToken : React . PropTypes . string ,
3433 } ,
3534
3635 getInitialState : function ( ) {
@@ -129,7 +128,7 @@ var LeftPanel = React.createClass({
129128 collapsed = { this . props . collapsed }
130129 searchFilter = { this . state . searchFilter }
131130 ConferenceHandler = { VectorConferenceHandler } />
132- < BottomLeftMenu collapsed = { this . props . collapsed } teamToken = { this . props . teamToken } />
131+ < BottomLeftMenu collapsed = { this . props . collapsed } />
133132 </ aside >
134133 ) ;
135134 }
You can’t perform that action at this time.
0 commit comments