Merge branch 'new-guest-access' into matthew/i18n-welcome

pull/4129/head
Matthew Hodgson 2017-06-01 11:16:50 +01:00 committed by GitHub
commit a8f0ed60cf
2 changed files with 99 additions and 21 deletions

View File

@ -1 +1,76 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.57 146.63"><defs><style>.cls-1{fill:#7dc8a2;}.cls-2{fill:#afdbc5;}.cls-3,.cls-4,.cls-6{fill:#764d80;}.cls-4{font-size:26.18px;}.cls-4,.cls-6{stroke:#764d80;stroke-miterlimit:10;font-family:GothamRoundedBook, Gotham Rounded;}.cls-5{font-size:10.57px;letter-spacing:0em;}.cls-6{font-size:26.18px;}</style></defs><title>New_logo</title><g id="Design"><path class="cls-1" d="M1005.29,606.87H964.18a20.56,20.56,0,0,0-20.56,20.56v102.8a20.56,20.56,0,0,0,41.12,0V709.64h20.55a51.38,51.38,0,0,0,0-102.77Z" transform="translate(-942.96 -606.84)"/><path class="cls-2" d="M964.18,745.65a15.45,15.45,0,0,1-15.43-15.43V627.42A15.45,15.45,0,0,1,964.06,612h41.24a46.26,46.26,0,0,1,0,92.51H979.61v25.71A15.45,15.45,0,0,1,964.18,745.65Z" transform="translate(-942.96 -606.84)"/><path class="cls-1" d="M964.18,740.53a10.32,10.32,0,0,1-10.3-10.3V627.42A10.33,10.33,0,0,1,964,617.12h41.32a41.13,41.13,0,0,1,0,82.26H974.49v30.84A10.32,10.32,0,0,1,964.18,740.53Z" transform="translate(-942.96 -606.84)"/><path class="cls-2" d="M964.18,735.4a5.18,5.18,0,0,1-5.18-5.18V627.42a5.2,5.2,0,0,1,5-5.17h41.32a36,36,0,0,1,0,72H969.36v36A5.18,5.18,0,0,1,964.18,735.4Z" transform="translate(-942.96 -606.84)"/><path class="cls-1" d="M964.23,689.13h41.06a30.87,30.87,0,0,0,0-61.75H964.18Z" transform="translate(-942.96 -606.84)"/><path class="cls-2" d="M969.35,684l0-51.49h36a25.75,25.75,0,0,1,0,51.49Z" transform="translate(-942.96 -606.84)"/><path class="cls-1" d="M974.48,678.88l0-41.23h30.84a20.62,20.62,0,0,1,0,41.23Z" transform="translate(-942.96 -606.84)"/><path class="cls-2" d="M979.6,673.75l0-31h25.71a15.49,15.49,0,0,1,0,31Z" transform="translate(-942.96 -606.84)"/><path class="cls-1" d="M984.73,668.62l0-20.72h20.58a10.36,10.36,0,0,1,0,20.72Z" transform="translate(-942.96 -606.84)"/><path class="cls-2" d="M989.85,663.49V653h15.45a5.23,5.23,0,0,1,0,10.47Z" transform="translate(-942.96 -606.84)"/><circle class="cls-3" cx="963.53" cy="627.42" r="20.56" transform="translate(-1128.59 59.28) rotate(-35)"/><path class="cls-3" d="M1052.3,718.42A20.56,20.56,0,1,1,1018.62,742l-30.79-44a20.56,20.56,0,1,1,33.69-23.59Z" transform="translate(-942.96 -606.84)"/></g><g id="Layer_3" data-name="Layer 3"><path class="cls-3" d="M1088.3,639.53h16.37a1.64,1.64,0,0,0,0-3.29H1088.3a1.64,1.64,0,0,0,0,3.29Z" transform="translate(-942.96 -606.84)"/><path class="cls-3" d="M1088.3,610.13h4.9v5l0,0-5.77,4a1.64,1.64,0,0,0,1.88,2.69l4.62-3.23a6.55,6.55,0,0,0,12.42-2.93v-7.17s0,0,0,0a1.64,1.64,0,0,0-1.64-1.64H1088.3a1.64,1.64,0,0,0,0,3.29ZM1103,615.7a3.27,3.27,0,1,1-6.54,0v-5.57H1103Z" transform="translate(-942.96 -606.84)"/><path class="cls-3" d="M1104.68,682.48a1.64,1.64,0,0,0-1.64,1.64V689H1088.3a1.64,1.64,0,0,0-1.64,1.64h0a1.64,1.64,0,0,0,1.64,1.64H1103v5a1.64,1.64,0,1,0,3.29,0v-6.62h0v-6.5A1.64,1.64,0,0,0,1104.68,682.48Z" transform="translate(-942.96 -606.84)"/><path class="cls-3" d="M1096.49,653.29a10,10,0,1,0,10,10A10,10,0,0,0,1096.49,653.29Zm0,16.73a6.72,6.72,0,1,1,6.72-6.72A6.73,6.73,0,0,1,1096.49,670Z" transform="translate(-942.96 -606.84)"/><text class="cls-4" transform="translate(144.31 106.27) rotate(90)">I<tspan class="cls-5" x="7.62" y="0" xml:space="preserve"> </tspan><tspan x="17.13" y="0">M</tspan></text><text class="cls-6" transform="translate(150.81 96.13) rotate(90)">.</text></g></svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 173.6 146.6" style="enable-background:new 0 0 173.6 146.6;" xml:space="preserve">
<style type="text/css">
.st0{fill:#7DC8A2;}
.st1{fill:#AFDBC5;}
.st2{fill:#764D80;}
.st3{enable-background:new ;}
.st4{fill:none;stroke:#764D80;stroke-miterlimit:10;}
</style>
<title>New_logo</title>
<g id="Design">
<path class="st0" d="M62.3,0H21.2C9.9,0,0.7,9.2,0.7,20.6v102.8c0,11.4,9.2,20.6,20.6,20.6c11.3,0,20.5-9.2,20.6-20.6v-20.6h20.5
c28.4,0,51.4-23,51.4-51.4S90.7,0,62.3,0z"/>
<path class="st1" d="M21.2,138.8c-8.5,0-15.4-6.9-15.4-15.4V20.6c0-8.5,6.8-15.3,15.3-15.4h41.2c25.5,0.4,46,21.4,45.6,46.9
c-0.4,25-20.6,45.2-45.6,45.6H36.6v25.7C36.6,131.9,29.7,138.8,21.2,138.8z"/>
<path class="st0" d="M21.2,133.7c-5.7,0-10.3-4.6-10.3-10.3V20.6c0-5.6,4.5-10.2,10.1-10.3h41.3c22.7,0,41.1,18.4,41.1,41.1
S85.1,92.5,62.4,92.5H31.5v30.8C31.5,129.1,26.9,133.7,21.2,133.7z"/>
<path class="st1" d="M21.2,128.6c-2.9,0-5.2-2.3-5.2-5.2V20.6c0-2.8,2.2-5.1,5-5.2h41.3c19.9,0,36,16.1,36,36s-16.1,36-36,36h-36
v36C26.4,126.3,24.1,128.6,21.2,128.6z"/>
<path class="st0" d="M21.3,82.3h41.1c17.1,0,30.9-13.8,30.9-30.9S79.4,20.5,62.3,20.5H21.2L21.3,82.3z"/>
<path class="st1" d="M26.4,77.2V25.7h36c14.2,0.3,25.5,12,25.2,26.3c-0.3,13.8-11.4,25-25.2,25.2H26.4z"/>
<path class="st0" d="M31.5,72V30.8h30.8c11.4,0.3,20.4,9.7,20.2,21.1c-0.2,11-9.1,19.9-20.2,20.2H31.5z"/>
<path class="st1" d="M36.6,66.9v-31h25.7c8.6,0,15.5,6.9,15.5,15.5s-6.9,15.5-15.5,15.5H36.6z"/>
<path class="st0" d="M41.8,61.8V41.1h20.6c5.7,0,10.4,4.7,10.3,10.4c0,5.7-4.6,10.3-10.3,10.3H41.8z"/>
<path class="st1" d="M46.9,56.6V46.2h15.5c2.9,0,5.2,2.3,5.2,5.2s-2.3,5.2-5.2,5.2L46.9,56.6z"/>
<ellipse transform="matrix(0.8192 -0.5736 0.5736 0.8192 -8.0825 15.5141)" class="st2" cx="20.6" cy="20.6" rx="20.6" ry="20.6"/>
<path class="st2" d="M109.3,111.6c6.7,9.2,4.6,22-4.6,28.7s-22,4.6-28.7-4.6c-0.1-0.2-0.3-0.4-0.4-0.6l-30.8-44
c-6.5-9.3-4.3-22.1,5-28.6s22.1-4.3,28.6,5L109.3,111.6z"/>
</g>
<g id="Layer_3">
<path class="st2" d="M145.3,32.7h16.4c0.9,0,1.6-0.7,1.6-1.6c0-0.9-0.7-1.6-1.6-1.6h-16.4c-0.9,0-1.6,0.7-1.6,1.6
C143.7,32,144.4,32.7,145.3,32.7z"/>
<path class="st2" d="M145.3,3.3h4.9v5l0,0l-5.8,4c-0.7,0.5-0.9,1.5-0.4,2.3c0.5,0.7,1.5,0.9,2.3,0.4l4.6-3.2c1.6,3.2,5.5,4.6,8.8,3
c2.2-1.1,3.7-3.4,3.6-5.9V1.7l0,0c0-0.9-0.7-1.6-1.6-1.6l0,0h-16.4c-0.9,0-1.6,0.7-1.6,1.6C143.7,2.6,144.4,3.3,145.3,3.3
L145.3,3.3z M160,8.9c0,1.8-1.5,3.3-3.3,3.3s-3.3-1.5-3.3-3.3V3.3h6.5V8.9z"/>
<path class="st2" d="M161.7,75.6c-0.9,0-1.6,0.7-1.6,1.6l0,0v4.9h-14.7c-0.9,0-1.6,0.7-1.6,1.6l0,0l0,0c0,0.9,0.7,1.6,1.6,1.6l0,0
H160v5c0,0.9,0.7,1.6,1.6,1.6s1.6-0.7,1.6-1.6v-6.6l0,0v-6.5C163.4,76.4,162.6,75.7,161.7,75.6C161.7,75.6,161.7,75.6,161.7,75.6z"
/>
<path class="st2" d="M153.5,46.4c-5.5,0-10,4.5-10,10s4.5,10,10,10s10-4.5,10-10S159.1,46.4,153.5,46.4z M153.5,63.2
c-3.7,0-6.7-3-6.7-6.7c0-3.7,3-6.7,6.7-6.7c3.7,0,6.7,3,6.7,6.7v0C160.2,60.2,157.2,63.2,153.5,63.2L153.5,63.2z"/>
<g class="st3">
<path class="st2" d="M145.2,109h16.5c0.3,0,0.5,0.1,0.7,0.3c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7
c-0.2,0.2-0.5,0.3-0.7,0.3h-16.5c-0.3,0-0.5-0.1-0.7-0.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7
C144.7,109.1,144.9,109,145.2,109z"/>
</g>
<g class="st3">
<path class="st4" d="M145.2,109h16.5c0.3,0,0.5,0.1,0.7,0.3c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7
c-0.2,0.2-0.5,0.3-0.7,0.3h-16.5c-0.3,0-0.5-0.1-0.7-0.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7
C144.7,109.1,144.9,109,145.2,109z"/>
</g>
<g class="st3">
<path class="st2" d="M145.2,126h16.5c0.3,0,0.5,0.1,0.7,0.3c0.2,0.2,0.3,0.4,0.3,0.7v0.2c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-0.4,0.9-0.4H152.5z"/>
</g>
<g class="st3">
<path class="st4" d="M152.5,98.1c0.3,0,0.6,0.1,0.9,0.4s0.4,0.5,0.4,0.9c0,0.3-0.1,0.6-0.4,0.9c-0.2,0.2-0.5,0.4-0.9,0.4h-0.5
c-0.3,0-0.6-0.1-0.9-0.4c-0.2-0.2-0.4-0.5-0.4-0.9c0-0.4,0.1-0.7,0.4-0.9s0.5-0.4,0.9-0.4H152.5z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -40,41 +40,44 @@ module.exports = React.createClass({
getInitialState: function() {
return {
page: ""
iframeSrc: '',
page: '',
};
},
componentWillMount: function() {
if (this.props.teamToken && this.props.teamServerUrl) {
return;
this.setState({
iframeSrc: `${this.props.teamServerUrl}/static/${this.props.teamToken}/home.html`
});
}
else {
// we use request() to inline the homepage into the react component
// so that it can inherit CSS and theming easily rather than mess around
// with iframes and trying to synchronise document.stylesheets.
// we use request() to inline the homepage into the react component
// so that it can inherit CSS and theming easily rather than mess around
// with iframes and trying to synchronise document.stylesheets.
let src = this.props.homePageUrl || '/home.html';
let src = this.props.homePageUrl || '/home.html';
request(
{ method: "GET", url: src },
(err, response, body) => {
if (err || response.status < 200 || response.status >= 300) {
console.log(error);
this.setState({ page: "Couldn't load home page" });
}
request(
{ method: "GET", url: src },
(err, response, body) => {
if (err || response.status < 200 || response.status >= 300) {
console.log(error);
this.setState({ page: "Couldn't load home page" });
body = body.replace(/_t\(['"]([\s\S]*?)['"]\)/mg, (match, g1)=>{ return sanitizeHtml(_t(g1)) });
this.setState({ page: body });
}
body = body.replace(/_t\(['"]([\s\S]*?)['"]\)/mg, (match, g1)=>{ return sanitizeHtml(_t(g1)) });
this.setState({ page: body });
}
);
);
}
},
render: function() {
if (this.props.teamToken && this.props.teamServerUrl) {
src = `${this.props.teamServerUrl}/static/${this.props.teamToken}/home.html`;
if (this.state.iframeSrc) {
return (
<div className="mx_HomePage">
<iframe src={ src } />
<iframe src={ this.state.iframeSrc } />
</div>
);
}