Add basics of Help page
This commit is contained in:
parent
5f64e0dbae
commit
b5fcb77e22
4 changed files with 31 additions and 3 deletions
1
dist/index.html
vendored
1
dist/index.html
vendored
|
@ -26,6 +26,7 @@
|
|||
<script src="./js/component/splash.js"></script>
|
||||
<script src="./js/page/home.js"></script>
|
||||
<script src="./js/page/settings.js"></script>
|
||||
<script src="./js/page/help.js"></script>
|
||||
<script src="./js/app.js"></script>
|
||||
<script src="./js/main.js"></script>
|
||||
</body>
|
||||
|
|
13
js/app.js
13
js/app.js
|
@ -5,9 +5,16 @@ var appStyles = {
|
|||
};
|
||||
var App = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {
|
||||
viewingPage: window.location.search === '?settings' ? 'settings' : 'home'
|
||||
var query = window.location.search.slice(1);
|
||||
if (query == 'settings' || query == 'help') {
|
||||
var viewingPage = query;
|
||||
} else {
|
||||
var viewingPage = 'home';
|
||||
}
|
||||
|
||||
return {
|
||||
viewingPage: viewingPage
|
||||
};
|
||||
},
|
||||
componentWillMount: function() {
|
||||
lbry.checkNewVersionAvailable(function(isAvailable) {
|
||||
|
@ -45,6 +52,8 @@ var App = React.createClass({
|
|||
var content = <HomePage />;
|
||||
} else if (this.state.viewingPage == 'settings') {
|
||||
var content = <SettingsPage />;
|
||||
} else if (this.state.viewingPage == 'help') {
|
||||
var content = <HelpPage />;
|
||||
}
|
||||
return (
|
||||
<div style={appStyles}>
|
||||
|
|
16
js/page/help.js
Normal file
16
js/page/help.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
var HelpPage = React.createClass({
|
||||
render: function() {
|
||||
return (
|
||||
<main>
|
||||
<h1>Help</h1>
|
||||
<p>Content will go here</p>
|
||||
<h3>Subsection</h3>
|
||||
<p>More content</p>
|
||||
<p>Even more content</p>
|
||||
<section>
|
||||
<Link href="/" label="<< Return"/>
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
});
|
|
@ -238,7 +238,9 @@ var TopBar = React.createClass({
|
|||
<span style={balanceStyle}>
|
||||
<CreditAmount amount={this.state.balance}/>
|
||||
</span>
|
||||
<Link href='/?settings' icon="icon-gear" />
|
||||
<Link href='/?settings' icon='icon-gear' />
|
||||
{ ' ' }
|
||||
<Link href='/?help' icon='icon-question-circle' />
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue