launch: add startup content

This commit is contained in:
Matilde Park 2020-03-20 16:30:20 -04:00
parent e5f701e4a5
commit 9114d1e858
2 changed files with 34 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import classnames from 'classnames';
import Header from '/components/header';
import Tile from '/components/tile';
import Welcome from '/components/welcome';
export default class Home extends Component {
@ -42,6 +42,7 @@ export default class Home extends Component {
"flex justify-between flex-wrap"}
style={{maxWidth: "40rem"}}>
{tileElems}
<Welcome/>
</div>
</div>
);

View File

@ -0,0 +1,32 @@
import React, { Component } from 'react'
export class Welcome extends Component {
constructor() {
super();
this.state = {
show: true
}
}
render() {
let firstTime = window.startupMessage;
return (firstTime && this.state.show)
? (
<div className={"fl ma2 bg-white bg-gray0-d white-d overflow-hidden " +
"ba b--black b--gray1-d pa2 w-100 mw6 lh-copy"}>
<p className="f9">You've just come into possession of a virtual computer you own completely. You can run it on a laptop, you can run it on a server, but it doesn't really matter.</p>
<p className="f9 pt2">With the key you used to access this space, you can never lose this computer. You can never lose what's on this computer.</p>
<p className="f9 pt2">To begin, you should probably pop into a chat and verify there are signs of life in this new place. If you were invited by a friend, you probably already have access to a few.</p>
<p className="f9 pt2">If you don't, feel free to <a className="no-underline bb b--black b--gray1-d" href="/~chat/join/~/~dopzod/urbit-help">join our lobby.</a></p>
<p className="dib f9 pt2 bb b--black b--gray1-d pointer"
onClick={(() => {
window.api.action("launch", "json", "disable welcome message");
this.setState({show: false});
})}>Close this note</p>
</div>
)
: ( <div/>)
}
}
export default Welcome